Hi,
I am using Infragistics WebDataGrid in asp.net application. The webdatagrid is bound to the dataset and this dataset is populated with the stored procedure result. The columns in the webdatagrid depends upon the resultset columns sent by the stored procedure.
I am facing a issue here. I need to rename some of the columns. I don't want the change the stored procedure and would like to do this in the aspx form itself. Is there any webdatagrid event, which I need to implement in order to accomplish this task.
Thanks
Prashant
Hello,
There are several ways to change the name of the column after binding to a DataSource. You could set via the markup like : <ig:BoundDataField DataFieldName="Name" Key="LinkCol" HtmlEncode="true"> <Header Text="Changed_ViaMarkup"> </Header> </ig:BoundDataField>
You could also do it ServerSide handling PreRender, like:
BoundDataField ColumnName = (BoundDataField)WebDataGrid1.Columns.FromKey("LinkCol");
ColumnName.Header.Text = "Changed_ViaServerSide";
I have attached a code sample representing these scenarios. Please contact me if further support is needed.
I was just wondering did you have a chance to try my suggestion. If you still need any assistance on the matter, please do not hesitate to ask.