I built a new page using my company’s JQueryGridView class that extends the base GridView class. The grid needs to display data when the page loads, but this isn’t happening for a reason I suspect is related to the timing of the DataBind() and the JQueryGridView actually being built. We are using ASP .NET.
We use this JQueryGridView several places in our system. I partnered with a senior dev to make sure everything is set up correctly and it is. Based on the grid not displaying data our hypothesis is that the DataBind is happening before the JQueryGridView is finished initializing.
At first I had a call to the method that sets the Data Source and Binds the data in page_load. When the grid didn’t display data I tried putting the bind data method call in page_prerender, page_init, and page_render, but every time the grid doesn’t display the data.
The reason I think it’s an issue with order of operations is I added a button to the page. When clicked this button simply calls the bind data method I tried calling in the page methods above. The button click works as expected and the Grid displays data as expected.
AlexBell is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2