• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2393
  • Last Modified:

GridView Rows Navigation using arrow Keys in ASP.NET

Hi,

I have to highlight a grid view row using keyboard up & down arrow keys. If the user selects the gridview row using a key it should get highlighted and the user should be able to navigate using the keys.
I have used the code from
http://www.codeproject.com/KB/webforms/GridViewRowNavigation.aspx
It works fine if there is no postback for a grid row selection.
I am using it with my gridview and for each row click it will call a button click functionality.
When it is posting back the highlighting is not staying ..Can anyone suggest any solution to this?

Thanks!
0
Srinivas_Vengala
Asked:
Srinivas_Vengala
  • 2
1 Solution
 
guru_samiCommented:
Try to set SelecteRowStyle Property with same styling as you are doing in javascript function.
So when you select a row by clicking the selected row styling will be applied to that row on postback.
Ref : http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.selectedrowstyle.aspx
0
 
Srinivas_VengalaAuthor Commented:
I will check this later
0
 
Srinivas_VengalaAuthor Commented:
Didn't get a chance to check this.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now