Is there anyway to handle different formatting for the same columns by row?
For example, the first row, I'd like to format all the numbers by percentage, and all subsequent rows format using currency. Do you suggest using javascript to handle the format individually or I even thought of combining 2 datagrids that look like 1. I'd prefer to control this through some sort of server-side event. Any thoughts, advice would be greatly welcome.
Hello,
It is possible by using the InitializeRow event. Just hook the event and modify the Items collection of the row currently initialized. Items collection is zero based.
In the example below, the second column of all even rows will be set to "1"
protected void WebDataGrid1_InitializeRow(object sender, Infragistics.Web.UI.GridControls.RowEventArgs e) { if (e.Row.Index % 2 == 0) { e.Row.Items[1].Text = "1"; } }
You can use String.Format and the built-in .NET formating features to format the respective cells to anything you wish.
This only formats the data when it is first loaded. I am talking about formatting user data entry fields while they input them differently on row 1 and the rest of the rows.
Is there a way to bind a special type of webpercent box to Row 1 columns during the Initialize method of the WebDataGrid?
When I try this script it says that columnSetting is null. What am I doing wrong? I have defined a bunch of columns and set their EditingColumnSetting
eg.
<ig:EditingColumnSetting ColumnKey="DEC" EditorID="PercentProvider" />
Ok, I submitted a feature request: CAS-15515-FXIFR2