Skip to main content

Microsoft Silverlight

Unanswered Question Tab press on datagrid shifts its focus to browser adress bar.RSS Feed

(0)

balukr54
balukr54

Member

Member

124 points

143 Posts

Tab press on datagrid shifts its focus to browser adress bar.

Hi

 I am getting a bug in inline editing.If the user is editing a cell and press tab to move to next cell the mouse control shifts to browser address barSad and the row being edited disappears. Is there any workaround for this issue.I am using silverlight 2.0

How can i prevent the control being shifted to adress bar on tab press.

Escape, enter key all are working fine.

 Please help

 thanks

Balu

mr.saif
mr.saif

Member

Member

417 points

147 Posts

Re: Tab press on datagrid shifts its focus to browser adress bar.

can you past your code here!

Regards,
Muhammad Saifullah

balukr54
balukr54

Member

Member

124 points

143 Posts

Re: Tab press on datagrid shifts its focus to browser adress bar.

 

 Hi Saif.

here is code .

i Got a workaround by setting the tabindex to -1;//issue is tabnavigation is disabled.

private void dgRecordTypes_PreparingCellForEdit(object sender, DataGridPreparingCellForEditEventArgs e)

{

e.EditingElement.LostFocus += new RoutedEventHandler(RecordTypesEditingElement_LostFocus); 

}

void RecordTypesEditingElement_LostFocus(object sender, RoutedEventArgs e)

{

try

{

var newValue = e.OriginalSource as TextBox;

//update record list here and aasign to datagrid

dgRecordTypes.ItemsSource = recordList;

}

mr.saif
mr.saif

Member

Member

417 points

147 Posts

Re: Tab press on datagrid shifts its focus to browser adress bar.

currently tab navigation does not work in datagrid child controsl(textboxs). We might have to wait for next releaseSmile

"Mark this post as anwer if it helps"

Regards,
Muhammad Saifullah

balukr54
balukr54

Member

Member

124 points

143 Posts

Re: Re: Tab press on datagrid shifts its focus to browser adress bar.

Hi saif

In my appliction i got 4 datagrid. in 3 of them tab is working fine...

but for one i am getting the error.I dont know why its not working.Surprise

i am populating all in same manner.

thanks.

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities