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

What am I doing wrong [Example project included]

2 Answers 44 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kirie
Top achievements
Rank 1
Kirie asked on 16 Sep 2011, 09:29 AM
Hello teleriks!

I am trying to add structure and datasource for a grid in the code behind, due to dynamic content.

To easier show the problems i have, i have created an sample project.

 The problem is, when I try to edit (double click) a row i get a index out of bounds exception. If i uncomment the code in GridNeedDataSource it works the first time, but when i try to dobuleklick to edit an other row, the same exception it thrown again.

I am new to web development, so i assume its something i dont understand here ^^

Btw, you asked me about license a few weeks ago, I just wanted to say that its on its way, but stuff takes time in this company :)

2 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 21 Sep 2011, 08:31 AM
Hello Kirie,

Find the modified sample and let me know if it works as expected on your end.
Additionally, when you create the grid structure dynamically, you should make sure you followed the steps and requirement described here. For instance, when the grid is declaratively added to the page, and the columns are defined on Page_Load, it is important to first add the column to the Columns collection and then set its properties, like DataField, UniqueName, etc. It was the opposite in your sample.

Regards,
Iana Tsolova
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Kirie
Top achievements
Rank 1
answered on 26 Sep 2011, 08:42 AM
thank you for the reply, helped me a lot :)
Tags
Grid
Asked by
Kirie
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Kirie
Top achievements
Rank 1
Share this question
or