|
-
Aug 8th, 2005, 01:25 AM
#1
Thread Starter
Addicted Member
[RESOLVED] checkbox does not appear in datagrid
I need help with my checkbox. I am currently developing a program that lists all the data in the database and displays it in a datagrid. I plan to have a checkbox as the first column of the datagrid, if the box is checked, it means that that particular record has been edited. I looked over at some of threads available on this subject and it still doesn't work! All the data are displayed correctly but no checkbox!
What am I doing wrong?
Here's my code :
Public Sub PnF_Fill(ByVal dadaptPFCity As SqlClient.SqlDataAdapter, ByVal strFlag As String)
Try
Dim dgts_PnF As New DataGridTableStyle
Dim bcol1 As New DataGridBoolColumn
Dim acol1 As New DataGridTextBoxColumn
Dim acol2 As New DataGridTextBoxColumn
Dim dsPNF1 As New DataSet
dadaptPFCity.Fill(dsPNF1, "PLAN_N_FORECAST")
Dim dtPNF As New DataTable
Me.dg_Forecast.DataSource = dsPNF1.Tables("PLAN_N_FORECAST")
dtPNF = dsPNF1.Tables("PLAN_N_FORECAST")
dgts_PnF.MappingName = "PLAN_N_FORECAST"
bcol1.MappingName = "PLAN_N_FORECAST"
bcol1.HeaderText = "Add/Edit"
bcol1.Width = 40
dgts_PnF.GridColumnStyles.Add(bcol1)
acol1.MappingName = "Buss_Code"
acol1.HeaderText = "Business Line"
acol1.Width = 80
dgts_PnF.GridColumnStyles.Add(acol1)
acol2.MappingName = "Chan_Code"
acol2.HeaderText = "Currency Type"
acol2.Width = 80
dgts_PnF.GridColumnStyles.Add(acol2)
Me.dg_Forecast.TableStyles.Add(dgts_PnF)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|