Hello Telerik Team,
Still i didn't get correct solution for this issue.I will explain You in detail.
I have a single Customer Entry form.Its contains 3 fields.Names are CompanyID,CompanyName,Color.
and only one Add button.Whenever customer give the 3 values then enter Add Button.That time the values are stored in database.
in the entry form i have one radgrid Also.The radGridview display all the datas from database.here i want to set background color in each and every row.The color value user given when adding entries. so my result is retrive all datas from database then display radGridView with diffrent color in every row.
Here i am using RowLoaded event and apply background setting.
But it display wrong color.when i add more than 20 entries i got this problem.Particularly i am using scroll bar(vertical) to up and down.
I will attach the smple below .Give me correct solution.
This is my MainWindow Xaml code:
<Window x:Class="ColorPickerSample.MainWindow"
Title="MainWindow" Height="563" Width="850">
<Grid>
<GroupBox Header="Company Details" Height="103" Margin="12,6,12,0" Name="groupBox1" VerticalAlignment="Top" FontSize="14">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Content="Company ID" Height="24" Margin="8,7,0,0" Name="label1" FontSize="11" VerticalAlignment="Top" HorizontalAlignment="Left" Width="88" />
<Label Background="#FFFFFFCC" Content="{Binding CompanyID,Mode=TwoWay}" Height="24" Margin="118,7,64,0" Name="lblCompanyID" FontSize="11" VerticalAlignment="Top" />
<Label Content="Company Name" Height="24" Margin="5,7,0,0" Name="label2" FontSize="11" Grid.Column="1" VerticalAlignment="Top" HorizontalAlignment="Left" Width="110" />
<TextBox Margin="125,7,8,0" Text="{Binding Path=CompanyName}" Height="24" MaxLength="200" Name="txtCompanyName" TabIndex="1" FontSize="11" Grid.Column="1" VerticalAlignment="Top" />
<Label Content="Color" Height="24" Margin="29,8,167,0" Name="label24" FontSize="11" Grid.Column="2" VerticalAlignment="Top" />
<telerik:RadColorPicker SelectedColor="{Binding Path=Colour,Mode=TwoWay, UpdateSourceTrigger=LostFocus, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" Height="24" Margin="210,8,0,0" Name="rclrColour" TabIndex="24" FontSize="11" Grid.Column="2" Width="39" />
</Grid>
</GroupBox>
<telerik:RadGridView IsReadOnly="True" AutoGenerateColumns="False" CanUserFreezeColumns="False" CanUserSortColumns="False" Margin="206,144,343,231" Name="rgrdCompanyViewAll" ShowGroupPanel="False" RowLoaded="rgrdCompanyViewAll_RowLoaded" TabIndex="25">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=CompanyID}" Header="Company ID" Width="100" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=CompanyName}" Header="Company Name" Width="150" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Colour}" Header="Colour" Width="120"/>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
<Button Content="Save" Height="23" HorizontalAlignment="Left" Margin="338,115,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" />
</Grid>
</Window>
I want to display GridView Row colors based on database values.Not overlap other colors when i am using Scrolling(Vertical).