Validation Red Outline stays on Data Grid

5 posts, 0 answers
  1. Clarian Villamayor
    Clarian Villamayor avatar
    13 posts
    Member since:
    Jun 2010

    Posted 08 Aug 2012 Link to this post

    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
  2. Yordanka
    Admin
    Yordanka avatar
    634 posts

    Posted 09 Aug 2012 Link to this post

    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.

  3. DevCraft banner
  4. Clarian Villamayor
    Clarian Villamayor avatar
    13 posts
    Member since:
    Jun 2010

    Posted 09 Aug 2012 Link to this post

    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>
  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 09 Aug 2012 Link to this post

    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.

  6. Clarian Villamayor
    Clarian Villamayor avatar
    13 posts
    Member since:
    Jun 2010

    Posted 09 Aug 2012 Link to this post

    Ah ok. So you can't help me.
    Thanks anyway.
Back to Top
DevCraft banner