Datagrid column size

  • Thread starter Thread starter nomenklatura
  • Start date Start date
N

nomenklatura

Hi,
How can i change datagrid column size?
Dim strTablo As String

strTablo = "TBL_" & strFirmaNo & "_CLCARD"

sqlDS = New DataSet



sqlConn = New SqlCeConnection(strBaglantiLocal)

strQuery = "SELECT LOGICALREF,DEFINITION_ AS AÇIKLAMA FROM " & strTablo & "
WHERE DEFINITION_<>'' AND DEFINITION_ LIKE '" & sCari & "%' ORDER BY
DEFINITION_"



sqlDA = New SqlCeDataAdapter(strQuery, sqlConn)

sqlDA.Fill(sqlDS, strTablo)

DGTeminci.DataSource = sqlDS.Tables(strTablo)

i fill datagrdi , ok..

but i want to show only second column and fit this column size what i want..

I must hide first column.

In vb it is very simple (for example
=datagrid.columns(0).width=0,datagrid.columns(1).width=300)

But .net very complex...

Thanks lot for advance
 
You will need to set up the columns manually. Look into the classes that
derive from DataGridColumnStyle, such as DataGridTextBoxColumn, and also
look up the DataGridTableStyle class.
 
Back
Top