AD
Administrator
Syncfusion Team
August 19, 2006 07:55 AM UTC
Try this.
At the bottom of Form.Load, add:
// this.gridControl1[0, 1].BaseStyle = "Standard";
this.gridControl1[0, 1].Themed = false;
this.gridControl1[0, 1].CellType = "TreeCell";
this.gridControl1[0, 1].ImageIndex = 0;
this.gridControl1[0, 1].Tag = 0;
this.gridControl1[0, 1].ImageList = this.imageList1;
this.gridControl1.CellClick += new GridCellClickEventHandler(gridControl1_CellClick);
Then use this handler:
void gridControl1_CellClick(object sender, GridCellClickEventArgs e)
{
if (e.RowIndex == 0 && e.ColIndex == 1)
{
if(this.gridControl1[0, 1].ImageIndex == 0)
{
button4.PerformClick();
}
else
{
button5.PerformClick();
}
}
}
Then at the top of saveCellInfo, add
if (e.ColIndex == 1 && e.RowIndex == 0)
{
return;
}
This will just store the cell 0,1 information in the grid and let it be maintained internally, and not rely on the external datasource for its value.
JL
Julie Levy
August 23, 2006 11:58 PM UTC
Thanks for your help Clay, this works great.