Hi all,
<igDP:Field Name="IsSelected" Label=""> <igDP:Field.Settings> <igDP:FieldSettings CellContentAlignment="LabelAboveValueAlignCenter" LabelMaxWidth="30" AllowEdit="True" LabelMinWidth="30" LabelWidth="30" CellMaxWidth="30" CellMinWidth="30" CellWidth="30" CellClickAction="EnterEditModeIfAllowed"> <igDP:FieldSettings.CellValuePresenterStyle> <Style TargetType="{x:Type igDP:CellValuePresenter}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}"> <CheckBox IsChecked="{Binding Path=DataItem.IsSelected, Mode=TwoWay}" x:Name= "ChkSelected" Unchecked="ChkSelected_UnChecked" Checked="ChkSelected_Checked" HorizontalAlignment="Center" VerticalAlignment="Center" Content="" ></CheckBox> </ControlTemplate> </Setter.Value> </Setter> </Style> </igDP:FieldSettings.CellValuePresenterStyle>
<igDP:FieldSettings.LabelPresenterStyle > <Style TargetType="{x:Type igDP:LabelPresenter}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igDP:LabelPresenter}" > <StackPanel Orientation="Horizontal" > <Label Content=""></Label> <CheckBox x:Uid="chkAll" Checked="Chkall_Checked" Visibility="Collapsed" HorizontalAlignment="Center" VerticalAlignment="Center" ></CheckBox> </StackPanel> </ControlTemplate> </Setter.Value> </Setter> </Style> </igDP:FieldSettings.LabelPresenterStyle> </igDP:FieldSettings> </igDP:Field.Settings> </igDP:Field>
I binded my xam grid witha datatable and i want to check all all the isselected field in my grid when i clcik the checkbox..
grid bind ::
string strQuery = "select 'false' as IsSelected ,name from table )
i filled this query and thro adapter i have filled the datatable
grdApplet.DataSource = dtUserApplets.DefaultView;
in chkall_checked i have written the code but it is not wrking
foreach(datarecord dgin grduser.records)
{
dg.cells[:isselected"].Value=true;
grduser.updatelayout();
(it is changing in grid)
}
pls can anyone help how to make all the values in isselected fiels as truewhen i clcick the check box
can any one code and give me..
Hello,
I was wondering if the solution offered by another user worked well for you.
Another alternate solution would be to interate through all the relevant fields in the DataTable itself and modify the field there. Since the XamDataGrid is coupled to the DataTable, the UI would update dynamically.
Thank you,