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

selecting a combobox column value with mouse triggers a mouse leave for radgridView.

1 Answer 31 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ole
Top achievements
Rank 1
Ole asked on 04 Apr 2011, 02:55 PM
Hi,

I have a rad gridview (x:Name="gridviewSignals") with a combobox column  and a mouse leave. On mouse leave I do a commitedit on the gridview. I do it like this so I am always aware of validation error in the gridview, before some other events happen that might put the gridview out of the UI.

However when trying to select a value from the combobox column dropdown list triggers the mouse leave on gridview, resulting in closing the dropdown list. So even through the combobox is part of the gridview selecting a value in the ddl with your mouse will trigger a mouse leave on grid.

Is this exspected behavier ? ,  Any idears for a work around.
<telerik:RadGridView x:Name="gridviewSignals" Margin="10,10,10,10" AutoGenerateColumns="False" ActionOnLostFocus="CommitEdit" RowDetailsVisibilityChanged="gridviewAuditSignalSpecial_RowDetailsVisibilityChanged" RowEditEnded="gridviewSignals_RowEditEnded" ShowInsertRow="True" AddingNewDataItem="gridviewSignals_AddingNewDataItem" RowValidating="gridview_RowValidating" CanUserDeleteRows="False" BeginningEdit="gridviewSignals_BeginningEdit" MouseLeave="gridviewSignals_MouseLeave">
                                    <telerik:RadContextMenu.ContextMenu>
                                        <telerik:RadContextMenu >
                                            <telerik:RadContextMenu.Items>
                                                <telerik:RadMenuItem Header="Change type" Click="ChangeType" Visibility="{Binding ElementName=gridviewAuditDevice, Path=SelectedItem, Converter={ StaticResource menuVisibleconverter},ConverterParameter=SignalListR_DevicesPrivat}"/>
                                            </telerik:RadContextMenu.Items>
                                        </telerik:RadContextMenu>
                                    </telerik:RadContextMenu.ContextMenu>
                                      
                                    <telerik:RadGridView.Columns>
                                        <telerik:GridViewToggleRowDetailsColumn x:Name="rowDetailsSignal" IsReadOnly="True"></telerik:GridViewToggleRowDetailsColumn>
                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=KKS3}"/>
                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=KKS3_Desc}"/>
                                        <telerik:GridViewCheckBoxColumn DataMemberBinding="{Binding Path=Deleted}" IsThreeState="False"/>
                                        <telerik:GridViewComboBoxColumn x:Name="Type"  IsReadOnly="True" DataMemberBinding="{Binding Path=Type}" PropertyChanged="Type_PropertyChanged"></telerik:GridViewComboBoxColumn>
                                        <telerik:GridViewComboBoxColumn x:Name="Diode"   DataMemberBinding="{Binding Path=Diode}"></telerik:GridViewComboBoxColumn>                                       
                                        <telerik:GridViewCheckBoxColumn DataMemberBinding="{Binding Path=NotInABB}" IsThreeState="False"></telerik:GridViewCheckBoxColumn>
                                        <telerik:GridViewCheckBoxColumn DataMemberBinding="{Binding Path=NotinTB}" IsThreeState="False"/>                                                                        
                                        <!--<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Rev}"/>-->
                                    </telerik:RadGridView.Columns>
                                    <telerik:RadGridView.RowDetailsTemplate>
                                        <DataTemplate>
                                            <telerik:RadTabControl Margin="10,10,10,10">
                                                <telerik:RadTabItem Header="Signals" Margin="10,0,0,0" Background="AntiqueWhite">
                                                    <telerik:RadGridView x:Name="gridViewSignalsSpecial" Margin="10" RowEditEnded="gridViewSignalsSpecial_RowEditEnded" RowValidating="gridview_RowValidating" DataLoaded="gridViewSignalsSpecial_DataLoaded" BeginningEdit="gridViewSignalsSpecial_BeginningEdit" MouseLeave="gridViewSignalsSpecial_MouseLeave" CanUserDeleteRows="False">
  
                                                    </telerik:RadGridView>
  
  
                                                </telerik:RadTabItem>
                                            </telerik:RadTabControl>
                                        </DataTemplate>
                                          
                                          
                                    </telerik:RadGridView.RowDetailsTemplate>
                                      
                                      
                                </telerik:RadGridView>

private void gridviewSignals_MouseLeave(object sender, MouseEventArgs e)
       {
           ((RadGridView)sender).CommitEdit();
       }

Best regards

Ole

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 07 Apr 2011, 09:39 AM
Hi Ole,

Generally, this would be the expected behavior since the mouse goes to another element - a RadComboBox. If you want to get all the validation errors immediately, you may handle the CellValidating or CellValidated events.  
 
 

Regards,
Maya
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Ole
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or