Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
24185 | Jan 30,2005 05:32 AM UTC | Feb 1,2005 01:08 AM UTC | WinForms | 11 |
![]() |
Tags: GridControl |
this.gridControl1[1,1].CheckBoxOptions = new GridCheckBoxCellInfo(true.ToString(), false.ToString(), "", true);
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.GridControl1(1, 1).CellType = "CheckBox"
Me.GridControl1(1, 1).CheckBoxOptions = New GridCheckBoxCellInfo(True.ToString(), False.ToString(), "", True)
AddHandler Me.GridControl1.CurrentCellChanged, AddressOf gridControl1_CurrentCellChanged
AddHandler Me.GridControl1.CheckBoxClick, AddressOf gridControl1_CheckBoxClick
End Sub
Private Sub gridControl1_CurrentCellChanged(ByVal sender As Object, ByVal e As EventArgs)
Console.WriteLine("gridControl1_CurrentCellChanged")
End Sub
Private Sub gridControl1_CheckBoxClick(ByVal sender As Object, ByVal e As GridCellClickEventArgs)
Console.WriteLine("gridControl1_CheckBoxClick")
End Sub
then CurrentCellChanged is hit for me with each click.
There is also a special CheckBox event, CheckBoxClicked, that is also hit when you click the CheckBox.
> Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
> Me.GridControl1(1, 1).CellType = "CheckBox"
> Me.GridControl1(1, 1).CheckBoxOptions = New GridCheckBoxCellInfo(True.ToString(), False.ToString(), "", True)
>
> AddHandler Me.GridControl1.CurrentCellChanged, AddressOf gridControl1_CurrentCellChanged
> AddHandler Me.GridControl1.CheckBoxClick, AddressOf gridControl1_CheckBoxClick
> End Sub
>
> Private Sub gridControl1_CurrentCellChanged(ByVal sender As Object, ByVal e As EventArgs)
> Console.WriteLine("gridControl1_CurrentCellChanged")
> End Sub
> Private Sub gridControl1_CheckBoxClick(ByVal sender As Object, ByVal e As GridCellClickEventArgs)
> Console.WriteLine("gridControl1_CheckBoxClick")
> End Sub
>
>
>then CurrentCellChanged is hit for me with each click.
>
>There is also a special CheckBox event, CheckBoxClicked, that is also hit when you click the CheckBox.
>
>
System.InvalidCastException: Specified cast is not valid.
at OnTrack.ui.OtDataGrid.OnCellsChanged(GridCellsChangedEventArgs e) in C:\MERCER\OnTrack\OnTrack\OtDataGrid.vb:line 40
I suspect these exceptions are why CurrentCellChanged is not being raiesed.
> System.InvalidCastException: Specified cast is not valid.
> at OnTrack.ui.OtDataGrid.OnCellsChanged(GridCellsChangedEventArgs e) in C:\MERCER\OnTrack\OnTrack\OtDataGrid.vb:line 40
>
>
>I suspect these exceptions are why CurrentCellChanged is not being raiesed. This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.