|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Can't get text value of hidden (visible = false) column..event handler. I have a datagrid with 4 columns: 1 - Name, 2 - Description, 3- Button Column (Edit,Update,Cancel), 4- Primary Key Value for row The 4th column is hidden as I need the data for subsequent update to the database, but don't need to display it in the grid. That said, I can't seem to figure out how to get the data value out of the column. If the column is visible I can see and access the value programatically. I've tried the following techniques: 1. e.item.cells(3).text --- always empty string 2. ctype(e.item.cells(3).controls(0), textbox).text --- has value if column is visible, empty string when hidden. Any help is appreciated... -jef Hidden columns don't get rendered to the client. If you need to get the
value after postback, hide the column with css rule display:none. Eliyahu Show quoteHide quote "jef" <jeffreyfrab***@gmail.com> wrote in message news:1111343578.946673.33750@f14g2000cwb.googlegroups.com... > I'm trying to get the value of a cell in my DataGrid_UpdateColumn() > event handler. I have a datagrid with 4 columns: > > 1 - Name, 2 - Description, 3- Button Column (Edit,Update,Cancel), 4- > Primary Key Value for row > > The 4th column is hidden as I need the data for subsequent update to > the database, but don't need to display it in the grid. That said, I > can't seem to figure out how to get the data value out of the column. > If the column is visible I can see and access the value > programatically. I've tried the following techniques: > > 1. e.item.cells(3).text --- always empty string > > 2. ctype(e.item.cells(3).controls(0), textbox).text --- has value if > column is visible, empty string when hidden. > > Any help is appreciated... > > -jef > Eliyahu... thanks for the reply.. however I'm so new at this I haven't
a clue how to implement your suggestion... Specify for the column parameter CssClass = Invisible. Make a stylesheet,
whether on the page or in a separate file and put in it Invisible class with display rule. This what you have to put in the <head> section of your .aspx file to add a stylesheet: <style type="text/css"> ..Invisible{display:none} </style> Eliyahu Show quoteHide quote "jef" <jeffreyfrab***@gmail.com> wrote in message news:1111364185.438774.326970@l41g2000cwc.googlegroups.com... > Eliyahu... thanks for the reply.. however I'm so new at this I haven't > a clue how to implement your suggestion... >
iterate through only one column of a datagrid
Annoyingly simple problem Datagrid window.open _EditCommand not firing... Access individual item in a datagrid Datagrid sorting does not work Group Headers in Datagrid Using an IF statment within an ItemTemplate Check Parent-child relationship in datagrid DataGrid doesn't do HTML entity encoding. |
|||||||||||||||||||||||