<
telerik:GridViewDataColumn Header="Matter">
<telerik:GridViewDataColumn.CellStyle>
<Style TargetType="telerik:GridViewCell">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="telerik:GridViewCell">
<telerik:RadComboBox Width="200" x:Name="radMatterCombo" GotFocus="RadMatterBox_GotFocus"
IsEditable="True" Text="Enter Matter Name/Number" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</telerik:GridViewDataColumn.CellStyle>
</telerik:GridViewDataColumn>
and the handler:
private void RadMatterBox_GotFocus(object sender, RoutedEventArgs e)
{
//define the dropdown
//activebox = (sender as RadComboBox);
//activebox.Text = "";
//get the parent row
//var row = activebox.ParentOfType<GridViewRow>();
//string strClient = "";
//if (row != null)
// {
// var clicomb = row.ChildrenOfType<RadComboBox>().Where(c => c.Name == "radClientCombo").FirstOrDefault();
//strClient = clicomb.Text;
// }
//strip out just the number
//string[] arClient = new string[2];
//char[] splitter = {'|'};
//arClient = strClient.Split(splitter);
//strClient = arClient[0];
//wsSilverClient client = new wsSilverClient();
//client.LookupMattersCompleted += new EventHandler<LookupMattersCompletedEventArgs>(LookupMattersCompleted);
//client.LookupMattersAsync("", 10, strClient);
}
I'm pretty perlexed, I have another box in the grid which works fine with very similar code. The other one actually had the same problem initually but it went away (I am not sure how I fixed it, seemed like I just deleted and re-added the vent handler and it worked.