DataGrid again 
Author Message
 DataGrid again

Hi y'all,

How do I ascertain if a cell has been changed in a DataGrid?  I want to know
if the user has changed a value so I can enable a save button.

Thanx,
Bill



Fri, 10 Jun 2005 11:36:04 GMT  
 DataGrid again


Quote:
> Hi y'all,

> How do I ascertain if a cell has been changed in a DataGrid?  I want
> to know if the user has changed a value so I can enable a save button.

> Thanx,
> Bill

Hi Bill,

One way of doing this would be to add an eventhandler for the
CurrentCellChanged event on the DataGrid and use the HasChanges()
method on the DataSet that is bound to the grid to check for changes.

example
-----------
protected void datagrid1_CurrentCellChanged(object sender, EventArgs e)
{
    if(dataSet1.HasChanges())
    {
        // code to enable save-button
    }

Quote:
}

Best Regards, Mikael


Fri, 10 Jun 2005 21:54:18 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. The DataGrid Again!

2. DataGrid Again

3. multithreading, again and again!

4. multithreading, again and again!

5. Have to build .exe again and again!

6. any way to make the scroll in one datagrid bind to the scroll in another datagrid

7. changing row colors in DataGrid (not a web DataGrid)

8. subclass DataGrid or add to DataGrid to UserControl

9. datagrid: how to get a class to display in a datagrid

10. How to disable adding, inserting ord deleting Rows in the DataGrid (System.Windows.Forms.DataGrid)

11. DataGrid/C# : How to access DataGrid data(set/source) from other methods after binding?

12. How can I control a DataGrid placed inside another DataGrid Cell?

 

 
Powered by phpBB® Forum Software