﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebGrid Enterprise - Checkbox question</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Checkbox-question/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Checkbox question</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Checkbox-question/</link><pubDate>Fri, 12 Feb 2010 05:15:50 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Sorry for the late respond.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;The idea is to create bound columns that really represent the checkbox data.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;So let’s say if you are using data table, then you can add three new boolean columns to the data table. And then assign the data manually to it.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;So you can bind to WebGrid directly as bound column. During update, you can collect the data in UpdateRow event and then call the database method to perform the additional backend operation.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Hope this help.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Checkbox question</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Checkbox-question/</link><pubDate>Tue, 09 Feb 2010 08:22:15 GMT</pubDate><dc:creator>hohenbergerc</dc:creator><description>&lt;p&gt;Here is a screenshot and the code for the page in question.  I've included the calling page also.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Conrad&lt;/p&gt;</description></item><item><title>Checkbox question</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Checkbox-question/</link><pubDate>Tue, 09 Feb 2010 02:07:53 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Is it possible to implement IsRowChecker feature for your scenario?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;When a column has its IsRowChecker property set to True, a few other properties will be automatically configured such as Width to 25px, ColumnType to Checkbox, SelectColumns to No, and so on. The “select/deselect” all checkbox in column Caption is automatically generated for IsRowChecker column. The code for select/deselect all functionality has also been written internally and so you do not have to do anything else, just focus on your business logic.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;In server side event, you can get the rows that being checked by invoking ‘GetCheckedRows()’ method. The method returns ArrayList type value that contains the keyValue of the selected/checked rows.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;ArrayList checkedRows = WebGrid1.RootTable.GetCheckedRows();&lt;/pre&gt;

&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;*If you don’t mind, could you please send us the screenshot of your WebGrid so that I can have clearer view of your requirement?&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Checkbox question</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Checkbox-question/</link><pubDate>Mon, 08 Feb 2010 08:00:17 GMT</pubDate><dc:creator>hohenbergerc</dc:creator><description>&lt;p&gt;Unfortunately it doesn't.  The checkbox can't be bound because the number of checkboxes in dynamic.  Is there another way to accomplish this?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Conrad&lt;/p&gt;</description></item><item><title>Checkbox question</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Checkbox-question/</link><pubDate>Mon, 08 Feb 2010 03:37:50 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;In order to retrieve the checkbox value in UpdateRow event, I suggest you to use bound checkbox column. Using checkbox as the column edit type in unbound mode will not do the trick, since the value will not be transferred because the column is unbound.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Hope this help.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Checkbox question</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Checkbox-question/</link><pubDate>Thu, 04 Feb 2010 08:07:33 GMT</pubDate><dc:creator>hohenbergerc</dc:creator><description>&lt;p&gt;Yudi,&lt;/p&gt;
&lt;p&gt;I apologize for not providing the full scenario.&lt;/p&gt;
&lt;p&gt;I have a WebGrid that I bind to a datasource on the server side.  The user defines how many "loads" they want their order delivered in and I dynamically add that many columns to the grid in the Page_Load server side event.  The user then splits their order by checking the appropriate boxes and I save that data via a server side UpdateRow and a stored procedure because that data is stored in a table that is different from the original datasource.  If the user returns to this page, I need to display what they previously selected, so I select the data from the database in the InitializeRow server side event and set the checkboxes.  The page is displayed correctly with the boxes checked, however, if they check a new box and save that data, the original checked boxes return nothing instead of true.  I hope this helps.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Conrad &lt;/p&gt;</description></item><item><title>Checkbox question</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Checkbox-question/</link><pubDate>Thu, 04 Feb 2010 03:31:57 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;The checkbox value will returns nothing (null) in UpdateRow event because this event is too early. UpdateRow event will come first before InitializeRow event.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Could you please let us know what your scenario is, so that we can assist you to provide workaround for your scenario?&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Checkbox question</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Checkbox-question/</link><pubDate>Wed, 03 Feb 2010 15:05:53 GMT</pubDate><dc:creator>hohenbergerc</dc:creator><description>&lt;p&gt;I've added a checkbox column to my webgrid in server-side code:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;span style="font-size: 13px"&gt;wgCol = &lt;/span&gt;&lt;span style="color: #0000ff; font-size: 13px"&gt;&lt;span style="color: #0000ff; font-size: 13px"&gt;New&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 13px"&gt; WebGridColumn(&lt;/span&gt;&lt;span style="color: #a31515; font-size: 13px"&gt;&lt;span style="color: #a31515; font-size: 13px"&gt;"Load "&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 13px"&gt; &amp; i, &lt;/span&gt;&lt;span style="color: #a31515; font-size: 13px"&gt;&lt;span style="color: #a31515; font-size: 13px"&gt;"Load "&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 13px"&gt; &amp; i) &lt;p&gt;wgCol.DataType = &lt;span style="color: #a31515; font-size: 13px"&gt;&lt;span style="color: #a31515; font-size: 13px"&gt;"System.String"&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;span style="color: #a31515; font-size: 13px"&gt;&lt;span style="color: #a31515; font-size: 13px"&gt;"System.String"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 13px"&gt;&lt;p&gt;wgCol.ColumnType = ColumnType.CheckBox&lt;/p&gt;wgCol.Bound = &lt;/span&gt;&lt;span style="color: #0000ff; font-size: 13px"&gt;&lt;span style="color: #0000ff; font-size: 13px"&gt;False 
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 13px"&gt;&lt;p&gt;WebGrid1.RootTable.Columns.Add(wgCol)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I set the value to True in the &lt;span style="font-size: 13px"&gt;WebGrid1_InitializeRow event:&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size: 13px"&gt;&lt;span style="font-size: 13px"&gt;e.Row.Cells.GetNamedItem(cell).Value = &lt;/span&gt;&lt;span style="color: #0000ff; font-size: 13px"&gt;&lt;span style="color: #0000ff; font-size: 13px"&gt;True 

&lt;/span&gt;&lt;/span&gt;&amp;nbsp; 

&lt;p&gt; When the Page finishes loading, the checkbox is checked, however, when I test the value in an UpdateRow event it returns Nothing.&lt;/p&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size: 13px"&gt;Any help would be greatly appreciated.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 13px"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 13px"&gt;Conrad&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;</description></item></channel></rss>