GridView - get column value for a ButtonField
GridView - get column value for a ButtonField
GridView - get column value for a ButtonField
GridView - get column value for a ButtonField
GridView - get column value for a ButtonField
GridView - get column value for a ButtonField GridView - get column value for a ButtonField GridView - get column value for a ButtonField GridView - get column value for a ButtonField GridView - get column value for a ButtonField GridView - get column value for a ButtonField GridView - get column value for a ButtonField GridView - get column value for a ButtonField
GridView - get column value for a ButtonField GridView - get column value for a ButtonField
GridView - get column value for a ButtonField
Go Back  Xtreme Visual Basic Talk > > > GridView - get column value for a ButtonField


Reply
 
Thread Tools Display Modes
  #1  
Old 07-15-2008, 11:59 AM
snufse's Avatar
snufse snufse is offline
Centurion
 
Join Date: Jul 2003
Location: West Palm Beach FL
Posts: 180
Default GridView - get column value for a ButtonField


I am having problems get column value for a ButtonField (type= Link). Here is the code I'm working with:

Code:
Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs)
If e.CommandName = "description" Then
            Dim index = Convert.ToInt32(e.CommandArgument)
            Dim mySelectedRow As GridViewRow = GridView1.Rows(index)
            Dim myLinkButton As LinkButton
            myLinkButton = mySelectedRow.FindControl("description")
            Dim jobtext As String = myLinkButton.Text
        End If
On last line of the code I get following error:

Object reference not set to an instance of an object.

Not sure if I am even on the right track. Can anyone help? Thank you.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
GridView - get column value for a ButtonField
GridView - get column value for a ButtonField
GridView - get column value for a ButtonField GridView - get column value for a ButtonField
GridView - get column value for a ButtonField
GridView - get column value for a ButtonField
GridView - get column value for a ButtonField GridView - get column value for a ButtonField GridView - get column value for a ButtonField GridView - get column value for a ButtonField GridView - get column value for a ButtonField GridView - get column value for a ButtonField GridView - get column value for a ButtonField
GridView - get column value for a ButtonField
GridView - get column value for a ButtonField
 
GridView - get column value for a ButtonField
GridView - get column value for a ButtonField
 
-->