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

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -