Hi,
Can anyone tell me how to refresh a grid which is being populated by using InitializeDataSource?
I've used LoadOnDemand="xml" and trying to bind my grid in a method which I am calling in InitializeDataSource. But, when some action is taken on the screen, I need to refresh the grid for which I tried calling my method to bind the grid again. It's not working. I even tried explicity calling InitializeDataSource which didn't work.
I really need the refresh feature to work according to the requirements. Can someone please help me with some ideas here?
Thanks,
Kala
Kala,
What do you mean by "refresh" in this context? What results are you expecting to get, in response to which actions? If this is server-side processing, is this triggered by a regular postback or an asynchronous callback?
InitializeDataSource is an event, not a method. WebGrid will call it when it needs to, and it can't be directly called. You're likely calling the event handler directly, rather than the event, which won't likely affect your results in the way you're after.
By refresh, I mean processing on server side. Once an aciton is performed by the user in the front end, the rows that he selected should go off. I am already using a postback call to process the records on server side. In this context, the user will be selecting multiple rows by using a checkbox and then ther will be a popup window in which the user selects a user and clicks "save" button in the popup. The server side code for this button performs the fund assignment and at this point of time, we need to refresh the grid with new data. I hope I am being clear with the whole explanation.
How can I achieve this?
Thanks