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

Radgrid Selected index is not working

3 Answers 206 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
bharat veer
Top achievements
Rank 1
bharat veer asked on 08 Aug 2011, 01:57 PM
Hi,

When i choose any row of the radgrid then i getting error on the line.Right now i am using the Q2 2011. and i also true the
RadGrid1.ClientSettings.EnablePostBackOnRowClick = true; 

        protected void RadGrid1_SelectedIndexChanged(object sender, EventArgs e)
        {
            selectedReceiptIndex = Convert.ToInt32(RadGrid1.SelectedIndexes[0]);    //Here i am gettin below error    
        }



error is ---- 

Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index


please reply soon.

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 08 Aug 2011, 04:09 PM
Hi Bharat,

I am sending you a simple example that is working as expected. Check it out and let me know if it helps to resolve the problem you are facing.

All the best,
Pavlina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
bharat veer
Top achievements
Rank 1
answered on 08 Aug 2011, 05:49 PM
HI Pavlina ,

Thanks for your quick response awesome.... it's working..... but i want to know why that code is not working because before Q2 it was working fine reply will highly appreciated once again thank you so much.
0
Pavlina
Telerik team
answered on 09 Aug 2011, 01:24 PM
Hi Bharat Veer,

I tested your code and it is working as expected with version Q2 2011 of RadControls. Examine the modified project attached to this message and see what is the difference in your case.

All the best,
Pavlina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
General Discussions
Asked by
bharat veer
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
bharat veer
Top achievements
Rank 1
Share this question
or