Hello,
We are facing an issue with the telerik RadGridView.
When we change the font color or enable or disable any cell through code the color does changes and the cell gets disabled but if we scroll inside the grid then the cell loses the color and disabled state to its prior state.
Below is the example of the sample code for the same.
GridView in xaml
<
telerik:RadGridView x:Name="Main" Margin="5" CanUserFreezeColumns="False"
ItemsSource
="{Binding Datalist, Mode=TwoWay}"
FrozenColumnCount
="1" AutoGenerateColumns="False" HorizontalAlignment="Left"
CanUserInsertRows
="True" CanUserDeleteRows="True"
CellEditEnded
="Main_CellEditEnded"
PastingCellClipboardContent
="Main_PastingCellClipboardContent"
SelectionUnit
="FullRow" ClipboardPasteMode="Cells,AllSelectedCells" ClipboardCopyMode="All" SelectionMode="Extended" >
<
telerik:RadGridView.Columns>
<
telerik:GridViewDataColumn Header="Column1" DataMemberBinding="{Binding Column1}" IsReadOnly="False"></telerik:GridViewDataColumn>
<
telerik:GridViewDataColumn Header="Column2" DataMemberBinding="{Binding Column1}" IsReadOnly="False"></telerik:GridViewDataColumn>
<
telerik:GridViewDataColumn Header="Column3" DataMemberBinding="{Binding Column1}" IsReadOnly="False"></telerik:GridViewDataColumn>
<
telerik:GridViewDataColumn Header="Column4" DataMemberBinding="{Binding Column1}" IsReadOnly="False"></telerik:GridViewDataColumn>
<
telerik:GridViewDataColumn Header="Column5" DataMemberBinding="{Binding Column1}" IsReadOnly="False"></telerik:GridViewDataColumn>
<
telerik:GridViewDataColumn Header="Column6" DataMemberBinding="{Binding Column1}" IsReadOnly="False"></telerik:GridViewDataColumn>
<
telerik:GridViewDataColumn Header="Column7" DataMemberBinding="{Binding Column1}" IsReadOnly="False"></telerik:GridViewDataColumn>
<
telerik:GridViewDataColumn Header="Column8" DataMemberBinding="{Binding Column1}" IsReadOnly="False"></telerik:GridViewDataColumn>
<
telerik:GridViewDataColumn Header="Column9" DataMemberBinding="{Binding Column1}" IsReadOnly="False"></telerik:GridViewDataColumn>
<
telerik:GridViewDataColumn Header="Column10" DataMemberBinding="{Binding Column1}" IsReadOnly="False"></telerik:GridViewDataColumn>
</
telerik:RadGridView.Columns>
</
telerik:RadGridView>
Code Behind File
private
void Main_CellEditEnded(object sender, Telerik.Windows.Controls.GridViewCellEditEndedEventArgs e)
{
e.Cell.FontWeight =
FontWeights.Bold;
e.Cell.Foreground =
new SolidColorBrush(Colors.Red);
}
On editing the data the font changes to bold and red color but on scrolling it loses the color and boldness.
The same is the case with enable and disable as well.
We also have an issue with the
PastingCellClipboardContent
When we use GridviewtoggleRowDetailsColumn and do a copy on the grid and then if we paste it on the excel the alignment of rows with the columns changes.
The rows shift on left side by once cell in the excel.
<
telerik:GridViewToggleRowDetailsColumn Header="+"></telerik:GridViewToggleRowDetailsColumn>
Please let us know the solution on the above issues.