c# - Adding textbox to the gridview -


i have gridview , in gridview want add textboxes in first row dynamically(for search). error saying expected type int32.

        datarow dr = dt.newrow();         (int = 0; < gridview1.columns.count; i++)         {             tableheadercell cell = new tableheadercell();             textbox tb1 = new textbox();             tb1.attributes["placeholder"] = gridview1.columns[i].headertext;             tb1.cssclass = "search_textbox";             if (i != 0)             {                 cell.controls.add(tb1);              }             dr[i] = cell;                         }          dt.rows.insertat(dr, 1);         gridview1.datasource = dt;         gridview1.databind(); 

can please guide me, how add textbox first row in gridview ?

checkout solution implements filtering in gridview. hope can give direction.

asp.net gridview filter in header using reflection , linq-technobird's blog


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -