• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 773
  • Last Modified:

Control check box in ComponentOne datagrid

Hi, expert...

i would like to control every check box in the row which when the check state change.... the caption at others columns also will change...during the design time....i had set "Presentation" = CheckBox.  May i know what is the code to control the checkbox check state?

Thank you.
0
chkueh
Asked:
chkueh
3 Solutions
 
G0ggyCommented:
CheckBox1.Checked will check a check box.
0
 
ElrondCTCommented:
I haven't used ComponentOne's products, but in general if you want to know when a check box inside a DataGrid has changed, you'll need to set up an event handler for the table's ColumnChanging event, like so (where ds is the DataSet, and dtTable is the DataTable within the DataSet that your DataGrid is displaying):
' Put this line in the Form Load event handler
    AddHandler ds.dtTable.ColumnChanging, New DataColumnChangeEventHandler(AddressOf MyTableColumnChanging)

    Private Sub MyTableColumnChanging(ByVal sender As Object, ByVal e As DataColumnChangeEventArgs)
        If e.Column.ColumnName = "Presentation" and e.ProposedValue = True Then
            ' Do whatever you want when the box is checked
        End If 
    End Sub

Open in new window

0
 
CodeCruiserCommented:
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
chkuehAuthor Commented:
Hi, ElrondCT...

should i need to declare anythings 1st before i put "AddHandler ds.dtTable.ColumnChanging, New DataColumnChangeEventHandler(AddressOf MyTableColumnChanging)" at form load? because i get an error "dtTable is not a member of 'System.Data.DataTable".

even i change my dataSet to my own...the error is "dtKitting is not a member of 'System.Data.DataSet"...

what should i do first? thanks..
0
 
ElrondCTCommented:
"ds.dtTable" needs to be changed to your DataSet and DataTable names. They need to be declared before the AddHandler statement.
0
 
chkuehAuthor Commented:
Problem partial solved. thanks
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now