Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Datagrid & imagebutton

Reply
Thread Tools

Datagrid & imagebutton

 
 
Alessandro
Guest
Posts: n/a
 
      08-18-2003
I have a datagrid with a templatecolumn, in this template there are two
imagebutton, one for modify the record, one to cancel, but i'm not able to
retrive the unique which is memorized in a hidden column, any idea ?
I tried to set commandargument parameter via code, but i wasn't able to
assign it.


 
Reply With Quote
 
 
 
 
Jim Mitchell
Guest
Posts: n/a
 
      08-19-2003
Let me know if this helps....



Private Sub dgAccountPages_ItemCommand1(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs ) Handles
dgAccountPages.ItemCommand

Dim dg_index As Integer

Dim contact_id As Integer

Dim temp As Integer

txtPagePick.Text = "It was clicked"

dgAccountPages.DataKeyField = "IDofContact"

dg_index = e.Item.ItemIndex

contact_id = dgAccountPages.DataKeys.Item(e.Item.ItemIndex)

txtContactID.Text = contact_id

Select Case e.CommandSource.id

Case "imgbtnContactNote"

btnAddNote.Text = "Add Note"

Case "imgbtnContactCalendar"

btnAddNote.Text = "Add Activity"

End Select


"Alessandro" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> I have a datagrid with a templatecolumn, in this template there are two
> imagebutton, one for modify the record, one to cancel, but i'm not able to
> retrive the unique which is memorized in a hidden column, any idea ?
> I tried to set commandargument parameter via code, but i wasn't able to
> assign it.
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Triggering ItemCommand with ImageButton in Datagrid Lars Netzel ASP .Net 3 10-12-2006 07:58 PM
Datagrid imagebutton not responding Dave ASP .Net 0 07-09-2004 09:53 AM
imagebutton clicked in a datagrid EMW ASP .Net 0 07-02-2004 03:04 PM
datagrid imagebutton mike parr ASP .Net 4 05-20-2004 12:31 PM
Datagrid + ImageButton = Slooooowwwww Jake ASP .Net 2 08-04-2003 03:15 PM



Advertisments