VD1234
asked on
Template column values on Edit Command
I have a template column that has a drop down list. The values for this column are assigned in the Item Databound event.
I have the following issues:
When I click on the Edit button in the edittemplate, the Template column loose there values. I want this row to start in edit mode, however the template columns should still retain there values.
How do I achieve this. Thanks in advance.
I have the following issues:
When I click on the Edit button in the edittemplate, the Template column loose there values. I want this row to start in edit mode, however the template columns should still retain there values.
How do I achieve this. Thanks in advance.
ASKER
Data is not lost. What I actually want is for example if I have a drop down list in the edittemplate, I want the selectedvalue to remain the same even after the edit buton is clicked. But the drop down has no selected value as soon as the Edit button is clicked.
I bind the datagrid as follows:
protected void dgDynamicFields_Edit(objec t source, DataGridCommandEventArgs e)
{
// Enter edit mode
dgDynamicFields.EditItemIn dex = e.Item.ItemIndex;
dtDynamic = objAdmin.Get_DynamicFields ().Tables[ 1];
BindGrid();
}
I bind the datagrid as follows:
protected void dgDynamicFields_Edit(objec
{
// Enter edit mode
dgDynamicFields.EditItemIn
dtDynamic = objAdmin.Get_DynamicFields
BindGrid();
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Forced accept.
Computer101
Community Support Moderator
Computer101
Community Support Moderator
2nd if you are putting conrols in templated field manully then you need to bind yourself ..