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
HelloWe are using WebGrid version 6 and want to find out how to persist checked rows across postbacks. problem 1:When we use the Ctrl key to multiselect rows, it will only select the second row the second time around. For example, select a first row by left clicking with the mouse, then hold the ctrl key down and left click another row. Only one row will be selected where I would expect 2 rows to be selected by now. Repeat the procedure and it works.problem 2:At present, when we use the Ctrl key to multi select rows, they turn the colour we expect (disregarding problem 1). However, when we move to page 2 of the grid and then move back to page one, the checked row colours have disappeared from the first page. We need to find out how to persist checked rows irrespective of which page numbers we visit. We have set PersistRowChecker="true"which I assumed would do the trick.
Below is a snippet of the main codeMany thanks in advance
<iswebgrid:webgrid id="WebGridMain" runat="server" allowautodatacaching="false" onexport="WebGridMain_Export" onupdaterow="WebGridMain_UpdateRow" OnInitializeDataSource="WebGridMain_InitializeDataSource" OnPrepareDataBinding="WebGridMain_PrepareDataBinding" > <LayoutSettings AllowColumnFreezing="Yes" AllowMultipleSelection="Yes" AllowContextMenu="true" PersistRowChecker="true" AllowDelete="Yes" AllowEdit="Yes" AllowExport="Yes" AllowFilter="Yes" AllowSorting="Yes" AlwaysShowHelpButton="False" HeaderClickAction="SortMulti" AutoHeight="true" FocusNewRowOnLastCell="True" GridLineColor="#DCB0C8" GridLines="Vertical" CellPaddingDefault="5" PagingMode="ClassicPaging" PagingExportMode ="ExportAllData" PagingSize="25" PagingLoadMode="Automatic" PagingStyleUI="FirstPrevNextLast"> <FreezePaneSettings AbsoluteScrolling="true" ShowInContextMenu="True" /> <SelectedRowStyle BackColor="Blue" ForeColor="White" /> <CheckedRowStyle BackColor="Red" ForeColor="White"></CheckedRowStyle> <various styles etc..............> </LayoutSettings> </iswebgrid:webgrid>/// <summary>/// Populate the grid with the correct data/// </summary>protected void WebGridMain_InitializeDataSource(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e){ // Fill in the grid datasource e.DataSource = GridManager.PopulateGridData(...); // Set gridcolumn width, types, captions etc GridManager.PopulateGridColumns(...);} protected void WebGridMain_PrepareDataBinding(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e){ if (!IsPostBack) { WebGridMain.RetrieveStructure(); }}
Below is my response of your problems.
Problem 1:
WebGrid has two ways to allow users to perform multiple row selection. The first is using IsRowChecker feature and the later one is using AllowMultipleSelection feature.
AllowMultipleSelection property can’t be used alongside with RowChecker feature, as both features will cause conflict and undesired effect to the selection result. You should enable only RowChecker feature (which used checkbox) or the multiple row selection features (that allow selecting multiple rows without using checkbox and perform multiple row selection by using the user-friendly Ctrl and Shift key combination) at a time.
Please ensure that RowChecker feature is not enabled when using multiple row selection feature and vice versa.
I was unable to repro the multiple row selection issue on my end. I created a simple page (the test page is enclosed as attachment) in order to test the multiple row selection issue using WebGrid 6 build 218 and WebUI.NET Framework 3.0 build 751.
Please let me know the build number of your WebGrid 6 and WebUI.NET Framework 3.0. You may also modify the attached sample so that it replicates your issue and then send back the sample to us for further investigation.
Problem 2:
In order to preserve checked/selected rows on FlyPostBack™ action please set the value of RestoreRowSelection property. This property has four possible values:
Hope this helps.
Hi YudiThanks for the response. I installed your sample and it works to an extent in IE.However, even in your sample, after a postback, rows which were selected cannot now be de-selected again. Is there a way to enable the rows to be deselected anfter a postback has occurred?Also, the sample only works in IE and not Firefox - does it not support firefox?From our assembly references:ISNet : v3.0.5000.1ISNet.WebUI : v3.0.5000.1ISNet.WebUI.WebGrid : v6.0.7200.213Thanks AgainRob
I was able to repro three issues that you were reported.
...We are using WebGrid version 6 and want to find out how to persist checked rows across postbacks. problem 1:When we use the Ctrl key to multiselect rows, it will only select the second row the second time around. For example, select a first row by left clicking with the mouse, then hold the ctrl key down and left click another row. Only one row will be selected where I would expect 2 rows to be selected by now. Repeat the procedure and it works....
...Is there a way to enable the rows to be deselected anfter a postback has occurred?...
...the sample only works in IE and not Firefox - does it not support firefox?...
These minor glitches has been forwarded to WebGrid development team to be fixed. A work item, work item #600, has been submitted regarding these minor issues.
I’ll keep you updated with any news I heard from the team regarding the work item. We’re greatly appreciating this valuable feedback about MultipleRowSelection feature.
Thank you very much.
I’d like inform you about the status of work item #600.
WebGrid development team has managed to get the issues fixed in WebGrid 7. This fix is not going to be available in WebGrid 6 since there are too many dependencies on the changes that require new architecture of WebGrid 7.
Please try to upgrade to WebGrid 7 and let us know your response.
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