Hi Haneef,
I found the grid.TableControl.VScroll property, which does what I need, thanks.
John
>Hi Haneef,
your example fixes the repaint issue, thanks.
But it doesn't fix the problem when the icon is being drawn to the right of the Description column, and then expand nodes until a scrollbar appears. Do you have a property I can check to see if the scrollbar is visible?
I have modifed the example to show you what I mean.
Thanks
John
>Hi John,
Thanks for being patience.
Before draw the icon in a grid cell, you should check table cell identity of the cell and also you should check the drawing point of the error icon. Please find the code snippet for drawing the error in a cell.
void NavParent_DrawCell(object sender, GridDrawCellEventArgs e)
{
GridTableControl tc = sender as GridTableControl;
int filed = tc.TableDescriptor.ColIndexToField(e.ColIndex);
GridTableCellStyleInfo style = tc.GetTableViewStyleInfo(e.RowIndex, e.ColIndex) as GridTableCellStyleInfo;
//before draw a cell, you need to check Table cell identity.
if ((style.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell
|| style.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell)
&& (tc.TableDescriptor.Columns.Count > filed))
{
string columnName = tc.TableDescriptor.Columns[filed].Name;
if (columnName == "group")
{
e.Renderer.Draw(e.Graphics, e.Bounds, e.RowIndex, e.ColIndex, e.Style);
Icon failureIcon = SystemIcons.Error;
Icon warningIcon = SystemIcons.Warning;
//Also you can check the drawing point of the icon....
Rectangle iRect = new Rectangle(e.Bounds.X, e.Bounds.Y, e.Bounds.Width/2,e.Bounds.Height);
e.Graphics.DrawIconUnstretched(failureIcon, iRect);
e.Cancel = true;
}
}
}
Here is a modified sample.
GGCModified2.zipThanks for your continued interest in Syncfusion products.
Best regards,
Haneef
GGCModified2.zip