Hi,
We have a xaml in which we are using a radgridview.It has 3 columns.
1) 1st column is an emailaddresscolumn
2) 2nd column is the username column
3) 3rd column is the usertype column
XAML tags of the RadGridView and the columns.
<telerikGrid:RadGridView x:Name="rgvUsers"
ItemsSource="{Binding Users,Mode=TwoWay}">
<telerikGrid:GridViewDataColumn HeaderText="Email Address"
UniqueName="EmailAddress" DataMemberBinding="{Binding EmailAddress, Mode=TwoWay}">
<telerikGrid:GridViewDataColumn.CellTemplate>
<DataTemplate>
<TextBlock x:Name="txtValue" Text="{Binding EmailAddress, Mode=TwoWay}">
</TextBlock>
</DataTemplate>
</telerikGrid:GridViewDataColumn.CellTemplate>
</telerikGrid:GridViewDataColumn>
<telerikGrid:GridViewDataColumn HeaderText="Alias"
DataMemberBinding="{Binding Alias, Mode=TwoWay}"
UniqueName="Alias"></telerikGrid:GridViewDataColumn>
<telerikGrid:GridViewDataColumn HeaderText="UserType"
DataMemberBinding="{Binding UserTypes, Mode=TwoWay}"
UniqueName="UserType">
<telerikGrid:GridViewDataColumn.CellTemplate>
<DataTemplate>
<ComboBox x:Name="comboBoxusertype"
ItemsSource="{Binding UserTypes, Mode=TwoWay}"
DisplayMemberPath="Name"
SelectedItem="{Binding SelectedType, Mode=TwoWay}"
>
</ComboBox>
</DataTemplate>
</telerikGrid:GridViewDataColumn.CellTemplate>
<telerikGrid:GridViewDataColumn.CellEditTemplate>
<DataTemplate>
</Grid>
Here we face an issue like this.
Requirement:
When we enter emailaddress for a user and navigate to either 2nd or 3rd column, the alias name should automatically get updated with the username(taken from the emailaddress. eg; test@gmail.com; username will be 'test'). This occurs when we navigate from emailaddress gridviewdatacolumn to next column using tab key.
Issue
But after entering the emailaddress if we directly choose the combobox and click/choose any user, the lostfocus of the emailaddress gridviewdatacolumn is not firing and we are not able to get the alias name displayed. This is occuring when we gave the 3rd column as :
We tried to change the 3rd column from GridViewDataColumn to GridViewcomboboxcolumn. Then we are able to get the lost focus of the emailaddress datacolumn and the alias name is getting displayed.But when we gave the 3rd column as GridViewcomboboxcolumn, the items are not getting populated in the combobox.
Note
The UserType which is a property inside the Users property is an observablecollection of UserTypeclass which has some properties like name,id and all.
Please help us to get the alias name updated when we navigate from 1st column to 3rd column
Thanks in advance
VR