This is a migrated thread and some comments may be shown as answers.

Validation Red Outline stays on Data Grid

4 Answers 97 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Clarian Villamayor
Top achievements
Rank 1
Clarian Villamayor asked on 08 Aug 2012, 01:17 PM
Hi Telerik,

This is my scenario :
  • We have a Save button.
  • We have Code and Description properties bound to the data grid and text boxes in a tab below (see screen shot)
  • Both Code and Description are required.

Image 1
  • When text are boxes empty and user clicks "Save", required validation occurs.
  • Cells are highlighted in red, as expected

Image 2
  • When user fills out the text boxes below, the Red outline disappears on the text boxes but NOT on the data grid
  • (However, it disappears when I enter/click the cell)

Question:
How can I make sure cell is not highlighted anymore when data is provided already.

Thanks


Regards,
Clarian

4 Answers, 1 is accepted

Sort by
0
Yordanka
Telerik team
answered on 09 Aug 2012, 06:34 AM
Hi Clarian,

Could you give us more details on how the validation is performed in your scenario? Would it be possible to paste a code snippet so we can try it on our side? Also, is the problem available with our latest official version - Q2 2012 SP1?
 
Kind regards,
Yordanka
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Clarian Villamayor
Top achievements
Rank 1
answered on 09 Aug 2012, 08:18 AM
Hi YordankaThanks for your reply.

We are using Telerik Version 2011.3.1714.1040

See our code below.

Thanks again.

Regards,
Clarian

                                <telerik:RadGridView ... >


                                    <telerik:RadGridView.Columns>
...
                                        <!-- Code -->
                                        <telerik:GridViewDataColumn 
                                            x:Name="catCodeColumn"
                                            DataMemberBinding="{Binding Code, Mode=TwoWay}"
                                            Header="Code">
                                            <telerik:GridViewDataColumn.CellTemplate>
                                                <DataTemplate>
                                                    <TextBlock Text="{Binding Code}" />
                                                </DataTemplate>
                                            </telerik:GridViewDataColumn.CellTemplate>
                                            <telerik:GridViewDataColumn.CellEditTemplate>
                                                <DataTemplate>
                                                    <TextBox 
                                                        Text="{Binding Code, Mode=TwoWay}"
                                                        MaxLength="10" />
                                                </DataTemplate>
                                            </telerik:GridViewDataColumn.CellEditTemplate>
                                        </telerik:GridViewDataColumn>
                                        <!-- Description -->
                                        <telerik:GridViewDataColumn 
                                            x:Name="catDescriptionColumn"
                                            DataMemberBinding="{Binding Description}"
                                            Header="Description">
                                            <telerik:GridViewDataColumn.CellTemplate>
                                                <DataTemplate>
                                                    <TextBlock Text="{Binding Description, Mode=TwoWay}" />
                                                </DataTemplate>
                                            </telerik:GridViewDataColumn.CellTemplate>
                                            <telerik:GridViewDataColumn.CellEditTemplate>
                                                <DataTemplate>
                                                    <TextBox 
                                                        Text="{Binding Description, Mode=TwoWay}"
                                                        MaxLength="35" />
                                                </DataTemplate>
                                            </telerik:GridViewDataColumn.CellEditTemplate>
                                        </telerik:GridViewDataColumn>
...
                                    </telerik:RadGridView.Columns>


                                </telerik:RadGridView>
...
...
<controls:TabItem Header="Main">

...

<Grid>
...
<TextBox 
x:Name="codeTxt"
Text="{Binding Code, Mode=TwoWay}"
Width="200"
Grid.Row="0"
Grid.Column="1"
HorizontalAlignment="Left"
MaxLength="10"
Margin="0,0,0,5" />

...
<TextBox 
x:Name="descriptionTxt"
Text="{Binding Description, Mode=TwoWay}"
Width="200"
MaxLength="35"
Grid.Row="1"
Grid.Column="1"
HorizontalAlignment="Left"
Margin="0,0,0,5" />

</Grid>

...

</controls:TabItem>
0
Vlad
Telerik team
answered on 09 Aug 2012, 08:35 AM
Hello,

 This version is our Q3 2010 SP and it is no longer supported. 

Regards,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Clarian Villamayor
Top achievements
Rank 1
answered on 09 Aug 2012, 11:06 AM
Ah ok. So you can't help me.
Thanks anyway.
Tags
GridView
Asked by
Clarian Villamayor
Top achievements
Rank 1
Answers by
Yordanka
Telerik team
Clarian Villamayor
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or