Hello all,
The following is my join query through which I am showing the 3 columns in the datagrid as QuesGroup, Question and Answer. I want to set the column width and headertext in the datagrid at the runtime using vb.net winforms.
I ahave used :
dgUserResponse.PreferredColumnWidth property,but it sets the same width to all columns.
I have used the datagridcolumnStyle property.I have searched for that also but I got only for the simple query and not for the join query.
dgUserRsponse is my datagrid.
Can anybody please help me out ?
getUserResponse = “select g.QuesGroup,q.Question,u.Answer from Question q,UserResponse u,QuesGroup g where q.QuesId=u.QuesId and q.QuesGrpId=g.QuesGrpId and u.CandidateId=” & UserId & " order by u.ResId"
cmdGetUserResponse = New OleDbCommand(getUserResponse, con)
'drGetUserResponse = cmdGetUserResponse.ExecuteReader
daGetUserResponse = New OleDbDataAdapter(cmdGetUserResponse)
daGetUserResponse.Fill(dsGetUserResponse) dgUserResponse.DataSource=dsGetUserResponse.Tables(0).DefaultView