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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top