This question is locked. New answers and comments are not allowed.
Hi All,
I m running into an issue with a GridviewDataColumn and Check box template on the RadGridView.
I have two check boxes on the RadGridView as Check box Datatemplate on GridviewDataColumn and i need to enable or disable the 2ns check box when the first one is checked ...and also i need to update the database with these two boolean flags when i lose the focus of the row..... let me put some code now.... I also wanted to use
and also i have checkedchanged events to toggle the checkboxes....... adding the code for that
But now how do i call the rROWENDEDIT EVENT TO SAVE THE DATA......(object sender, GridViewRowEditEndedEventArgs e)
I m running into an issue with a GridviewDataColumn and Check box template on the RadGridView.
I have two check boxes on the RadGridView as Check box Datatemplate on GridviewDataColumn and i need to enable or disable the 2ns check box when the first one is checked ...and also i need to update the database with these two boolean flags when i lose the focus of the row..... let me put some code now.... I also wanted to use
RowEditEnded="rgvOtherLienDetailInsurance_rowendedit" to update the database with these checkbox changes.<telerik:RadGridView Visibility="Collapsed" x:Name="rgvOtherLienDetailInsurance" RowEditEnded="rgvOtherLienDetailInsurance_rowendedit" Margin="20,0,20,0" RowLoaded="rgvOtherInsurance_RowLoaded" >.<telerik:RadGridView.Columns><telerik:GridViewDataColumn Width="50" EditTriggers="CellClick" HeaderTextAlignment="Center" DataMemberBinding="{Binding IsSweepLetterSent }" IsReadOnly="True"> <telerik:GridViewDataColumn.CellTemplate> <DataTemplate> <CheckBox IsChecked="{Binding IsSweepLetterSent}" Checked="sls_checked" /> </DataTemplate> </telerik:GridViewDataColumn.CellTemplate> <telerik:GridViewDataColumn.CellEditTemplate> <DataTemplate> <CheckBox IsChecked="{Binding IsSweepLetterSent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged }" Checked="sls_checked" /> </DataTemplate> </telerik:GridViewDataColumn.CellEditTemplate> <telerik:GridViewDataColumn.Header> <TextBlock Text="SS" ToolTipService.ToolTip="Sweeps Letter Sent" ToolTipService.Placement="Top" ></TextBlock> </telerik:GridViewDataColumn.Header> </telerik:GridViewDataColumn> <telerik:GridViewDataColumn Width="50" EditTriggers="CellClick" HeaderTextAlignment="Center" DataMemberBinding="{Binding IsSweepLetterReceived}" IsReadOnly="True"> <telerik:GridViewDataColumn.CellTemplate> <DataTemplate> <CheckBox IsChecked="{Binding IsSweepLetterReceived, Mode=TwoWay}" Checked="slr_checked" /> </DataTemplate> </telerik:GridViewDataColumn.CellTemplate> <telerik:GridViewDataColumn.CellEditTemplate> <DataTemplate> <CheckBox IsChecked="{Binding IsSweepLetterReceived, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Click="slr_checked" /> </DataTemplate> </telerik:GridViewDataColumn.CellEditTemplate> <telerik:GridViewDataColumn.Header> <TextBlock Text="SR" ToolTipService.ToolTip="Sweeps Letter Received" ToolTipService.Placement="Top" ></TextBlock> </telerik:GridViewDataColumn.Header> </telerik:GridViewDataColumn> <telerik:GridViewCheckBoxColumn Width="60" AutoSelectOnEdit="True" EditTriggers="CellClick" HeaderTextAlignment="Center" DataMemberBinding="{Binding IsConditionalDemandLetterSent}" IsReadOnly="False"> <telerik:GridViewCheckBoxColumn.Header> <TextBlock Text="C1S" ToolTipService.ToolTip="Conditional Demand Letter Sent" ToolTipService.Placement="Top" ></TextBlock> </telerik:GridViewCheckBoxColumn.Header> </telerik:GridViewCheckBoxColumn>private void sls_checked(object sender, RoutedEventArgs e) { var parent = (sender as CheckBox).ParentOfType<GridViewRow>(); if (parent.Cells[6].Column.UniqueName == "IsSweepLetterSent") { ((CheckBox)parent.Cells[6].Content).Unchecked+=new RoutedEventHandler(CheckboxUnchecked); ((CheckBox)parent.Cells[6].Content).Checked+=new RoutedEventHandler(CheckboxChecked); } }