Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
75
Rename column names in WebDataGrid
posted

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

Parents
  • 10685
    Offline posted

    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.

    WebDataGridLinkColumn.zip
Reply Children
No Data