email and hyperlinks in a datagrid

  • Thread starter Thread starter Ken Loomis
  • Start date Start date
K

Ken Loomis

Hello:

New to the group here. I've been dabbling in C# for several months.

I have a column of contacts consisting of telephone numbers, email
addresses, and URLS. What's a good way to allow a user to double
click on a contact address and bring up an email client (address
filled in, of course) or a web page, depending on the link type?

The way I can see to do it is to apply a HitTest to the DataGrid,
check the type of link it is, and then call the appropriate
application. Is there an easier, more built-in way?

Thanks,

Ken
 
Yes, you can use HitTest() to find the column clicked and based on its text,
do:

Process.Start ("mailto:<email id>?Subject=sub text");
OR
Process.Start ("<URL>");

HTH.

Hello:

New to the group here. I've been dabbling in C# for several months.

I have a column of contacts consisting of telephone numbers, email
addresses, and URLS. What's a good way to allow a user to double
click on a contact address and bring up an email client (address
filled in, of course) or a web page, depending on the link type?

The way I can see to do it is to apply a HitTest to the DataGrid,
check the type of link it is, and then call the appropriate
application. Is there an easier, more built-in way?

Thanks,

Ken
 
Yes, you can use HitTest() to find the column clicked and based on its text,
do:

Process.Start ("mailto:<email id>?Subject=sub text");
OR
Process.Start ("<URL>");

HTH.

OK. Thanks a lot for the reply.

Ken
 
Back
Top