Wpf, C#, telerik, radgridview, groupdescriptors
telerik, RadGridView, GroupDescriptors i have been to use 👇. But in CellEditEnded automatically change position for current using row, How Do
Что я уже пробовал:
<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>
Gerry Schmitz
https://www.telerik.com/forums