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.

How to set Unbound Field style

Thread ID:

Created:

Updated:

Platform:

Replies:

31995 Jul 19,2005 01:53 PM Jul 19,2005 03:37 PM Windows Forms 1
loading
Tags: Grouping
Administrator [Syncfusion]
Asked On July 19, 2005 01:53 PM

I want to set Unbound Field style like this: if ((string)row["ValType"]=="1") { style.format="###0.##%"; } else { style.format="###0.##"; }

Administrator [Syncfusion]
Replied On July 19, 2005 03:37 PM

Hi Cradle, you can do this using the QueryCellStyleInfo event. Example: private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e) { GridTableCellStyleInfoIdentity id = e.TableCellIdentity; Record r = id.DisplayElement is Record ? (Record) id.DisplayElement : id.DisplayElement.ParentRecord; GridColumnDescriptor column = id.Column; if (column != null && column.MappingName == "yourUnboundFieldName") { if ((int) r.GetValue("someColumn") > 1) e.Style.Format = "yourFormat"; } } Stefan >I want to set Unbound Field style like this: > >if ((string)row["ValType"]=="1") >{ > >style.format="###0.##%"; >} >else >{ >style.format="###0.##"; >}

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.

;