Remove Column from a GridView (VB.NET 2008) -
{vb.net 2008 using northwind microsoft database} how can remove column name id demogrid ? (without using sql code)
    dim strsql string = _      "select * products categoryid=1"      try         using adapter new oledbdataadapter(strsql, _           my.settings.oledbconnectionstring)              dim ds new dataset             adapter.fill(ds, "productinfo")               demolist.displaymember = "productname"             demolist.valuemember = "productid"              demogrid.datasource = ds.tables("productinfo")          end using      catch ex exception         messagebox.show(ex.message)     end try 
you can remove column don't like
gridviewname.columns.remove("columnname") 
Comments
Post a Comment