iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
clsExtractManager.Save(CInt(keyValue), "Sideline", True, intUserID)
Next
WebGrid1.Databind()
Infact only Webgrid1.ClientAction.Refresh() is required. First you need to check if this event is working or not. If the refresh is working then page will load once again asynchronously and go through the webgrid initialise event once again and rebinding takes place. If you are getting a postback then you try James's method. And if you are using Webgrid1.ClientAction.Refresh() or WebGrid1.ClientAction.RefreshAll() then you dont need to apply neither WebGrid1.ClearCachedDataSource() nor WebGrid1.RebindDataSource().Anyway check if the refresh is causing asynchronous postback. And are you using Initialisedatasource event of webgrid? It's true, everytime you do WebGrid1.ClientAction.Refresh() then the grid will called the InitializeDataSource event. The important thing is you always need to put your binding method inside InitializeDataSource event, therefore everytime you do Refresh() the InitializeDataSource event triggered.One more thing RefreshAll used to refresh the data and structure of the grid, if you only need to get the changes in data then you only need to have Refresh()Anyway check if the refresh is causing asynchronous postback. And are you using Initialisedatasource event of webgrid?
Infact only Webgrid1.ClientAction.Refresh() is required. First you need to check if this event is working or not. If the refresh is working then page will load once again asynchronously and go through the webgrid initialise event once again and rebinding takes place. If you are getting a postback then you try James's method. And if you are using Webgrid1.ClientAction.Refresh() or WebGrid1.ClientAction.RefreshAll() then you dont need to apply neither WebGrid1.ClearCachedDataSource() nor WebGrid1.RebindDataSource().Anyway check if the refresh is causing asynchronous postback. And are you using Initialisedatasource event of webgrid? It's true, everytime you do WebGrid1.ClientAction.Refresh() then the grid will called the InitializeDataSource event. The important thing is you always need to put your binding method inside InitializeDataSource event, therefore everytime you do Refresh() the InitializeDataSource event triggered.One more thing RefreshAll used to refresh the data and structure of the grid, if you only need to get the changes in data then you only need to have Refresh()
Anyway check if the refresh is causing asynchronous postback. And are you using Initialisedatasource event of webgrid?
It's true, everytime you do WebGrid1.ClientAction.Refresh() then the grid will called the InitializeDataSource event. The important thing is you always need to put your binding method inside InitializeDataSource event, therefore everytime you do Refresh() the InitializeDataSource event triggered.
One more thing RefreshAll used to refresh the data and structure of the grid, if you only need to get the changes in data then you only need to have Refresh()
Am using Webgrid1.ClientAction.Refresh() from server side to refresh Webgrid with updated values.This could be done just after your save method. Or try Webgrid1.RebindDatasource(). Am not sure about the second option though....
Tried both your ideas, looked promising but no effect.
I also tried the folowing, hoping for some refresh to take place but to no avail.
Interestingly when I page forward then back the items are gone.
WebGrid1.ClearCachedDataSource()
WebGrid1.RebindDataSource()
WebGrid1.ClientAction.RefreshAll()
Surely I am just missing a grid refresh or something?
When your Save function is called via the button, does it perform full postback or AJAX (FlyPostBack)?
The ClientAction will work only in FlyPostBack context. If your page is using full postback, try to use Page.RegisterClientScriptBlock and emit a javascript function to perform grid's Refresh method in the client side.
However, for better user experience, I think you may want to try using FlyPostBack mode (this can be easily achieved if you're using Intersoft WebButton control) to delete something in database then refresh the Grid without full page refresh.
Hope this helps.
Infact only Webgrid1.ClientAction.Refresh() is required. First you need to check if this event is working or not. If the refresh is working then page will load once again asynchronously and go through the webgrid initialise event once again and rebinding takes place. If you are getting a postback then you try James's method. And if you are using Webgrid1.ClientAction.Refresh() or WebGrid1.ClientAction.RefreshAll() then you dont need to apply neither WebGrid1.ClearCachedDataSource() nor WebGrid1.RebindDataSource().
@Gordon:- Concider the fact that i have 5 webgrids in my webpage and the user is updating each 5 webgrids. And am doing the save in a single click. But to reflect changes of these webgrids, i have to call the refresh method of these 5 webgrids. Means 5 asynchronous postbacks. That means heavy load. Is there any alternative?
Actually it depends on your scenario.
1. If you edit using inline editing at WebGrid then you didn't need to refresh the grid, because the grid allready get the changes that you do.
2. You can use our batch update, the user can modify the data at 5 WebGrid that you have and use button click to get all the changes and modify in database. You didn't need to refresh the grid.
3. If you update the data directly in database, then definetely you need to refresh the grid because WebGrid didn't know which changes has been made in the database without refreshing it.
@Gordon:- But my real question is not that. The question is about the heavyload of 5 asynchronous postbacks. Infact the method Rebinddatasource casues the initialisedatasource event to work. So why it cant update the UI. And the rebinddatasource method is not causing no asynchronous postback(if i am right). So is there a way by which i could tell that these are the webgrids need to be refreshed and cause only one asynchronous postback? I mean those webgrids are refreshed at once....
Hi,
I have discussed this with our development team they said that it's not possible because WebGrid is naturally designed as an component instance, so each AJAX request should also follow the same discipline. Otherwise, how can the server-side knows which WebGrid is performing refresh (if all requests are combined).
Best Regards,
Gordon Tumewu
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname