Combobox is locked during validation

3 posts, 0 answers
  1. Maciej
    Maciej avatar
    7 posts
    Member since:
    Oct 2014

    Posted 16 Jan 2015 Link to this post

    Hi Telerik's Support

    I've got ComboBox in GridView's EditTemplate and I've got not null validation on selected item on client side. But when I delete value from ComboBox and it is empty it is also locked, so I can't select other record from GridView or click on button from other part of window, until I select some value from locked ComboBox.

    This is my xaml code:
    <!-- Style for EditCell not based on other styles-->
    <Style TargetType="telerik:GridViewEditorPresenter"/>
     
    <!-- My ComboBox -->
    <telerik:GridViewDataColumn.CellEditTemplate>
        <DataTemplate DataType="models:BookkeepingSchemaModificationObject">
               <telerik:RadComboBox ItemsSource="{Binding Path=BookkeepingAccounts}"
                                     SelectedValuePath="Guid"
                                     SelectedValue="{Binding Path=CreditBookkeepingAccountId, Mode=TwoWay}"
                                     telerik:TextSearch.TextPath="AccountFullName"
                                     IsEnabled="{Binding Path=IsSelected}">
     
                         <telerik:RadComboBox.ItemTemplate>
                               <DataTemplate>
                                     <Grid>
                                         <Grid.ColumnDefinitions>
                                              <ColumnDefinition Width="Auto"/>
                                                   <ColumnDefinition Width="15"/>
                                                   <ColumnDefinition Width="*"/>
                                             </Grid.ColumnDefinitions>
                                  <TextBlock Grid.Column="0" Text="{Binding Path=AccountNumber}" Margin="4,4,0,4" VerticalAlignment="Center"/>
                                   <TextBlock Grid.Column="1" Text="-" HorizontalAlignment="Center" Margin="0,4" VerticalAlignment="Center"/>
                                   <TextBlock Grid.Column="2" Text="{Binding Path=AccountName}" TextWrapping="Wrap" Margin="0,4" VerticalAlignment="Center"/>
                                         </Grid>
                                    </DataTemplate>
                           </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
             </DataTemplate>
    </telerik:GridViewDataColumn.CellEditTemplate>


    What can I do, to make ComboBox not locking other controls though the validation.
  2. Maciej
    Maciej avatar
    7 posts
    Member since:
    Oct 2014

    Posted 20 Jan 2015 in reply to Maciej Link to this post

    I've found the solution. Only thing is setting ValidatesOnDataErrors="InViewMode" in GridView properties. Hope it will be helpfull to someone else ;)
  3. DevCraft banner
  4. Kalin
    Admin
    Kalin avatar
    1209 posts

    Posted 20 Jan 2015 Link to this post

    Hi Maciej,

    Thanks for sharing the solution. If you have any other questions, let us know.

    Regards,
    Kalin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top