Click here to Skip to main content
15,895,283 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to Get returned value from other application(s) ? Pin
Martin#8-Apr-07 8:04
Martin#8-Apr-07 8:04 
GeneralRe: how to Get returned value from other application(s) ? [modified] Pin
electriac8-Apr-07 11:48
electriac8-Apr-07 11:48 
GeneralRe: how to Get returned value from other application(s) ? Pin
Martin#9-Apr-07 19:57
Martin#9-Apr-07 19:57 
GeneralRe: how to Get returned value from other application(s) ? Pin
hdv2127-Apr-07 5:59
hdv2127-Apr-07 5:59 
GeneralRe: how to Get returned value from other application(s) ? Pin
electriac7-Apr-07 6:09
electriac7-Apr-07 6:09 
Questionhow to playback avi stream with directShow? Pin
hdv2126-Apr-07 23:05
hdv2126-Apr-07 23:05 
Questionsimple email program.. Pin
Prashanth KP6-Apr-07 23:00
Prashanth KP6-Apr-07 23:00 
AnswerRe: simple email program.. Pin
Pualee7-Apr-07 7:14
Pualee7-Apr-07 7:14 
Questionusing DirectX Video class in a C#.NET application Pin
xesion6-Apr-07 21:41
xesion6-Apr-07 21:41 
AnswerRe: using DirectX Video class in a C#.NET application Pin
xesion6-Apr-07 21:54
xesion6-Apr-07 21:54 
QuestionAssociating Icons in C# Pin
Rohithaa6-Apr-07 20:01
Rohithaa6-Apr-07 20:01 
AnswerRe: Associating Icons in C# Pin
Nader Elshehabi6-Apr-07 23:20
Nader Elshehabi6-Apr-07 23:20 
QuestionRe: Associating Icons in C# Pin
Rohithaa6-Apr-07 23:58
Rohithaa6-Apr-07 23:58 
AnswerRe: Associating Icons in C# Pin
Nader Elshehabi7-Apr-07 2:21
Nader Elshehabi7-Apr-07 2:21 
QuestionUsing Controls in Classes [modified] Pin
freshonlineMax6-Apr-07 19:08
freshonlineMax6-Apr-07 19:08 
AnswerRe: Using Controls in Classes Pin
Nader Elshehabi6-Apr-07 23:23
Nader Elshehabi6-Apr-07 23:23 
Questionseveral events - one action Pin
Glen Harvy6-Apr-07 17:29
Glen Harvy6-Apr-07 17:29 
AnswerRe: several events - one action Pin
Not Active6-Apr-07 17:43
mentorNot Active6-Apr-07 17:43 
GeneralRe: several events - one action Pin
Glen Harvy6-Apr-07 17:49
Glen Harvy6-Apr-07 17:49 
GeneralRe: several events - one action Pin
Sathesh Sakthivel6-Apr-07 18:02
Sathesh Sakthivel6-Apr-07 18:02 
GeneralRe: several events - one action Pin
Glen Harvy6-Apr-07 18:19
Glen Harvy6-Apr-07 18:19 
GeneralRe: several events - one action Pin
Sathesh Sakthivel6-Apr-07 18:22
Sathesh Sakthivel6-Apr-07 18:22 
GeneralRe: several events - one action Pin
Scott Dorman6-Apr-07 19:49
professionalScott Dorman6-Apr-07 19:49 
GeneralRe: several events - one action Pin
Glen Harvy6-Apr-07 23:07
Glen Harvy6-Apr-07 23:07 
GeneralRe: several events - one action Pin
Scott Dorman7-Apr-07 4:28
professionalScott Dorman7-Apr-07 4:28 
Glen Harvy wrote:
I tried a couple of variations except "sender as" so I was at least on the right track.


Yes, you were definately on the right track. While this isn't a design pattern in the proper sense of the word, it is fairly common. The nice thing with this cast is that if the cast fails it doesn't throw an exception...the variable is null so you can test for that condition before doing more work.

Glen Harvy wrote:
I've set the variable part of each of the datatables in the datagridviews tag and hence the need to read that value.


Given the scenario you are working with, this is probably the best option. I believe you can also get a reference to the underlying datasource from the EventArgs, so you could probably also look at the DataTable name.

Glen Harvy wrote:
Obviously I'm trying to code efficiently as well as successfully


That is always the best way to do it, but it seems they don't always go hand-in-hand. Smile | :) Code Project is probably one of the best places to learn as you get a wide variety of experience and solutions, plus the benefit of the articles. Sometimes we can be a bit grouchy, but that's usually because we haven't had morning coffee (or tea) yet. Smile | :)

-----------------------------
In just two days, tomorrow will be yesterday.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.