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

Combobox is locked during validation

2 Answers 52 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Maciej
Top achievements
Rank 1
Maciej asked on 16 Jan 2015, 11:49 AM
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 Answers, 1 is accepted

Sort by
0
Maciej
Top achievements
Rank 1
answered on 20 Jan 2015, 09:50 AM
I've found the solution. Only thing is setting ValidatesOnDataErrors="InViewMode" in GridView properties. Hope it will be helpfull to someone else ;)
0
Kalin
Telerik team
answered on 20 Jan 2015, 12:34 PM
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.

 
Tags
ComboBox
Asked by
Maciej
Top achievements
Rank 1
Answers by
Maciej
Top achievements
Rank 1
Kalin
Telerik team
Share this question
or