Click here to Skip to main content
14,735,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
telerik, RadGridView, GroupDescriptors i have been to use 👇. But in CellEditEnded automatically change position for current using row, How Do


What I have tried:

<telerik:RadGridView Grid.Row="2" Grid.ColumnSpan="6" Grid.RowSpan="1" x:Name="gvUnderCarrierPMS" Style="{StaticResource RadGridViewInnerColorStyle}" CellEditEnded="gvUnderCarrierPMS_CellEditEnded" RowEditEnded="gvUnderCarrierPMS_RowEditEnded"    Deleted="gvUnderCarrierPMS_Deleted" Deleting="gvInnerGrid_Deleting" FilterOperatorsLoading="gvUnderCarrierPMS_FilterOperatorsLoading" AlternationCount="0" RowIndicatorVisibility="Collapsed" AlternateRowBackground="White">

                                      <telerik:RadGridView.GroupDescriptors >
                                          <telerik:GroupDescriptor Member="Type" x:Name="SalesManGDNameB" DisplayContent="Type" >
                                          </telerik:GroupDescriptor>
                                      </telerik:RadGridView.GroupDescriptors>

                                      <telerik:RadGridView.Columns>

                                          <telerik:GridViewDataColumn Header="Sl No" IsVisible="False"
                                              HeaderTextAlignment="Center"
                                              IsFilterable="True"
                                              IsReadOnly="True"
                                              IsSortable="False"
                                              MinWidth="50" Width="50"
                                              TextAlignment="Center"
                                              DataMemberBinding="{Binding SlNo}" />

                                          <telerik:GridViewDataColumn Header="Type" IsVisible="False"
                                              HeaderTextAlignment="Center"

                                              IsFilterable="True"
                                              IsReadOnly="True"
                                              IsSortable="False"
                                              MinWidth="120" Width="120"
                                              TextAlignment="Center"
                                              DataMemberBinding="{Binding Type}" />

                                          <telerik:GridViewComboBoxColumn DataMemberBinding="{Binding VehicleCodeAndID,  Mode=TwoWay}"
                                                                              UniqueName="Type" IsFilterable="True"
                                                                              IsSortable="False" IsVisible="True"
                                                                              HeaderTextAlignment="Center"
                                                                              Header="Fleet No"  MinWidth="100" Width="110"
                                                                              SelectedValueMemberPath="VehicleCodeAndID"
                                                                              Name="Item01"

                                                                              DisplayMemberPath="VehicleID"

                                                                              IsComboBoxEditable="True">
                                              <telerik:GridViewComboBoxColumn.EditorStyle>
                                                  <Style TargetType="telerik:RadComboBox">
                                                      <Setter Property="OpenDropDownOnFocus" Value="True"/>
                                                      <Setter Property="TextSearchMode" Value="Contains"/>
                                                      <Setter Property="IsFilteringEnabled" Value="True"/>
                                                      <Setter Property="ItemsPanel">
                                                          <Setter.Value>
                                                              <ItemsPanelTemplate>
                                                                  <StackPanel/>
                                                              </ItemsPanelTemplate>
                                                          </Setter.Value>
                                                      </Setter>
                                                  </Style>
                                              </telerik:GridViewComboBoxColumn.EditorStyle>
                                          </telerik:GridViewComboBoxColumn>

                                          <telerik:GridViewDataColumn Header="Model No"
                                              HeaderTextAlignment="Center"
                                              IsVisible="True"
                                              IsFilterable="True"
                                              IsReadOnly="True"
                                              IsSortable="False"
                                              MinWidth="130" Width="130"
                                              TextAlignment="Center"
                                              DataMemberBinding="{Binding ModelNo}" />



                                          <telerik:GridViewDataColumn Header="Crane Capacity"
                                              HeaderTextAlignment="Center"
                                              IsVisible="True"
                                              IsFilterable="True"
                                              IsSortable="False"
                                              MinWidth="100" Width="100"
                                              TextAlignment="Center"
                                              DataMemberBinding="{Binding CraneCapacity}" />

                                          <telerik:GridViewDataColumn Header="Plate No"
                                              HeaderTextAlignment="Center"
                                              IsVisible="True"
                                              IsFilterable="True"
                                              IsSortable="False"
                                              MinWidth="100" Width="100"
                                              TextAlignment="Center"
                                              DataMemberBinding="{Binding PlateNo}" />


                                          <telerik:GridViewDataColumn Header="Last Service Date"
                                              HeaderTextAlignment="Center"
                                              IsVisible="True"
                                              IsFilterable="True"
                                              IsSortable="False"
                                              MinWidth="105" Width="105"
                                              TextAlignment="Center"
                                              DataMemberBinding="{Binding LastServiceDate,StringFormat=dd-MM-yyyy}" />

                                          <telerik:GridViewDataColumn Header="Last Service HMR"
                                              HeaderTextAlignment="Center"
                                              IsVisible="True"
                                              IsFilterable="True"
                                              IsSortable="False"
                                              MinWidth="108" Width="108"
                                              TextAlignment="Center"
                                              DataMemberBinding="{Binding LastServiceHMR}" />

                                          <telerik:GridViewDataColumn Header="Next Service Date"
                                              HeaderTextAlignment="Center"
                                              IsVisible="True"
                                              IsFilterable="True"
                                              IsSortable="False" IsReadOnly="True"
                                              MinWidth="110" Width="110"
                                              TextAlignment="Center"
                                              DataMemberBinding="{Binding NextServiceDate,StringFormat=dd-MM-yyyy}" />

                                          <telerik:GridViewDataColumn Header="Next Service HMR"
                                              HeaderTextAlignment="Center"
                                              IsVisible="True"
                                              IsFilterable="True"
                                              IsSortable="False" IsReadOnly="True"
                                              MinWidth="115" Width="115"
                                              TextAlignment="Center"
                                              DataMemberBinding="{Binding NextServiceHMR}" />

                                          <telerik:GridViewDataColumn Header="Recent HMR Date"
                                              HeaderTextAlignment="Center"
                                              IsVisible="True"
                                              IsFilterable="True"
                                              IsSortable="False"
                                              MinWidth="110" Width="110"
                                              TextAlignment="Center"
                                              DataMemberBinding="{Binding RecentHMRDate,StringFormat=dd-MM-yyyy}" />

                                          <telerik:GridViewDataColumn Header="Recent HMR"
                                              HeaderTextAlignment="Center"
                                              IsVisible="True"
                                              IsFilterable="True"
                                              IsSortable="False"
                                              MinWidth="90" Width="90"
                                              TextAlignment="Center"
                                              DataMemberBinding="{Binding RecentHMR}" />

                                          <telerik:GridViewDataColumn Header="Remaining Days" IsReadOnly="True"
                                              HeaderTextAlignment="Center"
                                              IsVisible="True"
                                              IsFilterable="True"
                                              IsSortable="False"
                                              MinWidth="100" Width="100"
                                              TextAlignment="Center"
                                              DataMemberBinding="{Binding RemainingDays}">

                                              <telerik:GridViewDataColumn.CellStyle>
                                                  <Style>
                                                      <Setter Property="Canvas.Background" Value="{Binding ColorA,Converter={StaticResource DateConverter2}}"></Setter>
                                                  </Style>
                                              </telerik:GridViewDataColumn.CellStyle>

                                          </telerik:GridViewDataColumn>


                                          <telerik:GridViewDataColumn Header="Remaining HMR/KM" IsReadOnly="True"
                                              HeaderTextAlignment="Center"
                                              IsVisible="True"
                                              IsFilterable="True"
                                              IsSortable="False"
                                              MinWidth="130" Width="130"
                                              TextAlignment="Center"
                                              DataMemberBinding="{Binding RemainingHMRKM }" >

                                              <telerik:GridViewDataColumn.CellStyle>
                                                  <Style>
                                                      <Setter Property="Canvas.Background" Value="{Binding ColorB,Converter={StaticResource DateConverter2}}"></Setter>
                                                  </Style>
                                              </telerik:GridViewDataColumn.CellStyle>

                                          </telerik:GridViewDataColumn>

                                          <telerik:GridViewDataColumn Header="Location"
                                              HeaderTextAlignment="Center"
                                              IsVisible="True"
                                              IsFilterable="True"
                                              IsSortable="False"
                                              MinWidth="100" Width="110"
                                              TextAlignment="Center"
                                              DataMemberBinding="{Binding Location}" />

                                          <telerik:GridViewDataColumn Header="Operator"
                                              HeaderTextAlignment="Center"
                                              IsVisible="True"
                                              IsFilterable="True"
                                              IsSortable="False"
                                              MinWidth="100" Width="110"
                                              TextAlignment="Center"
                                              DataMemberBinding="{Binding Operator}" />

                                          <telerik:GridViewDataColumn Header="Mobile"
                                              HeaderTextAlignment="Center"
                                              IsVisible="True"
                                              IsFilterable="True"
                                              IsSortable="False"
                                              MinWidth="100" Width="110"
                                              TextAlignment="Center"
                                              DataMemberBinding="{Binding Mobile}" />

                                          <telerik:GridViewDataColumn Header="Work Description"
                                              HeaderTextAlignment="Center"
                                              IsVisible="True"
                                              IsFilterable="True"
                                              IsSortable="False"
                                              MinWidth="100" Width="110"
                                              TextAlignment="Center"
                                              DataMemberBinding="{Binding WorkDescription}" />

                                          <telerik:GridViewDataColumn Header="Ass. Serv. ManPower"
                                              HeaderTextAlignment="Center"
                                              IsVisible="True"
                                              IsFilterable="True"
                                              IsSortable="False"
                                              MinWidth="100" Width="130"
                                              TextAlignment="Center"
                                              DataMemberBinding="{Binding AssighnedServiceManPower}" />

                                          <telerik:GridViewDataColumn Header="Remarks"
                                              HeaderTextAlignment="Center"
                                              IsVisible="True"
                                              IsFilterable="True"
                                              IsSortable="False"
                                              MinWidth="150" Width="150"
                                              TextAlignment="Center"
                                              DataMemberBinding="{Binding Remarks}" />

                                      </telerik:RadGridView.Columns>
                                      <telerik:StyleManager.Theme>
                                          <telerik:Windows8Theme />
                                      </telerik:StyleManager.Theme>
                                      <telerik:RadGridView.RowStyle>
                                          <Style TargetType="{x:Type telerik:GridViewRow}" >
                                              <!--<Setter Property="Background" Value="{StaticResource PinkVeryLightBrush}"/>-->
                                              <Setter Property="Background" Value="{Binding GridColur,Converter={StaticResource DateConverter}}"></Setter>
                                          </Style>
                                      </telerik:RadGridView.RowStyle>
                                  </telerik:RadGridView>
Posted
Updated 20-Oct-20 0:13am
v2
Comments
Gerry Schmitz 20-Oct-20 15:15pm
   
https://www.telerik.com/forums

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