Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > hyper link in DataGrid

Reply
Thread Tools

hyper link in DataGrid

 
 
Alexander Kaplunov
Guest
Posts: n/a
 
      12-17-2003
I have a DataGrid, which gets populated by DataSet.

DataGrid1.DataSource=ds;
DataGrid1.DataBind();

What I need to do is when the DataGrid is populated each item in first
column should be a link (or something clickable). I need to be able to know
when user has clicked on a particular item and then I can take some action.

Maybe I shouldn't use DataGrid? Any help would be appreciated.

Thank you,
Alex.


 
Reply With Quote
 
 
 
 
Mahesh ChandraMouli[MVP]
Guest
Posts: n/a
 
      12-18-2003
Hi,

Here is the sample.

<aspataGrid runat="server" id="DataGridID"
AutoGenerateColumns="False"
...>

<Columns>
...
<asp:HyperLinkColumn Text="Hyperlink Text"
DataNavigateUrlField="SomeDataSourceField"
DataNavigateUrlFormatString="/details.aspx?ID=
{0}"
Target="_blank" />
...
</Columns>
</aspataGrid>

on the ItemDataBound column you can raise ur method.


Regards
Mahesh ChandraMouli
Microsoft .NET MVP|MCAD (Charter Member)


>-----Original Message-----
>I have a DataGrid, which gets populated by DataSet.
>
>DataGrid1.DataSource=ds;
>DataGrid1.DataBind();
>
>What I need to do is when the DataGrid is populated each

item in first
>column should be a link (or something clickable). I need

to be able to know
>when user has clicked on a particular item and then I

can take some action.
>
>Maybe I shouldn't use DataGrid? Any help would be

appreciated.
>
>Thank you,
>Alex.
>
>
>.
>

 
Reply With Quote
 
 
 
 
James Radke
Guest
Posts: n/a
 
      12-18-2003
Alex,

What kind of action do you want to take when the link is clicked?

Jim

"Alexander Kaplunov" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have a DataGrid, which gets populated by DataSet.
>
> DataGrid1.DataSource=ds;
> DataGrid1.DataBind();
>
> What I need to do is when the DataGrid is populated each item in first
> column should be a link (or something clickable). I need to be able to

know
> when user has clicked on a particular item and then I can take some

action.
>
> Maybe I shouldn't use DataGrid? Any help would be appreciated.
>
> Thank you,
> Alex.
>
>



 
Reply With Quote
 
Alexander Kaplunov
Guest
Posts: n/a
 
      12-18-2003
Make a DB call and repopulate the DataGrid with new stuff returned from DB.


"James Radke" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Alex,
>
> What kind of action do you want to take when the link is clicked?
>
> Jim
>
> "Alexander Kaplunov" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I have a DataGrid, which gets populated by DataSet.
> >
> > DataGrid1.DataSource=ds;
> > DataGrid1.DataBind();
> >
> > What I need to do is when the DataGrid is populated each item in first
> > column should be a link (or something clickable). I need to be able to

> know
> > when user has clicked on a particular item and then I can take some

> action.
> >
> > Maybe I shouldn't use DataGrid? Any help would be appreciated.
> >
> > Thank you,
> > Alex.
> >
> >

>
>



 
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
Hyper Link in DataGrid aroraamit81@gmail.com ASP .Net 3 03-03-2006 01:09 PM
Hyper link in Datagrid Meheraj shaik via .NET 247 ASP .Net 1 07-19-2005 10:36 AM
open default MUA with a hyper link Yann.K Python 9 09-08-2004 06:40 PM
Re: open default MUA with a hyper link Jonathan Ellis Python 2 09-06-2004 08:22 AM
Re: Datagrid and hyper link question? k-re ASP .Net 1 06-25-2003 01:54 PM



Advertisments