Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Kristopher Davis   on Oct 19 In Asp.net Category.

  
Question Answered By: Juan Reynolds   on Oct 19

I've still got a kind of a similar problem:
when using this commandbutton in the datagrid  i want to get the name in the
third column...
but this gives an empty string
When using cells(2) there is no problem  at all, but there i'm using a
boundcolumn...


Public Sub ShowInfo(ByVal objSender As System.Object, ByVal objArgs As
DataGridCommandEventArgs) ' Handles DataGrid1.ItemCommand
If objArgs.CommandSource.commandname = "Info" Then

Dim myName As string  = objArgs.Item.Cells(3).Text
Response.Redirect("./webForm1.aspx?myMovie=" & myName)

End If
End Sub
my cell(3):

<asp:TemplateColumn HeaderText="Titel">
<ItemTemplate>
<asp:Label ID="lblmovieName"
Text='<%#DataBinder.Eval(Container.DataItem, "movieName") %>' Runat="server"/>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtmovieName" Width="300" Text='<%#
DataBinder.Eval(Container.DataItem, "movieName") %>' Runat="server"/>
</EditItemTemplate>
</asp:TemplateColumn>

Share: 

 

This Question has 6 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Button in datagrid Or get search suggestion and latest updates.


Tagged: