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 All
I would like to ask a question about creating a webgrid matrix in unbound mode that has dynamically allocated columns and rows, that will be displayed in checkbox form. I have been trying to get this right for some time now, but cannot find anything that shows me how to get a select all button to do just that within a grid. Any Ideas would be much appreciated.
Thanks
Daniel
Hi Daniel,
Could you be more specific in your scenario? I already created a WebGrid unbound with using ISRowChecker column. Please let me know if this what you are looking for or not.
Regards,Handy
Hi Handy
I have used the row checker on many occasions and it is an awesome feature, but it is not the problem.
I have a table that is populated with boolean values. Along the x axis I have lets say stores and on the y axis users. I wish to be able to load them into a grid and be able to manipulate the boolean values with checkboxes, after which I will save the userstore matrix back to the table.
Let me know if this helps
Yes, you can have checkbox edit type for your boolean value. Attached sample will show you that. After you changed the value, it would automatically save into database. Please let me know if this is what you are looking for or not.
I have solved my problem. I have used the edit type checkbox, but found my main issue was with the columns, and the layout settings that needed to be tweeked. Thanks for the help though.
If you dont mind can I ask you another question on the webgrid, in that the grid is rendering as a control in the page, but the grid is coming up 'minimised' with data in it. Is there something I am missing.
have included the two grid render and also the grids code + the skin for those grids
Table Code and grid code:
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%; table-layout: fixed;"> <tr> <td style="height: 50%"> <ISWebGrid:WebGrid ID="grdMaint" runat="server" SkinID="MaintenanceGrid"> <RootTable Caption="Maintenance" DataKeyField="RoleID" GridLineStyle="NotSet" AllowSorting="No" AllowEdit="Yes" DataMember="Roles"> <Columns> <ISWebGrid:WebGridColumn Caption="Role ID" DataMember="RoleID" EditType="NoEdit" Name="RoleID" Visible="False" Width="0px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn AllowGrouping="No" AllowSizing="No" AllowSorting="No" Bound="True" Caption="Selected" ColumnType="CheckBox" DataMember="Active" DataType="System.Boolean" EditType="NoEdit" IsRowChecker="True" Name="IsSelected" ShowInSelectColumns="No" Width="50px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Role Name" DataMember="RoleDescr" Name="RoleDescr" Width="100%" EditType="NoEdit"> </ISWebGrid:WebGridColumn> </Columns> </RootTable> </ISWebGrid:WebGrid> </td> </tr> <tr id="rowGrid2"> <!-- this row containing the 2nd grid will be hidden i fnot required --> <td style="height: 50%"> <ISWebGrid:WebGrid ID="grdMaint2" runat="server" SkinID="MaintenanceGrid" Height="100%"> <RootTable Caption="Maintenance" DataKeyField="StoreNumber" GridLineStyle="NotSet" AllowSorting="No" AllowEdit="Yes" DataMember="Stores"> <Columns> <ISWebGrid:WebGridColumn AllowGrouping="No" AllowSizing="No" AllowSorting="No" Bound="True" Caption="Selected" ColumnType="CheckBox" DataMember="Active" DataType="System.Boolean" EditType="NoEdit" IsRowChecker="True" Name="IsSelected" ShowInSelectColumns="No" Width="50px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Store Number" DataMember="StoreNumber" Name="StoreNumber" Width="100px" EditType="NoEdit"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Store Name" DataMember="StoreName" Name="StoreName" Width="400px" EditType="NoEdit"> </ISWebGrid:WebGridColumn> </Columns> </RootTable> </ISWebGrid:WebGrid> </td> </tr> </table>
Skin Code:
<ISWebGrid:WebGrid SkinID="MaintenanceGrid" runat="server" HorizontalAlign="NotSet" DataCacheStorage="Session" ViewStateStorage="None" Width="100%" Height="100%"> <FlyPostBackSettings PostInputControls="True" /> <LayoutSettings AllowEdit="Yes" AlternatingColors="True" AlwaysShowHelpButton="false" EditOnClick="true" ShowRefreshButton="False" AutoFitColumns="True" CellPaddingDefault="2" GridLineColor="237, 237, 237" GridLineStyle="Solid" HeaderClickAction="SortMulti" HideColumnsWhenGrouped="No" NewRowLostFocusAction="AlwaysPrompt" RowHeightDefault="18px" RowLostFocusAction="AlwaysUpdate" PagingMode="None" PersistRowChecker="false" InProgressUIBehavior="ChangeCursorToHourGlass" HelpURL="/DolfinLiveHelp/DolfinLive.html?grid.htm"> <HeaderStyle CssClass="Header" /> <GroupRowInfoStyle CssClass="GroupRow" /> <EditTextboxStyle CssClass="EditTextbox" /> <FrameStyle CssClass="Frame" /> <SelectedRowStyle CssClass="SelectedRow" /> <AlternatingRowStyle CssClass="AltRow" /> <EditFocusCellStyle CssClass="EditFocusCell" /> <RowHeaderStyle CssClass="RowHeader" /> <StatusBarStyle CssClass="StatusBar" /> <RowStyle CssClass="Row" /> <NewRowStyle CssClass="NewRow" /> </LayoutSettings></ISWebGrid:WebGrid>
As i can see in your screenshot, the grids layout is not fit the container. Did this happen on page load or when you resize the grid? If yes, please use these code at resize or onLoad event.
e.g
function window::onresize() { window.setTimeout(function(){wgDoResize(true,true);},100); }
Hope this helps. Please create a new thread regarding new question or issue next time. Thanks
Thanks will try that, and will remember to do that next time
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