-
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")
-
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.
-
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%>
-
Could I use the DataKeyField on the HTML side to get that value?
<%Dim selectedRow As String = DataGrid1.DataKeyField%>