Hi,
We are binding the dataset to grid whose columns are auto generated (AutoGenerateColumns="true")
Column data format string can be either "$" or "%" which is depedent on combo selection format string is bound on column created event.
Initally data is shown with "%", changed the combo selection "$" on click of button format string is not changed to "$".
| protected void radMainGrid_ColumnCreated(object sender, Telerik.Web.UI.GridColumnCreatedEventArgs e) |
| { |
| if (e.Column is GridBoundColumn) |
| { |
| GridBoundColumn boundColumn = e.Column as GridBoundColumn; |
| if (boundColumn.DataField.Equals("Name")) |
| { |
| if(radView.SelectedValue != "0") |
| boundColumn.FooterText = "Grand Total"; |
| } |
| else if(!boundColumn.DataField.Equals("ID")) |
| { |
| if (radView.SelectedValue != "0") |
| { |
| boundColumn.Aggregate = GridAggregateFunction.Sum; |
| boundColumn.DataFormatString = "{0:C0}"; |
| } |
| else |
| { |
| boundColumn.DataFormatString = "{0:P0}"; |
| } |
| } |
| } |
| } |
Please help me to resolve this issue.
Thanks, Mulagundla Please help me to resolve this issue.Thanks, Mulagundla