Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing checkboxes in a grouped vb.net datagrid
    primarykey
    data
    text
    <p>I have three kind of separate checkbox questions, all related to their use in the same datagrid.</p> <ol> <li><p>I've loaded a datatable, <code>dtAll</code>, into a datagrid, <code>dgdList</code>, and bound each column to the imported data. The datagrid also has an initial column with checkboxes. How can I determine which rows of data have been checked. The intended functionality is for a user to mark two duplicates and merge together. I need to be able to gather row data from the datatable or datagrid whenever the checkbox column is checked</p></li> <li><p>When I group my datagrid into tables, below, it somehow turns off my ability to check more than one checkbox. Everytime i select a new row, it clears all previous checkboxes. I would like to be able to check boxes in multiple rows. (Further, I have to click twice, once to select the row, once to edit the value of the checkbox to true - it would be great if I could do it in a single click).</p> <pre class="lang-vb prettyprint-override"><code>Dim myView As System.ComponentModel.ICollectionView myView = CollectionViewSource.GetDefaultView(dtAll) myView.GroupDescriptions.Add(New PropertyGroupDescription("GROUP ID")) dgdList.ItemsSource = dtAll.DefaultView </code></pre></li> <li><p>I've added a checkbox to the group header. When clicked, I'd like it to fill in each checkbox in all the rows inside of that group. Is there any way I can do this as well? If it helps, below is the Xaml code I'm using to split up groups of records</p> <pre class="lang-xml prettyprint-override"><code> &lt;DataGrid.GroupStyle&gt; &lt;GroupStyle&gt; &lt;GroupStyle.HeaderTemplate&gt; &lt;DataTemplate&gt; &lt;StackPanel&gt; &lt;TextBlock Text="{Binding Path=Name}" /&gt; &lt;/StackPanel&gt; &lt;/DataTemplate&gt; &lt;/GroupStyle.HeaderTemplate&gt; &lt;GroupStyle.ContainerStyle&gt; &lt;Style TargetType="{x:Type GroupItem}" x:Name="Style1"&gt; &lt;Setter Property="Template" x:Name="Setter1"&gt; &lt;Setter.Value&gt; &lt;ControlTemplate TargetType="{x:Type GroupItem}" x:Name="ControlTemplate1"&gt; &lt;Expander IsExpanded="True" Name="Expander1"&gt; &lt;Expander.Header&gt; &lt;StackPanel Orientation="Horizontal"&gt; &lt;CheckBox Name="CheckBox9" /&gt; &lt;TextBlock Text=" Exact Name Match Group #"/&gt; &lt;TextBlock Text="{Binding Path=Name}" /&gt; &lt;/StackPanel&gt; &lt;/Expander.Header&gt; &lt;ItemsPresenter /&gt; &lt;/Expander&gt; &lt;/ControlTemplate&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;/Style&gt; &lt;/GroupStyle.ContainerStyle&gt; &lt;/GroupStyle&gt; &lt;/DataGrid.GroupStyle&gt; </code></pre></li> </ol>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload