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. Image for the cookie policy date

Formatting columns at runtime

Here's my issue. I have a grouping grid that I'm binding to a dataset at runtime. I won't know how many columns will be returned by the stored procedure or what the exact names will be, so I will only be able to address them by their index. I just want to be able to format those columns to be displayed as currency.

This is something that I'd rather handle in the stored procedure, but unfortunately I don't have access to modify it. What would be the best way to accomplish this with the grid control? The samples don't seem to cover this sort of thing.

Thanks,
Kris



2 Replies

AD Administrator Syncfusion Team March 24, 2008 12:59 PM UTC

Hi KLilley,

We are working on this issue. We will update you in two business days.

Regards,
Janagan.



AD Administrator Syncfusion Team March 28, 2008 12:02 PM UTC

Hi KLilley,

Thank you for posting your query to us.

You can format those columns to be displayed as currency by addressing them with their index as mentioned in the code below:



this.GridGroupingControl1.TableDescriptor.Columns[1].Appearance.AnyRecordFieldCell.CellType = "Currency";



Please refer the sample in the link below which illustrates the above:

http://www.syncfusion.com/support/user/uploads/cs_6553aff7.zip

Please try running the above sample and let me know if this helps.

Regards,
Janagan.




Loader.
Live Chat Icon For mobile
Up arrow icon