PC Review


Reply
Thread Tools Rate Thread

Coding for events with datagrid

 
 
=?Utf-8?B?TWVsYW5pZSBQZXRlcnNvbg==?=
Guest
Posts: n/a
 
      24th Jul 2006
Hi all,

I'm coding for an event in a DataGrid. I started with OnPreRender, but at
this point I don't really care which event I use, as long as my code executes
before the DataGrid displays on the Web page (grrr!). My problem is that all
the DataGrid events seem to require System.EventArgs be passed to the
function I'm writing, instead of DataGridCommandEvenArgs. But if I use
System.EventArgs, how do I assign the text of a particular datagrid cell to a
variable? For example, I'm constructing a hashtable and want to do the
following:

Dim htbAddlInfo As New Hashtable
htbAddlInfo.Add("Title", e.Item.Cells(2).Text)

That works if I pass DataGridColumnEventArgs to my function, but the
compiler complains that my function doesn't have the same signature as
Delegate Sub EventHandler, which requires System.EventArgs. If I change my
function to take e as Sytem.EventArgs, e.Item.Cells(2).Text is no longer
valid. How do I get around this? And WHY does the DataGrid have events that
don't support its eventargs? Second question is just rhetorical, but I'd
really love an answer on the first question.

Thanks!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
color coding events jcurtis Microsoft Outlook Calendar 2 7th Mar 2010 10:11 PM
Color Coding Scheduled Events Charles L. Phillips Microsoft Outlook Calendar 2 10th Aug 2005 09:27 PM
color coding calendar events KimB Microsoft Outlook Calendar 3 2nd Aug 2004 07:03 PM
Color-coding events in Calendar Joyce Witte Microsoft Outlook Calendar 1 30th Jun 2004 02:51 AM
Coding Events =?Utf-8?B?U21va2V5IHNtaXRo?= Microsoft Access Forms 1 19th Jun 2004 01:27 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:34 AM.