Dear:
I have DataGrid , which its task to (Edit, update, and delete) contents of
XML File.
the structure of XML like this
<Info>
<Name></Name>
<Age></Age>
<Date_OB></Date_OB>
<CStatus></CStatus>
<BStatus></BStatus>
<DStatus></DStatus>
</Info>
in XSD the CStatus,BStatus,DStatus ( are boolean type), the case that when
user click Edit in datagrid anywhere there boolean type to be replaced by
CheckBox(I achieved this task on ItemDataBound by check the column type and
add CheckBox Control to cell and remove the TextBox) .
but the problem when doing updates how can I retrieve the Dyamically Created
Check Box Values to update the XML.
[code] for how I can display the checkbox
private void DataGrid1_ItemDataBound(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType == ListItemType.EditItem)
{
if(lstTypes.Items[i].Text == "System.Boolean")
{
TextBox tb=(TextBox)e.Item.Cells[i+3].Controls[0];
string s=tb.Text.ToLower();
e.Item.Cells[i+3].Text="<INPUT id='chkBool' type='checkbox' >";
}
}
}
now I need when check/uncheck the checkbox and do updates to take all
updates on all checkbox value in datagrid and save thier states.
How can I achieve that.
Regards