Šta je novo?

DataGrid???

Učlanjen(a)
17.10.2003
Poruke
183
Poena
619
Kako da postavim da kolone imaju razlicite sirine?
 
Baš neprecizno... Da li misliš na DataGrid u .NET Framework-u? Windows ili Web kontrolu? .NET 1.1 ili 2.0? Ako bih pretpostavio da misliš na .NET Framework 1.1 windows forms kontrolu, evo ti odgovora:

Kod:
' Visual Basic
Private Sub CreateAuthorFirstNameColumn()
   ' Add a GridTableStyle and set the MappingName 
   ' to the name of the DataTable.
   Dim TSAuthors As New DataGridTableStyle()
   TSAuthors.MappingName = "Authors"

   ' Add a GridColumnStyle and set the MappingName 
   ' to the name of a DataColumn in the DataTable. 
   ' Set the HeaderText and Width properties. 
   Dim TCFirstName As New DataGridTextBoxColumn()
   TCFirstName.MappingName = "AV_FName"
   TCFirstName.HeaderText = "First Name"
   TCFirstName.Width = 75
   TSAuthors.GridColumnStyles.Add(TCFirstName)

   ' Add the DataGridTableStyle instance to 
   ' the GridTableStylesCollection. 
   myDataGrid.TableStyles.Add(TSAuthors)
End Sub
 
Poslednja izmena:
Snadjoh se nekako...
Hvala.
 
Nazad
Vrh Dno