|
-
Jan 27th, 2003, 09:11 AM
#1
Thread Starter
Frenzied Member
storing variable
Is there a way to save this value in a variable? I'd like to use it in a query...
<%# Container.DataItem ("Bid_Id")%>
Or is there another way I can get that value from the datagrid. I need the value before the datagrid is populated. I need to append data to the datagrid depending on the value of ("Bid_Id")
Last edited by EyeTalion; Jan 27th, 2003 at 11:35 AM.
-
Jan 27th, 2003, 12:43 PM
#2
You need to write an event handler for the onItemDataBound event.
In that handler, you can check e.item.cells(index).text for the value of that cell and then take appropriate action, such as setting the e.item.cells(index_another).text to something else.
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, 01:08 PM
#3
Thread Starter
Frenzied Member
I have an event handler for the ItemCreated...How can I bring that variable over from the VBCode page to the HTML? ...Heres the code I have now. I need a bidID value for the where clause...
Code:
Dim strSQL As String = "select bid_status_code, pre_bid_ind from pbss.pbss_bid_schedule where bid_id='" & bidid & "'"
Do While objDataReader.Read = True%>
<%If objDataReader("bid_status_code") = 1 Then%>
<%# Container.DataItem ("Bid_Schedule_Desc")%>
<%else%>
<b>DELAYED</b>
<%# Container.DataItem ("Bid_Schedule_Desc")%>
<%end if%>
<%loop%>
-
Jan 27th, 2003, 01:20 PM
#4
Thread Starter
Frenzied Member
Could I use the DataKeyField on the HTML side to get that value?
<%Dim selectedRow As String = DataGrid1.DataKeyField%>
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
|