We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

current cell automatically goes to 1st row when tab changes

A databound grid is placed tab1. I have it setup for row selection when a cell is selected. When changing to tab2 the current row selected automatically goes to the first datarow. I would prefer that it stay on the user''s selected row so that the row''s information can be used as input for tab2.

1 Reply

AD Administrator Syncfusion Team April 9, 2004 12:09 AM UTC

I am not sure what you are describing. Is it that you have a second grid on tab 2, and you want the selected row in that grid to match the grid on tab 1? If so, you can handle the tabcontrol SelectedIndexChanged event, and explicitly set the current cell on the second grid based on the settings from the first grid. Here is a little sample. Or, is it that there is only 1 grid, and it is resetting the selected row when you change tabs. This is not normal behavior. In the sample above, the first grid does not reset when you click on tab 2 or tab 3. Are you doing any kind of sorting or updating as you leave the first grid? If so, this might be what is causing the reset. In that case, you would have to save the current cell before doing the action that resets it, and then set it back after the action.

Live Chat Icon For mobile
Up arrow icon