GGC.RecordExpanded and RecordCollapsed events
Hi,
Im using these events and the GGC.TableControl.VScroll property. If the user expands a record the RecordExpanded fires, but the VScroll property is false even though the GGC now has a scrollbar.
How can I reliably tell if the scrollbar is visible in these events?
Thanks
John
Im using these events and the GGC.TableControl.VScroll property. If the user expands a record the RecordExpanded fires, but the VScroll property is false even though the GGC now has a scrollbar.
How can I reliably tell if the scrollbar is visible in these events?
Thanks
John
SIGN IN To post a reply.
17 Replies
AD
Administrator
Syncfusion Team
January 19, 2007 06:07 PM UTC
Hi John,
Do you want to hide the VerticalScrollbar in a grid? If yes, you should set the TableControl.VScrollBehavior property to GridScrollbarMode.Disabled .Here is a code snippet
this.gridGroupingControl1.TableControl.VScrollBehavior = GridScrollbarMode.Disabled;
Best Regards,
Haneef
Do you want to hide the VerticalScrollbar in a grid? If yes, you should set the TableControl.VScrollBehavior property to GridScrollbarMode.Disabled .Here is a code snippet
this.gridGroupingControl1.TableControl.VScrollBehavior = GridScrollbarMode.Disabled;
Best Regards,
Haneef
JH
John H
January 23, 2007 09:41 AM UTC
Hi Haneef,
No, I want to resize a column accordingly if the scroll bar is visible.
Thanks
John
>Hi John,
Do you want to hide the VerticalScrollbar in a grid? If yes, you should set the TableControl.VScrollBehavior property to GridScrollbarMode.Disabled .Here is a code snippet
this.gridGroupingControl1.TableControl.VScrollBehavior = GridScrollbarMode.Disabled;
Best Regards,
Haneef
No, I want to resize a column accordingly if the scroll bar is visible.
Thanks
John
>Hi John,
Do you want to hide the VerticalScrollbar in a grid? If yes, you should set the TableControl.VScrollBehavior property to GridScrollbarMode.Disabled .Here is a code snippet
this.gridGroupingControl1.TableControl.VScrollBehavior = GridScrollbarMode.Disabled;
Best Regards,
Haneef
AD
Administrator
Syncfusion Team
January 23, 2007 08:59 PM UTC
Hi John,
Here is a knowledge base article that shows you "How to allocate equal size for each of the columns in all the tables of a GridGroupingControl?"
http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=356
Best Regards,
Haneef
Here is a knowledge base article that shows you "How to allocate equal size for each of the columns in all the tables of a GridGroupingControl?"
http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=356
Best Regards,
Haneef
JH
John H
January 26, 2007 10:43 AM UTC
Hi Haneef,
Yeah I saw that example, but it seems overly complex for what should be a simple task? Filtering out everything else in the example (helper class etc), I have implemented the QueryColWidth event as follows;
grid.TableModel.QueryColWidth += new Syncfusion.Windows.Forms.Grid.GridRowColSizeEventHandler( TableModel_QueryColWidth );
and;
void TableModel_QueryColWidth( object sender, Syncfusion.Windows.Forms.Grid.GridRowColSizeEventArgs e )
{
if(e.Index == 3)
{
e.Size = grid.ClientSize.Width - 19;
e.Handled = true;
}
}
when horizontally resizing the GGC, the rows don't repaint correctly?
Also, when expanding a node that contains many rows the scrollbar appears, but the column I resize doesn't adjust accordingly.
Any pointers would be very welcome.
Thanks
John
Yeah I saw that example, but it seems overly complex for what should be a simple task? Filtering out everything else in the example (helper class etc), I have implemented the QueryColWidth event as follows;
grid.TableModel.QueryColWidth += new Syncfusion.Windows.Forms.Grid.GridRowColSizeEventHandler( TableModel_QueryColWidth );
and;
void TableModel_QueryColWidth( object sender, Syncfusion.Windows.Forms.Grid.GridRowColSizeEventArgs e )
{
if(e.Index == 3)
{
e.Size = grid.ClientSize.Width - 19;
e.Handled = true;
}
}
when horizontally resizing the GGC, the rows don't repaint correctly?
Also, when expanding a node that contains many rows the scrollbar appears, but the column I resize doesn't adjust accordingly.
Any pointers would be very welcome.
Thanks
John
JH
John H
January 30, 2007 02:39 PM UTC
Any feedback on this issue please?
Thanks
John
Thanks
John
AD
Administrator
Syncfusion Team
January 31, 2007 08:08 PM UTC
Hi John,
Sorry for the delay in updating you.
We were not able to reproduce the issue here. Is it possible for you to upload us a sample or modify the any of our browser sample to reproduce the issue here? This will help us to analyse the issue further.
Thanks for your patience.
Best Regards,
Haneef
Sorry for the delay in updating you.
We were not able to reproduce the issue here. Is it possible for you to upload us a sample or modify the any of our browser sample to reproduce the issue here? This will help us to analyse the issue further.
Thanks for your patience.
Best Regards,
Haneef
JH
John H
February 1, 2007 04:13 PM UTC
Hi Haneef,
Sure, I should be able to put together an example.
One thing I forgot to mention is that I have drawn some images in the TableControlDrawCell event for the column that is to be resized, using e.Inner.Bounds.Width - 35 as the firsts left position.
Does this help?
Thanks
John
Sure, I should be able to put together an example.
One thing I forgot to mention is that I have drawn some images in the TableControlDrawCell event for the column that is to be resized, using e.Inner.Bounds.Width - 35 as the firsts left position.
Does this help?
Thanks
John
JH
John H
February 7, 2007 10:50 AM UTC
Hi Haneef,
I have attached an example project that displays 2 icons in the top level row, and I have implimented QueryColWidth as per the example.
If you resize the form you will see that the icons are not painted correctly, and if you expand node 2 and then one of its child nodes so that the scroll bar appears, you can see that the top level column widths are not resized and so the right most icon is obscured by the scroll bar.
Thanks
John
GGC_3_levels_example.zip
I have attached an example project that displays 2 icons in the top level row, and I have implimented QueryColWidth as per the example.
If you resize the form you will see that the icons are not painted correctly, and if you expand node 2 and then one of its child nodes so that the scroll bar appears, you can see that the top level column widths are not resized and so the right most icon is obscured by the scroll bar.
Thanks
John
GGC_3_levels_example.zip
AD
Administrator
Syncfusion Team
February 7, 2007 11:28 PM UTC
Hi John,
Please refer to the following forum thread for more details.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=55958
Best regards,
Haneef
Please refer to the following forum thread for more details.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=55958
Best regards,
Haneef
JH
John H
February 9, 2007 09:17 AM UTC
Hi Haneef,
The example you posted doesn't resolve the repainting issue when you drag the form wider or smaller, or the problem where the right most icon is covered by the scrollbar when you expand Table2 node and a child node.
Any ideas?
Thanks
John
>Hi John,
Please refer to the following forum thread for more details.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=55958
Best regards,
Haneef
The example you posted doesn't resolve the repainting issue when you drag the form wider or smaller, or the problem where the right most icon is covered by the scrollbar when you expand Table2 node and a child node.
Any ideas?
Thanks
John
>Hi John,
Please refer to the following forum thread for more details.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=55958
Best regards,
Haneef
JH
John H
February 14, 2007 11:48 AM UTC
Hi Haneef,
I still need feedback on this issue please.
Thanks
John
>Hi Haneef,
The example you posted doesn't resolve the repainting issue when you drag the form wider or smaller, or the problem where the right most icon is covered by the scrollbar when you expand Table2 node and a child node.
Any ideas?
Thanks
John
>Hi John,
Please refer to the following forum thread for more details.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=55958
Best regards,
Haneef
I still need feedback on this issue please.
Thanks
John
>Hi Haneef,
The example you posted doesn't resolve the repainting issue when you drag the form wider or smaller, or the problem where the right most icon is covered by the scrollbar when you expand Table2 node and a child node.
Any ideas?
Thanks
John
>Hi John,
Please refer to the following forum thread for more details.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=55958
Best regards,
Haneef
JH
John H
February 15, 2007 04:04 PM UTC
Hi Haneef,
I still need feedback on this issue please.
Thanks
John
>Hi Haneef,
I still need feedback on this issue please.
Thanks
John
>Hi Haneef,
The example you posted doesn't resolve the repainting issue when you drag the form wider or smaller, or the problem where the right most icon is covered by the scrollbar when you expand Table2 node and a child node.
Any ideas?
Thanks
John
>Hi John,
Please refer to the following forum thread for more details.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=55958
Best regards,
Haneef
I still need feedback on this issue please.
Thanks
John
>Hi Haneef,
I still need feedback on this issue please.
Thanks
John
>Hi Haneef,
The example you posted doesn't resolve the repainting issue when you drag the form wider or smaller, or the problem where the right most icon is covered by the scrollbar when you expand Table2 node and a child node.
Any ideas?
Thanks
John
>Hi John,
Please refer to the following forum thread for more details.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=55958
Best regards,
Haneef
AD
Administrator
Syncfusion Team
February 15, 2007 06:43 PM UTC
Hi John,
Thanks for your response. We will analyze your issues in detail and let you know the feedback in few hours. We regret for any inconvenience caused.
Thanks for being patience.
Best regards,
Haneef
Thanks for your response. We will analyze your issues in detail and let you know the feedback in few hours. We regret for any inconvenience caused.
Thanks for being patience.
Best regards,
Haneef
JH
John H
February 19, 2007 04:42 PM UTC
Hi Haneef,
I still need feedback on this issue please.
Thanks
John
>Hi John,
Thanks for your response. We will analyze your issues in detail and let you know the feedback in few hours. We regret for any inconvenience caused.
Thanks for being patience.
Best regards,
Haneef
I still need feedback on this issue please.
Thanks
John
>Hi John,
Thanks for your response. We will analyze your issues in detail and let you know the feedback in few hours. We regret for any inconvenience caused.
Thanks for being patience.
Best regards,
Haneef
AD
Administrator
Syncfusion Team
February 19, 2007 06:16 PM UTC
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.zip
Thanks for your continued interest in Syncfusion products.
Best regards,
Haneef
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.zip
Thanks for your continued interest in Syncfusion products.
Best regards,
Haneef
JH
John H
February 20, 2007 10:35 AM UTC
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.zip
Thanks for your continued interest in Syncfusion products.
Best regards,
Haneef
GGCModified2.zip
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.zip
Thanks for your continued interest in Syncfusion products.
Best regards,
Haneef
GGCModified2.zip
JH
John H
February 20, 2007 01:30 PM UTC
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.zip
Thanks for your continued interest in Syncfusion products.
Best regards,
Haneef
GGCModified2.zip
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.zip
Thanks for your continued interest in Syncfusion products.
Best regards,
Haneef
GGCModified2.zip
SIGN IN To post a reply.
- 17 Replies
- 2 Participants
-
JH John H
- Jan 19, 2007 10:19 AM UTC
- Feb 20, 2007 01:30 PM UTC