datagrid
-
i want to know that after connecting the database with datagrid , how to update and cancel records by using edit button of datagrid? manoj kumar
make a datagrid EditItem method from the Properties window of the datagrid. (Use the lightning bolt icon at the top to get to the methods.) In this method do this (Don't quote me on the signature, I don't know it off the top of my head.)
private void dg_EditCommand(object source, DataGridCommandEventArgs e) { dg.EditItemIndex = e.Item.ItemIndex; dg.DataBind(); }
And then for your cancel use.private void dg_CancelCommand(object source, DataGridCommandEventArgs e) { dg.EditItemIndex = -1; dg.DataBind(); }
Torin Blair
'In the immortal words of Socrates - "I drank what?".' -
i want to know that after connecting the database with datagrid , how to update and cancel records by using edit button of datagrid? manoj kumar
DataGrid Girl[^] has a huge repository of data grid articles. I'd recommend that you visit for all of your data grid related needs. In the meantime, this[^] article gives a good overview of editing data within a data grid. Hope that helps. :) --Jesse