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
Hi,
Sorry if this page already exists, but I have searched the Community pages for similar threads and couldn't find. So, I have started new.
I have a webgrid which I'ld like to auto save the changes just like Excel. 'Accept All changes' is great but I'ld like this better.
Also, the Data Source for the grid is a SQL Data Source for which there are no server-side codes for initializing the source or updations to DB. Now, what I want is like the when the WebTab switches back(you can say, on Page Loading), the Grid refreshes (as the other tabs might change the basic criteria in the DB) without clicking on 'Refresh' button. Is this possible?
It is possible to refresh WebGrid without clicking on 'Refresh' button. You can try to use following snippet code in JS function.
function RefreshWebGrid() { // retrieves WebGrid's object var grid = ISGetObject("WebGrid1"); // This method will refresh only the data. grid.Refresh(); // This method will refresh the whole grid, including the grid structure. // For instance, if the column structure has changed, // the changes will be picked up upon calling this method. //grid.RefreshAll(); return true; }
Or use following snippet code in code behind.
protected void Page_Load(object sender, EventArgs e) { WebGrid1.ClientAction.Refresh(); //WebGrid1.ClientAction.RefreshAll(); }
Hope this help.
Hi Yudi,
Thanks for the code. My problem is this: I have a master tab('MTab') inside which I have another Tab('ATab'). ATab contains the Grid which needs to be refreshed every time, either ATab or MTab is switched.
Thus, on these switches, with the Grid Page Tab active, the Grid/Page does not go to Page Load. This renders the "Refresh" function call useless. I might need an event on webtab change which refreshes the Grid Data. But I am not sure how to go about it as these tabs are not connected like "master" - "content" page to retrieve the Grid Object ID.
I appreciate all the help about this as well as the other issues. Thanks!
WebTab has OnAfterTabChanged client-side event. It specifies the client-side function to be invoked after client changed the tab.
Example:
// This function is called when active tab has changed function OnAfterTabChanged(controlId, tabItem) { //RefreshWebGrid(); }
I'm willing to advise you further but in order to do so I would need you to elaborate on your specific scenario and possibly give me an information about the ContentMode of the WebTab that I can use to create a sample page based on your description.
Thanks for your reply. I've succesfully implemented OnAfterTabChanged client-side event and reloaded the page itself thus the grid is refreshed automatically.
I also would like to know if there is any way of implementing Excel-like save for the grid without the 'Accept All Changes' button in th Grid?
Thanks once again for the help.
Could you please provide me with more information regarding the requirement to implement Excel-like save for the grid without the 'Accept All Changes' button in WebGrid?
SmartBatchUpdate is a feature which enables you to perform multiple edits across multiple tables in real-time without postback/callback. All pending changes will be submitted into server at once with a single AJAX callback. In my opinion, this editing experience is similar with Excel.
I'm sure that there must be something that I might miss to implement your required scenario.
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