DataGrid rowchanged event??

  • Thread starter Thread starter Beffmans
  • Start date Start date
B

Beffmans

Hi

I wonder if there was something like a an event for an asp.net datagrid
which fire swhen you change (part of) that row? I am trying to mark rows
which have been changed to update later .

ch B.
 
Hi

I change the rows in the datagrid (consisting of templated columns) and
them manually get all the cellvalues out row for row and put them in a
web service. This is obviously not very efficient. Is there a way of
marking only the rows I want to update? In other words is there a way to
trigger an event in an asp.net datagrid when the user changes 1 row?

ch B
 
If your template includes server-side controls, you can setup server-side
events that will be triggered on every postback, Is it good for you?

Eliyahu
 
how do you which row you updated? in other words what is the index of
the current row when you change a field in your datagrid?
ch B
 
Every server-side event gets a reference to the control that originated the
event. Since you know the item template structure, you can navigate from the
control reference to the containing cell and row. Use Parent property to get
to the DataGridItem. Once you are on the DataGridItem, you have ItemIndex
and DataSetIndex properties.

Eliyahu
 
I am trying to attach eventhandlers to my controls in the datagrid. In
cases one of the controls changes i mark this record to be updated in my
update function. Is this a good approach or can it be easier?

ch B
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top