We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Losing Scrollbars when setting GridTableCellStyleInfo properties

Thread ID:





26390 Mar 22,2005 03:47 PM UTC Mar 24,2005 08:44 AM UTC WinForms 5
Tags: GridControl
Theo Danzfuss
Asked On March 22, 2005 03:47 PM UTC

I have a custom datasource that I bind to a GridGroupingControl. Before binding to the Custom Source I set some properties on the TableControl for example: this.TableControl.HScrollBehavior = GridScrollbarMode.Enabled During my custom DataBinding method I make changes to each GridColumnDescriptor''s Style - for example: GridTableCellStyleInfo gsi = column.Appearance.AnyRecordFieldCell; gsi.Format = "G"; gsi.CellType = "TextBox"; After setting these proerties my Scrollbars dissapear? If I comment out the gsi.Format or gsi.CellType part I can see my Scrollbars. In Fact setting ANY property on the GridTableCellStyleInfo causes me to loose my Scrollbars. What am I doing wrong? This is a BIG problem - I cant comment out the part where I Set the GridTableCellStyleInfo becuase then All my Data will be "unformatted" and When putting the code in I loose my scrollbars - then I cant see my data. Please could you help me ASAP. Regards, Theo Danzfuss

Administrator [Syncfusion]
Replied On March 22, 2005 06:17 PM UTC

Can you tell us how to reproduce this behavior in any of our samples? Or, can you upload a sample showing the problem? If you have a problem uploading, you can email it to support@syncfusion.com and mention this forum thread in the subject line.

Administrator [Syncfusion]
Replied On March 22, 2005 06:25 PM UTC

Do you see any exceptions noted in your output window?

Theo Danzfuss
Replied On March 23, 2005 11:47 AM UTC

Hi, No there are no Exceptions in the output window. Ill try to replicate it from one of your examples - but Im bit pushed for time right now so I cant promise anything now. Can you think of any reason why this is happening? Regards TD

Administrator [Syncfusion]
Replied On March 23, 2005 12:15 PM UTC

To set a format like G in style.Format, the style.CellValueType should also be set to the appropriate system type like typeof(double). Usually, type problems throw exceptions when you try to put a string into a double or a double into an int, etc.

Theo Danzfuss
Replied On March 24, 2005 08:44 AM UTC

Hi, I manage to get my grid to work. Here is what happens: The following piece of code throws away my scrollbars: TableControl.TableDescriptor.Columns.Clear ( ); foreach ( PropertyDescriptor pd in view.GetItemProperties(null)) { GridColumnDescriptor gcd = TableControl.TableDescriptor.Columns [TableControl.TableDescriptor.Columns.Add (pd.Name)]; gcd.Appearance.AnyRecordFieldCell.BackColor = System.Drawing.Color.Brown; } This piece of code works fine: TableControl.TableDescriptor.Columns.Clear ( ); foreach ( PropertyDescriptor pd in view.GetItemProperties(null)) { GridColumnDescriptor gcd = new GridColumnDescriptor ( ); gcd.Appearance.AnyRecordFieldCell.BackColor = System.Drawing.Color.Brown; TableControl.TableDescriptor.Columns.Add ( gcd ); } I don''t know why this happens but it seems that when changing a GridTableCellInfoStyle after the GridColumnDescriptor has been added to the Columns collection it "ignores" the scrollbar settings? Regards TD


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon