|
-
Jan 27th, 2003, 02:21 PM
#1
Thread Starter
Frenzied Member
datagrid
Is this possible. I'd like to place a field in my datagrid (bid_id) and make it visible=false. Then use that value to append data to a different field in the grid....like this..
Code:
<%# If Container.DataItem ("Bid_Id") = "44444" Then%>
<%# Container.DataItem ("Bid_Schedule_Desc")%>
<%else%>
<b>DELAYED</b>
<%# Container.DataItem ("Bid_Schedule_Desc")%>
<%end if%>
of course I'm getting an error...
-
Jan 27th, 2003, 02:38 PM
#2
From what I see of your code, you could turn of the auto generate columns in the datagrid and then use column templates.
Column templates look like:
Code:
<asp:datagrid id="QueueDataGrid" enableviewstate="true" runat="server" CssClass="Case_Data" AutoGenerateColumns="true" HeaderStyle-Font-Bold="True" ItemStyle-CssClass="Case_Data_Cell" onEditCommand="TakeCellClick">
<columns>
<asp:TemplateColumn runat="server" ItemStyle-CssClass="QueueButtonCell" >
<ItemTemplate>
<asp:button text="Take" CssClass="QueueButton" CommandName="Edit" runat="server" />
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn runat="server" ItemStyle-CssClass="QueueButtonCell" >
<ItemTemplate>
<asp:label runat="server" text='<%# Databinder.Eval(Container.DataItem, "Request ID").ToString() %>' />
</ItemTemplate>
</asp:TemplateColumn>
</columns>
</asp:datagrid>
Need to re-register ASP.NET?
C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i
(Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)
-
Jan 27th, 2003, 02:40 PM
#3
And, consider this:
<asp:label id="something" runat="server" text='
<%# IIf(Container.DataItem ("Bid_Id") = "44444", Container.DataItem ("Bid_Schedule_Desc"),
"<b>DELAYED</b>" & Container.DataItem ("Bid_Schedule_Desc")) %>' />
Need to re-register ASP.NET?
C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i
(Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)
-
Jan 27th, 2003, 03:00 PM
#4
Thread Starter
Frenzied Member
that gives me an error...
Expression Expected
-
Jan 27th, 2003, 04:43 PM
#5
There are no line breaks in the code I posted. The BBS inserted some, make sure you remove them.
Need to re-register ASP.NET?
C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i
(Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)
-
Jan 28th, 2003, 08:27 AM
#6
Thread Starter
Frenzied Member
thanks Rat, that worked....
Is there a way I can the IIF statement and add more clauses...
If = 1, then DELAYED
= 2 , then CANCELLED
= 3, then PRE_BID
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|