473,395 Members | 2,796 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,395 software developers and data experts.

branching based on a datagrid/datalist DataBinder?

BH
Is there a way to display different message based on the value of a
particualr column bound to a datagrid or datalist. For example, I have the
following column from the bound DataTable:

<%# DataBinder.Eval(Container.DataItem, "hasValue") %>

"hasValue" takes the true or false value. What I would like to display to
the user is if the value is true, display a hardcoded hyperlink, otherwise
leave the datagrid column (or datalist item) empty. Is there a way to do
this in the aspx or the code behind class?

Thanks a lot
Bob
Nov 17 '05 #1
1 1448
BH,

Refer

http://datawebcontrols.com/faqs/Cust...rmatting.shtml
Reddy


"Prasad" <pr********@hotmail.com> wrote in message
news:OS**************@TK2MSFTNGP10.phx.gbl...
Hi

You can write some Method and call that Method.

eg. <%#F1(DataBinder.Eval(Container.DataItem,true)%>

Do whatever you want in F1 and return the value from F1()

HTH
Prasad

"BH" <bo*******@yahoo.com> wrote in message
news:OB**************@tk2msftngp13.phx.gbl...
Is there a way to display different message based on the value of a
particualr column bound to a datagrid or datalist. For example, I have

the
following column from the bound DataTable:

<%# DataBinder.Eval(Container.DataItem, "hasValue") %>

"hasValue" takes the true or false value. What I would like to display to the user is if the value is true, display a hardcoded hyperlink, otherwise leave the datagrid column (or datalist item) empty. Is there a way to do this in the aspx or the code behind class?

Thanks a lot
Bob


Nov 17 '05 #2

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

Similar topics

3
by: Jeremy Ames | last post by:
I am trying to use a datagrid to pull information from a database. I prefer to use latebinding to this. Well, I finally got my information to populate the datagrid, but the information came out in...
0
by: Barry | last post by:
Hi, I have a Datalist inside the ItemTemplate of another DataList. When I drilldown, I'm not getting any data in either the itemtemplate or headertemplate of the second DataList. I've confirmed...
2
by: Chris Fink | last post by:
This should be relatively simple but I am unable to find an asp:button tag in a datalist footer. I have tried it numerous ways including the FindControl method from the many events that the...
3
by: CVerma | last post by:
Hi, I have an embedded datagrid within a datalist. I am not able to perfrom paging in the datagrid. Any ideas? Here is my code: Here is my Simplegrid.cs file: using System; using...
9
by: tshad | last post by:
How do I find (and set) a couple of labels in the Footer after a DataGrid is filled? I have a bunch of DataGrids that get displayed nested inside a DataList. The datagrid looks like: ...
0
by: Chris | last post by:
I've been searching all over and think I am close, but keep getting the error "Index out of range" when trying to reference a nested datagrid when an OnEditCommand event is raised. When the...
3
by: Mirek Endys | last post by:
I have DataList as part of DataList item. DataList in DataList. The parent DataList working well including Edit command, that shows Edit template and correctly bind the data into edit template...
3
by: vishnu | last post by:
Hi, I have a link that is coming from the database.Now if the link is empty i dont want to display in datalist .How can i do that? <td><asp:DataList id="DataList1" Runat="server"...
0
by: =?Utf-8?B?Vmlua2k=?= | last post by:
Hello Everyone, I am having this problem. I have this datalist and whenever I expand the datalist by the plus button, it overlaps other controls on my web page and sometimes these controls come...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
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...
0
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...
0
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,...

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.