Results 1 to 2 of 2

Thread: Dynamicaly created TemplateColumn with CheckBox

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2000
    Location
    Europe, Lithuania
    Posts
    309

    Dynamicaly created TemplateColumn with CheckBox

    Hello,

    I want to add TemplateColumn to DataGrid dynamicaly.
    How to add, to this column checkbox (not bounded) and attach event, which argument has row values.


    With ButtonColumn it's simple:

    VB Code:
    1. Dim CallBtn As New ButtonColumn
    2. CallBtn.CommandName = "Deal"
    3. CallBtn.ButtonType = ButtonColumnType.LinkButton
    4. AddHandler RegDG.ItemCommand, AddressOf  RegDG_ItemCommand
    5.  
    6. Private Sub RegDG_ItemCommand(ByVal sender As Object, ByVal e As DataGridCommandEventArgs)
    7.             If e.CommandName = "Deal" Then
    8.                 CallSub(CType(e.CommandSource, LinkButton).Text)
    9.             End If
    10.         End Sub

    but what to do if I need checkbox, not button or linkbutton?

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2000
    Location
    Europe, Lithuania
    Posts
    309

    Angry

    No ideas?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width