EditCommand event in Datagrid question

  • Thread starter Robert Pettersson
  • Start date
R

Robert Pettersson

Hi,

I have a few questions about the EditCommand event in the DataGrig in
asp.net.

When I get to the EditCommand event in my code I need to set the row that is
to be updated and then rebind the data
to the DataGrid. This is where I have my question, when I rebind the data.
If I make another call to the database, and
reload the data, I´m not sure that I will get the same result. Data may have
been inserted since I loaded the DataGrid
the last time. And then the item that will be selected for edititng can be
the wrong one! And if I keep the datatable in
a viewstate or a sessionstate, the EditCommand event will be very slow if
its a little bigger DataSet/result that I´m working
with. It works ok if I have like 10-20 rows and not that many columns, but
often you work with bigger results then that.

I´m have been looking at sites that explains how to implement the
EditCommand event, but I haven´t found anything on how the best way to get
good performence and the correct result.

If anyone can give me any good tips I would be very greatful!

Thanks,

Robert
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top