473,320 Members | 1,612 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Urgent! GridView and Templated controls binding. Plz help

Hi,

My GridView has templated controls in it and I'm binding to an
ObjectDataSource. The problem is it refused to bind to my grid column
"ColumnName" which is also an UpdateCommand Parameter for the
ObjectDataSource. It displays the following error
"DataBinding: 'System.String' does not contain a property with the name
'ColumnName'.
I've also cheched it with FormView and that is not binding either. same
error.

<ItemTemplate>

<asp:Label ID="Label5" runat="server" Text='<%# Eval("ColumnName")
%>'></asp:Label>

</ItemTemplate>

Plz help,

Shafia

Nov 19 '05 #1
2 1242
Hi,
Can you plz explain what is "Container" the following code gives me an
error

"The Name Label6 does not exist in the current context"

<ItemTemplate>
<asp:Label ID="Label6" runat="server" Text = '<%#
DataBinder.Eval(Label6.DataItem, "ColumnName") %>'
OnDataBinding="Label6_DataBinding"></asp:Label>

</ItemTemplate>

Thanks,

Shafia


"Kostadin Kostov" <Ko************@discussions.microsoft.com> wrote in
message news:2F**********************************@microsof t.com...
Use Text='<%# DataBinder.Eval(Container.DataItem, "ColumnName") %>'

"Shafia" wrote:
Hi,

My GridView has templated controls in it and I'm binding to an
ObjectDataSource. The problem is it refused to bind to my grid column
"ColumnName" which is also an UpdateCommand Parameter for the
ObjectDataSource. It displays the following error
"DataBinding: 'System.String' does not contain a property with the name 'ColumnName'.
I've also cheched it with FormView and that is not binding either. same error.

<ItemTemplate>

<asp:Label ID="Label5" runat="server" Text='<%# Eval("ColumnName")
%>'></asp:Label>

</ItemTemplate>

Plz help,

Shafia

Nov 19 '05 #2


Hi,

Please let me know what is the container supposed to be
is this correct?
<%# DataBinder.Eval(Label5.Text, "MyColumn") %>

where Label5 is a Label control on a Column Template for GridView. It
gives me compilation error
Label5 can not be refencened in this context

Thanks


"Shafia" <sb*****@ultimus.com> wrote in message
news:#r**************@TK2MSFTNGP10.phx.gbl...
Hi,
Can you plz explain what is "Container" the following code gives me an
error

"The Name Label6 does not exist in the current context"

<ItemTemplate>
<asp:Label ID="Label6" runat="server" Text = '<%#
DataBinder.Eval(Label6.DataItem, "ColumnName") %>'
OnDataBinding="Label6_DataBinding"></asp:Label>

</ItemTemplate>

Thanks,

Shafia


"Kostadin Kostov" <Ko************@discussions.microsoft.com> wrote in
message news:2F**********************************@microsof t.com...
> Use Text='<%# DataBinder.Eval(Container.DataItem, "ColumnName") %>'
>
> "Shafia" wrote:
>
> > Hi,
> >
> > My GridView has templated controls in it and I'm binding to an
> > ObjectDataSource. The problem is it refused to bind to my grid column > > "ColumnName" which is also an UpdateCommand Parameter for the
> > ObjectDataSource. It displays the following error
> > "DataBinding: 'System.String' does not contain a property with the name > > 'ColumnName'.
> > I've also cheched it with FormView and that is not binding either. same > > error.
> >
> > <ItemTemplate>
> >
> > <asp:Label ID="Label5" runat="server" Text='<%# Eval("ColumnName")
> > %>'></asp:Label>
> >
> > </ItemTemplate>
> >
> >
> >
> > Plz help,
> >
> > Shafia
> >
> >
> >
> >


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Johnson Ndiovu | last post by:
This is a multi-part message in MIME format --af4b847f-30bf-4b8d-acf1-2909de953a6e Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable DEAR FRIEND, ...
1
by: Heros | last post by:
I had losed my serial key for .net Visual Studio Professional, DVD ROM with the trial version, 60 days, and need urgent to use it to install .net Visual Basic. Please, its urgent. Thanks.
5
by: VbUser25 | last post by:
hi i need urgent responses.. i have some 15 checkboxex on a form... i want to 1st check the no. of checkboxes that are checked?? and then loop it that many times adn insert the quantities the...
3
by: Rob | last post by:
I have a form - when you click the submit button, it appends a variable to the URL (e.g. xyz.cgi?inputID=some_dynamic_variable) It also opens a new page. Now, that some_dynamic_variable is...
9
by: Stefan Bauer | last post by:
Hi NG, we've got a very urgent problem... :( We are importing data with the LOAD utility. The input DATE field data is in the format DDMMYYYY (for days) and MMYYYY (for months). The target...
3
by: gani | last post by:
hi, how to get the fullpath of created IsolatedStorage directory. thanks. -- gani
28
by: Tamir Khason | last post by:
Follwing the struct: public struct TpSomeMsgRep { public uint SomeId;
3
by: N. Spiker | last post by:
I am attempting to receive a single TCP packet with some text ending with carriage return and line feed characters. When the text is send and the packet has the urgent flag set, the text read from...
1
by: rajesh.us.it.recruiter | last post by:
Hi Guys/Partners, We have a URGENT Requirement for Perl Programmer with H1 visa in India/US for one of our prestigious Client. Location : New Jersey Requirements : Should be very strong in...
7
by: Cirene | last post by:
I used to use the Web Deployment Project with my VS2005 projects. Now I've fully upgraded to VS2008. Do I have to download a new version of the Web Deployment Project? If so where can I find...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.