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

'Telerik.Web.UI.GridInsertionObject' does not allow indexed access

2 Answers 135 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kevin Clark
Top achievements
Rank 1
Kevin Clark asked on 20 Aug 2008, 12:58 AM
I'm attempting to add a new record to the grid using the insert button.  I have several radcontrols in template columns that show either textboxes or dropdown in edit mode.  After clicint insert, I get this error:

Line 76:                     <telerik:GridTemplateColumn HeaderText="Location Name" UniqueName="tcLocationName" EditFormColumnIndex="6">
Line 77:                         <EditItemTemplate>
Line 78:                             <telerik:RadTextBox ID="radtbLocationName" runat="server" InvalidStyleDuration="100" Text='<%# Bind("[Location Name]") %>'
Line 79:                                 Width="115px">
Line 80:                             </telerik:RadTextBox>

2 Answers, 1 is accepted

Sort by
0
Nikita Gourme
Top achievements
Rank 1
answered on 22 Aug 2008, 01:23 PM
Does the same problem occur when replacing RadTextBox with regular MS TextBox? This can give us some pointers whether the problem is due to the generated values for the GridInsertionObject itself or it is caused by the RadTextBox control.

Nikita
0
Kevin Clark
Top achievements
Rank 1
answered on 22 Aug 2008, 05:59 PM
<telerik:RadTextBox ID="radtbLocationName" runat="server" InvalidStyleDuration="100" Text='<%# Bind("[Location Name]")

I found that if I renamed the binding field name without spaces("[LocationName]"),  it worked with the RadControl.
Tags
Grid
Asked by
Kevin Clark
Top achievements
Rank 1
Answers by
Nikita Gourme
Top achievements
Rank 1
Kevin Clark
Top achievements
Rank 1
Share this question
or