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,
As we can get access of webgrid applied filter on server and client side, is any specific function(server/client) available which can return resized webgrid columns so it could be save and used to fix the width when user return to that page next time ?
regards
Sachin
... return resized webgrid columns so it could be save and used to fix the width when user return to that page next time...
WebGrid has SaveTablesStructureToXml() method which allows you to save RootTable properties – including its Columns and ChildTables – along with all objects contained to an XML file. The table structure can be applied to WebGrid by using LoadTablesStructureFromXml method. The method will loads table file structure from an XML file and restore it to RootTable of WebGrid.
The snippet code below shows how to save and restore WebGrid's table structure to/from XML file.
protected void Button1_Click(object sender, EventArgs e) { WebGrid1.SaveTablesStructureToXml(Server.MapPath("WebGridTableStructure.xml")); }
protected void Button1_Click(object sender, EventArgs e) { WebGrid1.LoadTablesStructureFromXml(Server.MapPath("WebGridTableStructure.xml")); }
Alternatively, you can save the structure to memorystream by invoking SaveTablesStructure() method.
protected void Button1_Click(object sender, EventArgs e) { MemoryStream ms = new MemoryStream(); WebGrid1.SaveTablesStructure(ms); Session["wgState"] = ms; }
Then load it by invoking LoadTablesStructure() method.
protected void Button2_Click(object sender, EventArgs e) { // retrieve the saved state object state = Session["wgState"]; if (state != null) { MemoryStream ms = (MemoryStream)state; ms.Seek(0, SeekOrigin.Begin); WebGrid1.LoadTablesStructure(ms); WebGrid1.RebindDataSource(); } }
Hope this helps.
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