This is a migrated thread and some comments may be shown as answers.

Grid view without horizontal scroll bar problem

2 Answers 32 Views
GridView
This is a migrated thread and some comments may be shown as answers.
vishal
Top achievements
Rank 1
vishal asked on 17 Mar 2011, 12:22 PM
Hello,

I encounter very strange problem while using the Telerik GridView.
I am creating the gridview on the fly & then populating the data in those gridviews.

Bydefault I am showing one row in each gridview as selected through programming.
The grid which contains the horizontal scroll bar & when I am looking at the source code of that grid, I am getting the following value which I am using in my jquery to findout the selected index of that specific grid from the 'value' attribute.

<input name="rg_02635_ClientState" id="rg_02635_ClientState" type="hidden" 
autocomplete="off" 
value="{"selectedIndexes":["33"],"reorderedColumns":[],"expandedItems":[],"expandedGroupItems":[],"expandedFilterItems":[],"deletedItems":[],"scrolledPosition":"768,0","popUpLocations":{},"draggedItemsIndexes":[]}"/><BR><BR>

But for the grid which doesn't contain the horizontal scroll bar & when I am looking at the source code of that grid, I am getting the following value, even if I have selected row in the grid.

<input name="rg_02637_ClientState" id="rg_02637_ClientState" type="hidden" 
autocomplete="off"/><BR>


Strange thing is, if I select the highlighted row one more time manually, then I am able to see the following value.
<input name="rg_02637_ClientState" id="rg_02637_ClientState" type="hidden" 
autocomplete="off" 
value="{"selectedIndexes":["0"],"reorderedColumns":[],"expandedItems":[],"expandedGroupItems":[],"expandedFilterItems":[],"deletedItems":[],"scrolledPosition":"0,0","popUpLocations":{},"draggedItemsIndexes":[]}"/><BR>

Why is this strage behaviour? How do I get the selectedIndex for the grid which doesn't contain horizontal scroll.

Looking forward to your response.

Best Regards,
Vishal

2 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 17 Mar 2011, 12:48 PM
Hello,

It looks like you have posted your question in the wrong forum. Please re-post your question in the correct forum to receive a prompt reply.
Thanks
Richard
0
vishal
Top achievements
Rank 1
answered on 17 Mar 2011, 01:17 PM
Hello Richard,

Thank you for the information. I will update the information to the right forum now.

Best Regards,
Vishal
Tags
GridView
Asked by
vishal
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
vishal
Top achievements
Rank 1
Share this question
or