thanks, well that sort of helped as i can now manuipulate my other columns
easier but im still no closer to adding a
check box
heres my current code:
Dim ts As New DataGridTableSt yle
ts.MappingName = "Table"
Dim txtID As New DataGridTextBox Column
txtID.MappingNa me = "ID"
txtID.HeaderTex t = "ID"
txtID.Width = 50
ts.GridColumnSt yles.Add(txtID)
Dim txtID1 As New DataGridTextBox Column
txtID1.MappingN ame = "Postcode"
txtID1.HeaderTe xt = "Postcode"
txtID1.Width = 80
ts.GridColumnSt yles.Add(txtID1 )
Dim txtID2 As New DataGridTextBox Column
txtID2.MappingN ame = "DistributionVo lume"
txtID2.HeaderTe xt = "Distributi on Volume"
txtID2.Width = 80
ts.GridColumnSt yles.Add(txtID2 )
Dim txtID3 As New DataGridTextBox Column
txtID3.MappingN ame = "Distributo r"
txtID3.HeaderTe xt = "Distributo r"
txtID3.Width = 80
ts.GridColumnSt yles.Add(txtID3 )
Dim txtID4 As New DataGridTextBox Column
txtID4.MappingN ame = "Frequency"
txtID4.HeaderTe xt = "Frequency"
txtID4.Width = 80
ts.GridColumnSt yles.Add(txtID4 )
Dim txtID5 As New DataGridTextBox Column
txtID5.MappingN ame = "WeekCommencing "
txtID5.HeaderTe xt = "Week Commencing"
txtID5.Width = 80
ts.GridColumnSt yles.Add(txtID5 )
Dim txtID6 As New DataGridTextBox Column
txtID6.MappingN ame = "Active"
txtID6.HeaderTe xt = "Active"
txtID6.Width = 80
ts.GridColumnSt yles.Add(txtID6 )
Dim txtID7 As New DataGridTextBox Column
txtID7.MappingN ame = ""
txtID7.HeaderTe xt = "CHECKBOX HERE PLEASE"
txtID7.Width = 120
ts.GridColumnSt yles.Add(txtID7 )
DataGrid1.Table Styles.Clear()
DataGrid1.Table Styles.Add(ts)
Me.DataGrid1.Da taSource = ds.Tables(0)
i dont seem to be able to add the DataGridCheckBo xColumn you originally
mentioned
and also this column should not be mapped to anything
Thanks
Mike
"Lars Netzel" <[stop_spam]@host.topdomain > wrote in message
news:OF******** *****@TK2MSFTNG P11.phx.gbl...
Here: You create a Column and add to the style that you then add to the
Grid (like you did)
Dim ts As New DataGridTableSt yle
ts.MappingName = "Table"
Dim txtID As New DataGridTextBox Column
txtID.MappingNa me = "ID column name from database"
txtID.HeaderTex t = "ID"
txtID.Width = 50
ts.GridColumnSt yles.Add(txtID)
DataGrid1.Table Styles.Clear()
DataGrid1.Table Styles.Add(ts)
Me.DataGrid1.Da taSource = ds.Tables(0)
/Lars
"Mike Fellows" <mi************ ***@equityhouse .co.uk> skrev i meddelandet
news:rf******** *****@newsfe1-gui.server.ntli .net... Ok,
ive added my TableStyle (i think)
Dim ts As New DataGridTableSt yle
ts.MappingName = "Table"
DataGrid1.Table Styles.Clear()
DataGrid1.Table Styles.Add(ts)
Me.DataGrid1.Da taSource = ds.Tables(0)
but now i still have no idea how to add the extra column
Thanks
Mike
"Lars Netzel" <[stop_spam]@host.topdomain > wrote in message
news:%2******** **********@TK2M SFTNGP11.phx.gb l... You need to add a TableStyle to the Grid, including the Columns you want. Make the last Column you add to the style a DataGridCheckBo xColumn
/Lars
"Mike Fellows" <mi************ ***@equityhouse .co.uk> skrev i
meddelandet news:Qp******** ****@newsfe1-gui.server.ntli .net...
> im trying (unsucessfully) to add a checkbox column to my datagrid
>
> i basically have a datagrid that im populating from a dataset
>
> Me.DataGrid1.Da taSource = ds.Tables(0)
>
> the datagrid then has 5 columns in it but i need to add a sixth
column > which will be my checkbox column - any help or pointers with this
> would be great
>
> Thanks
>
> Mike
>
>