Click here to Skip to main content
15,913,587 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I created the datatable with checkboxes i.e. I have one check box for each row. I need to know how to select and deselect a particular row and it should be reflected in data table also. Thanks in advance :)
Posted
Updated 3-Apr-10 21:38pm
v2

madhu333 wrote:
I created the datatable with checkboxes


Is this correct? I think you should rephrase your question.
 
Share this answer
 
Hi,Its ma code
XML
<Window x:Class="WpfApplication5.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="300" Width="300">
    <StackPanel Margin="8">
    <ListView
      Name="listView"

      ItemsSource="{Binding}"
      >
      <ListView.View>
        <GridView>
          <GridViewColumn Header="ID" DisplayMemberBinding="{Binding ID}" />
          <GridViewColumn Header="Name" DisplayMemberBinding="{Binding Name}" />
          <GridViewColumn Header="Balance" Width="140">


            <GridViewColumn.CellTemplate>
              <DataTemplate>

                <CheckBox Tag="{Binding}" Name="Complete" IsThreeState="False" Checked="onButtonClick" />


              </DataTemplate>
            </GridViewColumn.CellTemplate>
          </GridViewColumn>
        </GridView>
      </ListView.View>
    </ListView>

    <Button Margin="4,10">GetAllEvents</Button>


  </StackPanel>
</Window>



i created the data table in .cs file
So i havr check box in that data table
if i select that check box i have to select the corresponding row.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900