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.
Unfortunately, activation email could not send to your email. Please try again.

Formatting columns at runtime

Thread ID:

Created:

Updated:

Platform:

Replies:

72475 Mar 20,2008 12:22 PM Mar 28,2008 08:02 AM ASP.NET Web Forms (Classic) 2
loading
Tags: GridGroupingControl
KLilley
Asked On March 20, 2008 12:22 PM

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



Administrator [Syncfusion]
Replied On March 24, 2008 08:59 AM

Hi KLilley,

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

Regards,
Janagan.


Administrator [Syncfusion]
Replied On March 28, 2008 08:02 AM

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.




CONFIRMATION

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.

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.

;