|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
bound columns of a datagridi 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 Use HyperLinkColumn
HTH, Elton Wang elton_w***@hotmail.com >-----Original Message----- the first column>i have a datagrid with few bound columns.i want to make >clickable.can i make a bound column clickable and write a value of a hiddenhandler 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 >column of the selected row and pass it on to another page.the key fieldShow quoteHide quote >column is hidden. >thanks in advance >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 > > > > > >. > > 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----- faced there was it can>i have tried using hyperlink column but the problem i >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 theShow 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 >> > >> > >> >. >> > > > >. >
How to pass the selected row of a datagrid to another form
Datagrid Dropdownlist in default in edit mode Adding "delete" functionality in DataGrid - without a ButtonColumn How To Insert ASP.NET User Control into DataGrid Column? Adding CSS to LinkButton JavaScript confirmation Add header text dynamically in a datagrid with templatecolumns? Datagrid colum has no Dataformat property Can we put ActiveX Control into the DataGrid Column? Printer-Friendly DataGrid option |
|||||||||||||||||||||||