473,320 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

save record in datagrid while still editing

i'm wondering how can i update the current record in datagrid while
still editing the record. cause i have a checkbox in my datagrid and i
want to save the record before changing the value of this checkbox to
true to enforce referential integrity. i don't have problem changing
the checkbox to true if the record/row in my datagrid is already save.
the problem is that if it is the 1st time i add record to this
datagrid and then update the checkbox to true.

thanks in advance for any help.
Nov 20 '05 #1
2 1360
Hi jaYPee,

You can look what currentcellchanged event from the datagrid (and than check
in that the columnumber if it is the checkbox) and than the
currencymanager.endcurrentedit can do for you.

Not tested just an idea?

Cor
Nov 20 '05 #2
thanks for the immediate reply. here's my code i used. it is working
the 2nd time i click the checkbox again. but didn't work the 1st time
i click the checkbox

DataGrid1.EndEdit(Nothing, DataGrid1.CurrentRowIndex, False)
DataGrid1.BindingContext(DataGrid1.DataSource,
DataGrid1.DataMember).EndCurrentEdit()

'save record first before adding course

SqlDataAdapter2.Update(DsStudentCourse1)

On Thu, 22 Apr 2004 11:58:20 +0200, "Cor Ligthert"
<no**********@planet.nl> wrote:
Hi jaYPee,

You can look what currentcellchanged event from the datagrid (and than check
in that the columnumber if it is the checkbox) and than the
currencymanager.endcurrentedit can do for you.

Not tested just an idea?

Cor


Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Junkguy | last post by:
I need some help programmatically causing a row in a DataGrid to "flush" its contents to its bound data (in Visual Studio 6 using Windows Forms with C#). My issue is I want to send an update to...
3
by: Islamegy | last post by:
When i press btn_save all changed rows in my grid get saved except the last editing row... I want my btn_Save to end editing in the datagrid.. so if user didn't press "enter" after editing last...
2
by: Mark Perona | last post by:
I created an ASP.net form with an editable datagrid on it. I can create new records, and update and delete existing records. The problem I have is that I want a field in the grid to be editible...
0
by: tafs7 | last post by:
Hello, I have a custom datagrid control that works great. But I was thinking about adding some functionality to it. Currently, I use the datagrid to display one record at a time, and with item...
2
by: Sharon | last post by:
I want put into my DataGrid different control types in the same column. For example: Column 1, row 0 ==> TextBox Column 1, row 2 ==> CheckBox Column 1, row 2 ==> ComboBox etc... As I see, I...
0
by: Iain | last post by:
Hi All I have a datagrid which takes it's data from a table on a remote i-series. This datagrid is loaded on Page Load and the user is able to select a record to edit by pressing the...
9
by: =?Utf-8?B?UHJhdmlu?= | last post by:
We are using .net Framework 1.1 We are having one page on which we are using this Grid component. From this page we open a popup for adding new record as well as for editing an existing record...
4
by: nch1978 | last post by:
I am new to programming and am sorry if this post is in the wrong area. I have a listbox bound to a table and a datagrid bound to another one with a connection through xml. I can change the data...
8
by: =?Utf-8?B?bWlrZWc=?= | last post by:
Hi, I am building a small Help Desk application for my company and need to be able to edit "open" help desk issues. I use a simple datagrid to display each issue (6 per page) , with an Edit...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.