Nisha,
it does work. Thanks.
but somehow, it doesn't look decent as default windows or sncfustion treeview ... , say the tree lines , ...
I am not good at graphic drawing, any other good example ?
David
>Hi David,
Thanks for your interest in Syncfusion Products.
You can handle TableControlDrawCell event to customise the nested Table.
Code Snippet:
void gridGroupingControl1_TableControlDrawCell(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlDrawCellEventArgs e)
{
GridTableCellStyleInfo style = e.Inner.Style as GridTableCellStyleInfo;
if (style.TableCellIdentity.TableCellType == GridTableCellType.RecordPlusMinusCell
|| style.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionPlusMinusCell)
{
e.Inner.Cancel = true;
Point pt = e.Inner.Bounds.Location;
pt.Offset(e.Inner.Bounds.Width/2 -2 ,e.Inner.Bounds.Height/2 - 2);
Rectangle rect =new Rectangle(pt,new Size(9,9));
e.Inner.Graphics.DrawRectangle(Pens.Black, rect);
StringFormat format = new StringFormat();
format.Alignment = StringAlignment.Center;
format.LineAlignment = StringAlignment.Center;
e.Inner.Graphics.DrawString(e.Inner.Style.Description, e.Inner.Style.GdipFont,new SolidBrush(e.Inner.Style.TextColor),rect,format);
}
}
Here is the sample:
http://files.syncfusion.com/samples/Grid.Windows/F79861/main.htmLet me know if this serve your needs.
Regards,
Nisha.