Question add new column in gridview

nutsxiera

Member
Joined
Aug 5, 2010
Messages
7
Programming Experience
1-3
hi all.. do anyone know how to add a new column in gridview using vb.net syntax?:confused:

the new column that i want to add is not bind to any database unlike the other column in the same gridview.

i try to use
GridView1.Columns.Add("New")
but it turn out to be error. :(
the error said " Value of type 'String' cannot be converted to 'System.Web.UI.WebControls.DataControlField'"

this picture is what i try to get
before:
before.jpg


the image above show the original gridview that bind with access database
after:
after.jpg


the image above (the 'new' column) is a new column that i try to create which do not bind with database (only the new column.)

the reason that the new column do not bind with database because i want to trigger the "<30" based on the condition of the value in total column(using selection statement)


i'm still new in vb.net and hope that all of you can help me :eek:
thanks in advance :)
 
Back
Top