ASP.Net Datagrid Edit Certain Rows

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

Hello,

I was wondering if there was a way to only edit certain rows in a ASP.Net.
I know how to only edit certain columns. But say for example, I want to
lock a field if a certain date has passed on that record. Any help would be
greatly appreciated.

Thanks,

Jason
 
You'd need to handle the ItemDataBound event. This gets called for every
row that has been created from the data source. You can then do your logic
to see if the row is currently in edit mode and then based upon your logic
you have access to the row (and all its child controls) so you can change
the properties of the controls (like enable/disable) or even change the controls
as you wish.

-Brock
DevelopMentor
http://staff.develop.com/ballen
 

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