How to populate a text box inside a gridview in vb.net -


i have 1 gridview contains textbox in row 0 column 0.

my question is, how can populate textbox in row 0 in column 0from vb.net code behind display letter "a" in textbox.

i using instruction, textbox disapear.

gridview.rows(0).cells(0).text ="a" 

thanks in advance.

gridview.rows(0).cells(0).text ="a" place letter "a" in same rendered td textbox.

you need find the specific textbox control want populate.

if gridview databound can in gridview's databound event. or if it's not databound can use page.prerendercomplete event. there must form of backing data or gridview not render data rows contain textbox (or did place textbox in header or footer?)

but in either case need find textbox control within specific row. in question looking in row 1 need this:

    dim row gridviewrow = gridview1.rows(0)     dim tbx textbox = row.findcontrol("textbox1")     if tbx isnot nothing tbx.text = "a" 

Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -