Forums
This topic is locked
Finding Controls in Dreamweaver datagrid
Posted 06 Nov 2005 17:42:59
1
has voted
06 Nov 2005 17:42:59 Dave Mitchell posted:
Hi, I am new here. Hope someone can help. I am trying to use Dreamweaver and its datagrids to speed up development. I have in the past used ASP.Net with Visual Studio. Currently I am trying to display a tickbox on a dtagrid list. When the user ticks the box it will add that item to a seperate list . The problem I am having is that I am trying to get the underlying SQL record identifier from a control in the datgrid. When I try to find the control it always seems to be empty. e.g. if i set a value into a label called mylabel and try to find that label in the datagrid row as such:Dim myItem As String = (CType(e.Item.FindControl("myLabel"

response.write("MyItem=" & myItem)
It returns Myitem= and no value!
My datagrid label is set so:
<asp:TemplateColumn HeaderText="theLabel"
Visible="True">
<ItemTemplate>
<asp:label ID="myLabel" runat="server"><%# dsClients.FieldValue("FirstName", Container) %></asp:label>
</ItemTemplate>
</asp:TemplateColumn>
and I am using the OnItemCommand="ItemCommand" as a handler. The handler is obviously being called, but nothing is being found.
I feel I am suffering from a lck of understanding on how the Dreamweaver datgrid is handled by MX.
Can anyone shed some light on this?
p.s. I have also noticed that if I have a pageLoad sub present and the databind command is on it the pushbutton event never gets to the handler bt linkButton event does! Any idea why this is happening?