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
When we click the "Reset" link on the context menu from a WebGridColumn, the InitializePostBack event is handled but there is seemingly no way to tell the difference between a "Reset" and a scenario where the user manually adds or removes individual columns and hits "Apply Changes." I would like to override the "Reset" so that, instead of resetting based on the changes that the user has made during their visit to the page, we reset their column preferences, which we track in an xml file. So, when the grid is loaded, we configure the column order and visibility based on preferences that they have saved in an xml file. When they hit "Reset," we'd like to eliminate those preferences and load the grid based on the columns that we define in the .aspx file. How could we do this when the Reset link is clicked?
Thanks,
Brad
Hello,
Unfortunately, It could not be done for now. All the behaviour add column and reset, are the same response. There is no way to change it.
Regards,Handy
Hello Brad,
May I know how do you save your preferences in xml file?
In my simple case, I am using SaveTablesStructure. User can save their column change. But no matter, click on Reset, the columns would not be changed after first load. WebGrid would assume the first load columns structures as default.
e.g
first load show 4 columns instead 8 columns at total. When click on reset, nothing changed.try to select more columns via header context menu. e.g 6.When Columns changed to 6. the structure is saved. But if we click reset, WebGrid would go back into 4 columns and at this rate, the structure is also saved.
Hi Handy,
We're saving the column preferences in our own xml file that is pretty straightforward, we have the report in question, a list of columns, and whether the user has indicated that they ought to be visible or hidden.
When we load a report, we inspect that file and it overrides whatever might be in the WebGrid column definition on the aspx page. So, we might have eight columns, all of which are designated as visible in our aspx file. But, when the user removes columns and moves them around, their column preferences are changed in the xml file and that is what is used to determine the columns which are loaded.
So, say we have eight columns defined, the user removes two, completes her task and closes her browser. She comes back the next day and when the report is loaded, only six columns are loaded. At this point, if she hits "Reset," she might think that she will get the other two columns back, but she won't. If she removes two more and, in the same session, hits "Reset," then she'll be back to six but she can't get back to eight without manually adding them back. So, what I'm saying is that we'd like to handle the "Reset" postback so that we can eliminate their column preferences altogether but I cannot figure out the difference between a reset call and a normal, manual, column change. Is there some way to determine whether the postback is a reset or if it is just a normal, user, column change?
Yes, that is what I tried to explain before. Unfortunately, it seems no other way. That's happened because the current structure is overriden by the structure in your xml. That's why after you removed/added the columns and hit reset, it would revert back into the columns in xml.
I understand why the issue is happening. My questions remains: Is there a way to determine whether or not the InitializePostBack which originates from the user hitting "Reset" is different from a manual column change? I would like to eliminate the user's preferences when the user clicks the Reset and go back to the specs in the .aspx file but since the Reset results in a PostBackAction of "ColumnChange" rather than, say, "Reset," I don't have a way to know when they're resetting.
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