Guys, i want to ask about gridview.
This is my code :
query = sql.SetSELECT("AsmbID,AsmbDesc,Remark,Material_Cost,Process_Cost,Expense", "MAssembly")
GridView1.DataSource = sql.FillDataSet(query).Tables.Item(0)
GridView1.DataBind()
then i just want to show only my first(0) coloumn, and this is the code :
'GridView1.Columns(1).Visible = False
'GridView1.Columns(2).Visible = False
'GridView1.Columns(3).Visible = False
'GridView1.Columns(4).Visible = False
'GridView1.Columns(5).Visible = False
but there is an error said :
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
i've debugg my code, and there is a coloumn in my dataset, but if we show in gridview, there no column, but if i want to show all my field, there will be there.
is there somebody can help me ?
This is my code :
query = sql.SetSELECT("AsmbID,AsmbDesc,Remark,Material_Cost,Process_Cost,Expense", "MAssembly")
GridView1.DataSource = sql.FillDataSet(query).Tables.Item(0)
GridView1.DataBind()
then i just want to show only my first(0) coloumn, and this is the code :
'GridView1.Columns(1).Visible = False
'GridView1.Columns(2).Visible = False
'GridView1.Columns(3).Visible = False
'GridView1.Columns(4).Visible = False
'GridView1.Columns(5).Visible = False
but there is an error said :
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
i've debugg my code, and there is a coloumn in my dataset, but if we show in gridview, there no column, but if i want to show all my field, there will be there.
is there somebody can help me ?