Hi, I post this again to hope for valuable help.
I have a window form order entry type of application
where I used a datagrid to capture the order line detail.
the datasource of this datagrid is set to datatable
object. I realised that if I type a new row half way and
focus was shifted to other controls in the form. This
last row is not created in the datatable. However, if I
move my cursor to another row (up or down) and focus was
shifted to other controls, this row is created in the
datatable.
it seems to be that only at the point when I move out of
the row in the datagrid that a record been created in the
datatable, can anyone advise how can I force the
datatable to create the record without first moving into
another row?
Thank you very very much
Albert 3 1777
Trap the KeyPress event and look for the down arrow key. Compare the
CurrentRowIndex with the DataTable, if it exceeds it. Then save the data to
the DataTable.
This sounds awfully familiar
Regards - OHM
AH wrote: Hi, I post this again to hope for valuable help. I have a window form order entry type of application where I used a datagrid to capture the order line detail. the datasource of this datagrid is set to datatable object. I realised that if I type a new row half way and focus was shifted to other controls in the form. This last row is not created in the datatable. However, if I move my cursor to another row (up or down) and focus was shifted to other controls, this row is created in the datatable. it seems to be that only at the point when I move out of the row in the datagrid that a record been created in the datatable, can anyone advise how can I force the datatable to create the record without first moving into another row?
Thank you very very much
Albert
Regards - OHM# OneHandedMan{at }BTInternet{dot }com
hi OHM,thank for the reply, is there a way to trigger
some code so that it can update the datatable
automatically, what happen is on the same form I have a
textbox control to sum the total order value but if I
exit the datagrid without moving into another row, I
can't update the total value since this row is not
recorded in the datatable.
...thank ..it is close to 0330hr on Sunday in this part of
the world....amazin g ..
Albert
Thank but I need to -----Original Message----- Trap the KeyPress event and look for the down arrow key.
Compare theCurrentRowInde x with the DataTable, if it exceeds it.
Then save the data tothe DataTable.
This sounds awfully familiar
Regards - OHM
AH wrote: Hi, I post this again to hope for valuable help. I have a window form order entry type of application where I used a datagrid to capture the order line
detail. the datasource of this datagrid is set to datatable object. I realised that if I type a new row half way
and focus was shifted to other controls in the form. This last row is not created in the datatable. However, if I move my cursor to another row (up or down) and focus
was shifted to other controls, this row is created in the datatable. it seems to be that only at the point when I move out
of the row in the datagrid that a record been created in
the datatable, can anyone advise how can I force the datatable to create the record without first moving
into another row?
Thank you very very much
Albert
Regards - OHM# OneHandedMan{at }BTInternet{dot }com
.
Not that I know of, but this does not mean that it is not possible.
Regards - OHM an*******@discu ssions.microsof t.com wrote: hi OHM,thank for the reply, is there a way to trigger some code so that it can update the datatable automatically, what happen is on the same form I have a textbox control to sum the total order value but if I exit the datagrid without moving into another row, I can't update the total value since this row is not recorded in the datatable. ..thank ..it is close to 0330hr on Sunday in this part of the world....amazin g ..
Albert Thank but I need to -----Original Message----- Trap the KeyPress event and look for the down arrow key. Compare the CurrentRowIndex with the DataTable, if it exceeds it. Then save the data to the DataTable.
This sounds awfully familiar
Regards - OHM
AH wrote: Hi, I post this again to hope for valuable help. I have a window form order entry type of application where I used a datagrid to capture the order line detail. the datasource of this datagrid is set to datatable object. I realised that if I type a new row half way and focus was shifted to other controls in the form. This last row is not created in the datatable. However, if I move my cursor to another row (up or down) and focus was shifted to other controls, this row is created in the datatable. it seems to be that only at the point when I move out of the row in the datagrid that a record been created in the datatable, can anyone advise how can I force the datatable to create the record without first moving into another row?
Thank you very very much
Albert
Regards - OHM# OneHandedMan{at }BTInternet{dot }com
.
Regards - OHM# OneHandedMan{at }BTInternet{dot }com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Pierluigi Terzoli |
last post by:
Hi everybody,
I need help for this problem:
I'm using a DataGrid to Insert/Modify/Cancel data from a single table.
At the moment, every cell modification of a pre-existing row is correctly
update on the DB.
I have some doubts about inserting a new row.
The table has a Id field that is a primary key defined ad Identity
properties on SQLServer engine.
This column isn't visible on the grid and a properties DefaultValue=0 is
defined.
|
by: berullus |
last post by:
I created a datagrid in windows form and the datasource for it is a
datatable. It works fine when I add a new row in the grid and click on Save
button which I added on the form to save as xml file. The new row gets added
to the table automatically. But I removed the Save button and instead added a
menu with File->SaveAs option. The problem started here. When a new row is
added and while the focus is still in that new row, if the menu is...
|
by: TT (Tom Tempelaere) |
last post by:
Hi there,
I'm struggling to get the right event. I want to be notified of a change in
a cell in a DataGrid made by a user. I need following information about the
change:
* the row index
* the column index
* the newly entered value
I need this information to update another DataGrid. I have checked the
|
by: Rick |
last post by:
Hello all, I hope all is well with you.
I am having a seriously difficult time with this problem. Allow me to
set
up the problem.
I have a System.Web.UI.Page with the following controls (watch the
layout,
some have child controls):
|
by: Tomek R. |
last post by:
Hello !
I've got weird problem when adding new datagrid item. Here is the situation:
my grid dgDeps is binded to DepartmentList arraylist, stored in Session
between round-trips..
To add new item I press buttton with ibNewDep_Click event.
After that the grid is in edit state and I can modify new item, it has some
text, set as default - "<nowy wydział>".
But - this is the weirdness - when I add some text following the default
value
| |
by: Joe Reggae |
last post by:
Hello,
I'm a little weak in understanding concepts surrounding currency and binding
context and appreciate advice in getting some grids to bind (in sync) to
three related tables.
Specifically, I have three tables with one-to-many relations defined in my
dataSet from parent to child and from child to grandchild. To that are bound
three datagrids ...
|
by: Gene Hubert |
last post by:
I'm assigning a new datasource (a datatable) to a datagrid that is
aready displayed in a form. Then I assign a new value to
CurrentRowIndex.
The datagrid always scrolls so that the new current row is visible.
However, the vertical scrollbar does not always adjust accordingly.
Upon the first instance of assigning a new datasource and setting the
currentrowindex to the _last_ record, the part of the vertical
scrollbar that can be...
|
by: HS1 |
last post by:
Hello
I have a DataGrid and using some TextBox(es) to present data of this
DataGrid. I can show the data by setting fields for these TextBox (in design
view). However, I want to write codes (event handler) so that when I change
focus of each row in DataGrid, the data value of the row will be presented
in TextBox
Thank you
S. Hoa
|
by: Brian Tkatch |
last post by:
I have a form with two DataGrids, which are kept in sync manually via
Stored PROCEDURE calls. That is, when a record is selected on the first
grid, a stored PROCEDURE is CALLed to Fill() the next second DataGrid's
DataSource. All that works very well. And, when there are no records to
display, it is simply left blank.
My issue is that when i scroll the first one, sometimes the second grid
shows a bunch of null values (a "new" record).
...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |