Results 1 to 3 of 3

Thread: Custom Datagrid Tamplate column

  1. #1

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

    Question Custom Datagrid Tamplate column

    Hello,

    I have datagrid with tamplate column. I bind dataset to it, with column named "Type".

    I need to do this:

    If type = "textbox" then put textbox in row, if Listbox, then listbox and so on.
    Other logic I'll create my self.

    I do not know how dynamicaly add controls to datagrid when binding.

    Any ideas?

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Custom Datagrid Tamplate column

    You can always add a control in the ItemDataBound event, but you'll need to explain the logic of

    type="textbox"

    first.

  3. #3

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

    Re: Custom Datagrid Tamplate column

    If row in db table have string "textbox" then I add textbox control to datagrid word, if string "listbox" then listbox and so on.

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