473,566 Members | 3,255 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Urgent! GridView and Templated controls binding. Plz help

Hi,

My GridView has templated controls in it and I'm binding to an
ObjectDataSourc e. The problem is it refused to bind to my grid column
"ColumnName " which is also an UpdateCommand Parameter for the
ObjectDataSourc e. It displays the following error
"DataBindin g: '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("ColumnNam e")
%>'></asp:Label>

</ItemTemplate>

Plz help,

Shafia

Nov 19 '05 #1
2 1248
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.DataIte m, "ColumnName ") %>'
OnDataBinding=" Label6_DataBind ing"></asp:Label>

</ItemTemplate>

Thanks,

Shafia


"Kostadin Kostov" <Ko************ @discussions.mi crosoft.com> wrote in
message news:2F******** *************** ***********@mic rosoft.com...
Use Text='<%# DataBinder.Eval (Container.Data Item, "ColumnName ") %>'

"Shafia" wrote:
Hi,

My GridView has templated controls in it and I'm binding to an
ObjectDataSourc e. The problem is it refused to bind to my grid column
"ColumnName " which is also an UpdateCommand Parameter for the
ObjectDataSourc e. It displays the following error
"DataBindin g: '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("ColumnNam e")
%>'></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*****@ultimu s.com> wrote in message
news:#r******** ******@TK2MSFTN GP10.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.DataIte m, "ColumnName ") %>'
OnDataBinding=" Label6_DataBind ing"></asp:Label>

</ItemTemplate>

Thanks,

Shafia


"Kostadin Kostov" <Ko************ @discussions.mi crosoft.com> wrote in
message news:2F******** *************** ***********@mic rosoft.com...
> Use Text='<%# DataBinder.Eval (Container.Data Item, "ColumnName ") %>'
>
> "Shafia" wrote:
>
> > Hi,
> >
> > My GridView has templated controls in it and I'm binding to an
> > ObjectDataSourc e. The problem is it refused to bind to my grid column > > "ColumnName " which is also an UpdateCommand Parameter for the
> > ObjectDataSourc e. It displays the following error
> > "DataBindin g: '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("ColumnNam e")
> > %>'></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
1372
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, BUSINESS TRANSACTION. MY NAME IS JOHNSON NDIOVU, THE ELDEST SON OF MR.AKUGA NDIOVU OF ZIMBAWE IT =
1
1700
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
1801
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 user enters in the text boxes. do i need to group the checkboxes....hwo can i do that??? how to know which checkbox is checked because out of the...
3
2409
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 actually the name of a form element on the parent window. On the new page, I have this javascript: ---- var var2 = location.search.substring(9);...
9
4291
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 data format is european DD.MM.YYYY (for days) and 01.MM.YYYY (for months). The input format is not recognizable as a DATE input to a DB2 LOAD for
3
2269
by: gani | last post by:
hi, how to get the fullpath of created IsolatedStorage directory. thanks. -- gani
28
3009
by: Tamir Khason | last post by:
Follwing the struct: public struct TpSomeMsgRep { public uint SomeId;
3
6445
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 the socket is missing the last character (line feed). When the same text is sent without the urgent flag set, all of the characters are read. ...
1
2105
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 Perl Should be strong in SQL, Unix, C++ Should have some knowledge in RDBMS
7
5951
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 it? If not, how do I have to change my deployment strategy? Thanks!
0
7584
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7893
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8109
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7645
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7953
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6263
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.