Home All Groups Group Topic Archive Search About
Author
17 Feb 2005 5:23 AM
Sabina
i have a datagrid with few bound columns.i want to make the first column
clickable.can i make a bound column clickable and write a handler for
that.if that is not possible what is the otherway of doing it.
when i click on the column i should be able to get the value of a hidden
column of the selected row and pass it on to another page.the key field
column is hidden.
thanks in advance
sabina

Author
17 Feb 2005 2:58 PM
Elton Wang
Use HyperLinkColumn

HTH,

Elton Wang
elton_w***@hotmail.com

>-----Original Message-----
>i have a datagrid with few bound columns.i want to make
the first column
>clickable.can i make a bound column clickable and write a
handler for
>that.if that is not possible what is the otherway of
doing it.
>when i click on the column i should be able to get the
value of a hidden
>column of the selected row and pass it on to another
page.the key field
Show quoteHide quote
>column is hidden.
>thanks in advance
>sabina
>
>
>.
>
Author
21 Feb 2005 6:46 AM
Sabina
i have tried using hyperlink column but the problem i faced there was it can
pass the hyperlinked columns value to the navigateurl page.what i need to
pass to the navigate url page is the value of a invisible column of the
clicked row.

thanks
sabina




Show quoteHide quote
"Elton Wang" <anonym***@discussions.microsoft.com> wrote in message
news:294b01c51501$14118410$a501280a@phx.gbl...
> Use HyperLinkColumn
>
> HTH,
>
> Elton Wang
> elton_w***@hotmail.com
>
> >-----Original Message-----
> >i have a datagrid with few bound columns.i want to make
> the first column
> >clickable.can i make a bound column clickable and write a
> handler for
> >that.if that is not possible what is the otherway of
> doing it.
> >when i click on the column i should be able to get the
> value of a hidden
> >column of the selected row and pass it on to another
> page.the key field
> >column is hidden.
> >thanks in advance
> >sabina
> >
> >
> >.
> >
Author
21 Feb 2005 4:45 PM
Elton Wang
You can't directly get a value from invisible column after
postback. So either you get it from datagrid's underlying
data source (if you set P-Key column invisible, it is also
unavailable) or use HyperLinkColumn and in
datagrid_ItemDataBound event rebuild NavigateUrl with a
query string like

HyperLink link = (HyperLink)e.Item.Cells[colindex].Controls
[0];
link.NavigateUrl = url + "?id=" + dataFromHidenCol;

HTH

Elton Wang

>-----Original Message-----
>i have tried using hyperlink column but the problem i
faced there was it can
>pass the hyperlinked columns value to the navigateurl
page.what i need to
>pass to the navigate url page is the value of a invisible
column of the
Show quoteHide quote
>clicked row.
>
>thanks
>sabina
>
>
>
>
>"Elton Wang" <anonym***@discussions.microsoft.com> wrote
in message
>news:294b01c51501$14118410$a501280a@phx.gbl...
>> Use HyperLinkColumn
>>
>> HTH,
>>
>> Elton Wang
>> elton_w***@hotmail.com
>>
>> >-----Original Message-----
>> >i have a datagrid with few bound columns.i want to make
>> the first column
>> >clickable.can i make a bound column clickable and
write a
>> handler for
>> >that.if that is not possible what is the otherway of
>> doing it.
>> >when i click on the column i should be able to get the
>> value of a hidden
>> >column of the selected row and pass it on to another
>> page.the key field
>> >column is hidden.
>> >thanks in advance
>> >sabina
>> >
>> >
>> >.
>> >
>
>
>.
>