I am using a web datagrid for which few column header text is set at server side. Recently we upgraded to Infragistics 14.2 and this is what is causing our issue. Till date, the headers used to get loaded on loading the data grid for the very first time with the previous versions of Infragistics. But after upgrading to latest version, the header text that is set on the server side is not getting loaded but the header text that is specified on the design page is getting loaded. After performing a sort or refreshing the datagrid, then the headers that are set on server side(code behind page) is getting loaded.
Please suggest me as to what might be causing the issue.
Hello Ashwini,
Thank you for contacting Infragistics!
I have done some looking into this matter and have created a sample to attempt to reproduce this behavior. I have done so using version v14.2.20142.2317. With this sample I have been unable to reproduce the behavior you describe. I have some follow up questions concerning this matter.
What service release are you using for v14.2?What browsers do you see this behavior?Where/how are you changing the header text of the columns?Do you have an isolated sample that reproduces this behavior?
Looking forward to hearing from you.
Hi Mike,
Thanks for you reply.
Please find the below details:
1. We are using the version v14.2.20142.2317 with latest service release.
2. We are able to see this behavior in IE since our application runs only with IE browser.
3. Header text of the columns are changed in the server side code. A user defined function is called in which we are trying to set the header text.
4. Sample code is as follows.
<ig:WebDatagrid id="dgrtest" runat="server" autogeneratecolumns="False" ClientIDmode="Static" datakeyfields="empid" enabledataviewstate="true">
<columns>
<ig:WebDatagrid:bounddatafield datafieldname="empid" key="empid" hidden="true">
</ig:WebDatagrid:bounddatafield>
<ig:WebDatagrid:bounddatafield datafieldname="empname" key="empname" htmlencode="false">
<header text="Name" />
</ig:WebDatagrid:bounddatafield >
<ig:WebDatagrid:bounddatafield datafieldname="empsal" key="empsal">
</columns>
</ig:WebDatagrid>
Public Sub Loaddata()
Dim dt as Datatable
dt=ds.tables(0) //sample code given here, in application data is fetched from SP and saved in dt
Dim keys(1) as datacolumn
keys(0) = dt.columns("empid")
dt.Primarykey = keys
dgrtest.datasource = dt
dgrtest.databind()
dgrtest.columns("empsal").header.text = "Salary"
End Sub
As shown in above sample code, header text is displayed for the column Name which is set on HTML page only and header text for column Salary is not set on loading the datagrid on the first go. After refreshing the page or sorting the columns, header text for Salary is been set.
Thank you for the update. I have modified my sample based on the code and description you have provided. I have still been unable to reproduce this behavior. I am attaching my sample to this thread, note I have removed the bin and ig_res folder so you will want to add those back.
What do you see when you run my sample?
Please provide me with an isolated sample that reproduces this behavior so I may look further into this matter.
Thanks for the update and also the piece of code you provided. Sorry for delay in response.
I was able to run the code that you have provided successfully. Also even I was able to create similar code and run it without nay issues. But actually, the code where I am facing the issue is in a Web usercontrol which is used in an Web form.
I am not sure are we facing the issue while updating the control to the parent page.
The header issue is still persisting. Any other suggestions would surely help.
Heyy Mike,
Thanks a lot for your constant support. We are able to resolve the issue.
The resolution identified is :
For latest version of Infragistics, header caption has to be set in Databound event of the datagrid. Previously, a user defined function was used for setting the headers which was referenced as usercontrol.Loaddata() and calling in such a way was not allowing to display the header text for first time the grid was loaded.