I am using Telerik for the first time with SQL Server instead of Oracle. I am coding this in C#
I use the following code:
When I perform an edit eveything is fine but when I try and perform an isert I get the following error:
DataBinding: 'Telerik.Web.UI.GridInsertionObject' does not allow indexed access.
There are a few fields in front of this code that work fine. Why is this happening? Do I need to write a code aroubnf for this?
Here is the table breakdown.
I use the following code:
<
asp:TextBox
id
=
"txtAgencyName"
runat
=
"server"
Text='<%# DataBinder.Eval( Container, "DataItem.[Agency Name]" ) %>' Width="268px"
></
asp:TextBox
>
When I perform an edit eveything is fine but when I try and perform an isert I get the following error:
DataBinding: 'Telerik.Web.UI.GridInsertionObject' does not allow indexed access.
There are a few fields in front of this code that work fine. Why is this happening? Do I need to write a code aroubnf for this?
Here is the table breakdown.
USE [CommissionsEngine]
GO
/****** Object:
Table
[dbo].[Agencies] Script
Date
: 10/14/2010 11:46:11 ******/
SET
ANSI_NULLS
ON
GO
SET
QUOTED_IDENTIFIER
ON
GO
SET
ANSI_PADDING
ON
GO
CREATE
TABLE
[dbo].[Agencies](
[AgencyID] [
varchar
](4)
NOT
NULL
,
[AgencyName] [
varchar
](255)
NULL
,
[EffDate] [datetime]
NULL
,
[ExpireDate] [datetime]
NULL
,
[Retention] [money]
NULL
CONSTRAINT
[DF_Agencies_Retention]
DEFAULT
((0)),
[FMO_OverrideID] [
varchar
](4)
NULL
,
[FMO_OverrideAmount] [money]
NULL
CONSTRAINT
[DF_Agencies_FMO_OverrideAmount]
DEFAULT
((0)),
[DirectorID] [
int
]
NULL
,
[ND_Director_Override] [money]
NULL
CONSTRAINT
[DF_Agencies_ND_Director_Override]
DEFAULT
((0)),
[IsFMO] [
varchar
](1)
NULL
,
[DateEntered] [datetime]
NULL
CONSTRAINT
[DF_Agencies_DateEntered]
DEFAULT
(getdate()),
[EnteredBy] [
varchar
](50)
NULL
CONSTRAINT
[DF_Agencies_EnteredBy]
DEFAULT
(suser_sname()),
CONSTRAINT
[PK_Agencies]
PRIMARY
KEY
CLUSTERED
(
[AgencyID]
ASC
)
WITH
(PAD_INDEX =
OFF
, STATISTICS_NORECOMPUTE =
OFF
, IGNORE_DUP_KEY =
OFF
, ALLOW_ROW_LOCKS =
ON
, ALLOW_PAGE_LOCKS =
ON
, FILLFACTOR = 70)
ON
[
PRIMARY
]
)
ON
[
PRIMARY
]
GO
SET
ANSI_PADDING
OFF
GO
ALTER
TABLE
[dbo].[Agencies]
WITH
CHECK
ADD
CONSTRAINT
[FK_Agencies_Directors]
FOREIGN
KEY
([DirectorID])
REFERENCES
[dbo].[Directors] ([DirectorID])
GO
ALTER
TABLE
[dbo].[Agencies]
CHECK
CONSTRAINT
[FK_Agencies_Directors]