Editing A Line In A Datagrid

  • Thread starter Thread starter JimHeavey
  • Start date Start date
J

JimHeavey

Hello, I have a row in a Datagrid which has a value
already provided for a field. When the user clicks
the "edit" link for that row in the datagrid,
the "EditItemTemplate" binds that column to a dropdown
list which has all of the valid values. The problem is
that when the line is being editted, the value which as
already been selected is not "preselected" in the row.
How can I get that item to show as being selected?
 
You need to set it in the DataGridName_OnEditCommand event

You know which row is being edited by accessing the
DataGridName.EditItemIndex property.
 
Back
Top