This is a migrated thread and some comments may be shown as answers.

Can't execute a vb method with Checkbox inside a Column

1 Answer 30 Views
GridView
This is a migrated thread and some comments may be shown as answers.
kronnos_indigo
Top achievements
Rank 2
kronnos_indigo asked on 14 Apr 2010, 10:36 PM
Good afternoon Team Telerik

I have the next problem:

I add a new column template within checkbox call chkEstadoItem:
<telerikGridView:RadGridView.Columns> 
                <telerikGridView:GridViewColumn x:Name="colProtEst" Header="Prot" Width="25">        
                    <telerikGridView:GridViewColumn.CellTemplate> 
                        <DataTemplate> 
                            <CheckBox x:Name="chkEstadoItem" Checked="actualizarEstadoBotonAgregarItem" Unchecked="actualizarEstadoBotonAgregarItem" HorizontalAlignment="Left" VerticalAlignment="Top" Content="CheckBox" IsChecked="{Binding Estado}"/> 
                        </DataTemplate> 
                    </telerikGridView:GridViewColumn.CellTemplate> 
                </telerikGridView:GridViewColumn>            
but when the checkbox I do to chage state (unchecked <--> checked), it don't fire the vb method "actualizarEstadoBotonAgregarItem"
I put inside the this method a messabox as flag, but nothing...
The method is:
Protected Sub actualizarEstadoBotonAgregarItem(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) 
    Dim m, d As String, p As Integer 
    m = "actualizarEstadoBotonAgregarItem)-" : d = "Entra" : p = 0 
    Try 
      MessageBox.Show(o & vbCrLf & m & p & d, "", MessageBoxButton.OK) 
 
      p = 10 : ibAgregarItem.Visibility = IIf(gvProcesosItems.SelectedItems(0).Estado, Windows.Visibility.Collapsed, Windows.Visibility.Visible) 
    Catch ex As Exception 
      MessageBox.Show("Revisar: " & o & vbCrLf & m & p & vbCrLf & ex.Message) 
    End Try 
    d = ") Sale " 
    'p = 999 : MessageBox.Show(o & vbCrLf & m & p & d) 
  End Sub 
Second, How do I do for take the state of checkbox control?

Thanks for any help

Juan Pablo Díaz
Bogotá - Colombia



1 Answer, 1 is accepted

Sort by
0
kronnos_indigo
Top achievements
Rank 2
answered on 14 Apr 2010, 11:03 PM
I don't understand but NOW execute the method correctly..

Thanks..


JPDS
Tags
GridView
Asked by
kronnos_indigo
Top achievements
Rank 2
Answers by
kronnos_indigo
Top achievements
Rank 2
Share this question
or