Where can i see the expression property of a column in datagrid?

Joined
Aug 8, 2011
Messages
20
Location
Batangas City, Philippines
Programming Experience
Beginner
Where can i see the expression property of a column in datagrid?
 
You can't because they don't have one. I said in your previous thread that you should add a new column to your DataTable. If you're using a typed DataSet then you can add the column in the designer, otherwise you would add the column in code immediately after populating the table. You then bind that DataTable to your grid and the grid will display the extra column automatically.

If you're adding the column in code then you need to Add to the table's Columns collection.
 
sir i added a new column as you said.. in my sql design view...

and this is my code to connect my sql table to vb.net datagridview

-------------------
Imports System.Data.SqlClient


Public Class Form2
Private cs As New SqlConnection("Data Source=JARM\SQLEXPRESS;Initial Catalog=SEARCH_STUDENT1;Integrated Security=True")
Private da As New SqlDataAdapter("SELECT * FROM tblsearchstudents1", cs)
Private ds As New DataSet
Private cmb As New SqlCommandBuilder(da)




Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
da.Fill(ds, "tblsearchstudents1")
dg.DataSource = ds.Tables("tblsearchstudents1")


End Sub

-------------


where should i put this code??

IIF(Grade >= 4, 'Failed', IIF(Grade IN (1, 2, 3), 'Passed', 'Unknown'))

thanks sir.. waiting for your kind reply
 
I've already told you what to do - twice - and you're just not doing it. I did not tell you to make the change in the grid and I did not tell you to make the change in the database. I told you - twice - to make the change in the DataTable. There's no point my telling you again because either you'll just ignore it again or else you can simply go back and read what I've already posted.
 
sir thank you very much! it worked!!! im sorry i didnt try to understand what you are saying rather i post and post again.. thank you thank you a big help for our thesis...

the bad is.. im the only one making our system thesis.. coz im the only one who thinks that i can.. thanks
 
Back
Top