Hi,
I am using the Row-Selectable DataGrid Control
http://aspnet.4guysfromrolla.com/articles/072104-1.aspx and wanted to extend it with the feature that a datagriditem "remember" it's selected Status.
Code:
public class PrettyDataGridItem : DataGridItem, IPostBackEventHandler
{
public PrettyDataGridItem(int itemIndex, int dataSetIndex,
ListItemType itemType) : base(itemIndex, dataSetIndex, itemType) {}
public void RaisePostBackEvent(string eventArgument)
{
CommandEventArgs commandArgs = new CommandEventArgs(eventArgument, null);
DataGridCommandEventArgs args =
new DataGridCommandEventArgs(this, this, commandArgs);
base.RaiseBubbleEvent(this, args);
}
public bool IsSelected
{
get{return ViewState["IsSelected"+UniqueID];}
set{ViewState["IsSelected"+UniqueID] = value;}
}
}
But if the PrettyDataGrid builds it's items hierarchy the DataGridItem looses the Value....and I don't know why
can somebody help me?