Results 1 to 6 of 6

Thread: Event: ItemDataBound replacement

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2006
    Posts
    45

    Event: ItemDataBound replacement

    hi,

    i found this event: ItemDataBound
    which is for the datagrid WebControls.
    i am looking for the same event in the datagrid for windows apps.
    but i can't find it. is there such a replacement for this?

    thanks

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Event: ItemDataBound replacement

    There are a great many differences between WinForms and WebForms so it's not even worth comparing. What are you trying to achieve? Once we know that we can suggest the best way to accomplish it.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Member
    Join Date
    Apr 2006
    Posts
    45

    Re: Event: ItemDataBound replacement

    i want to append a 2 combobox to a datagrid.
    which is bounded to a database. for example:
    Database Fields:
    AnimalType AnimalName AnimalQuantity
    ComboBox ComboBox Normal Cell

    so for each AnimalName cell, it would be dependent on the AnimalType depending on the selection(e.g. Fowl, Mammal, Arachnid, Marine)

    AnimalType and AnimalName would also be bounded to different databases

    i figured this would be hard coded because of the additional functionalities.

    and the only way i could come up is controlling the datagrid in this manner

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Event: ItemDataBound replacement

    Are you using .NET 1.x? Please specify your version in future. If not then use a DataGridView instead, which is much more functional. If you must use a DataGrid then you can certainly place ComboBoxes and other controls in cells, but I can't claim to have done it myself as I've never really used DataGrids. Follow the WinForms FAQ link in my signature and check out the DataGrid section, which has plenty of material and I'd be shocked if it didn't explain how to host a ComboBox.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Member
    Join Date
    Apr 2006
    Posts
    45

    Re: Event: ItemDataBound replacement

    yes,
    i'm using Visual Studio 2003 .Net 1.1
    datagridview?
    hm.. ok. i'll check it out.

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Event: ItemDataBound replacement

    The DataGridView is new in .NET 2.0. That's why I said if you're NOT using .NET 1.x then you should use a DataGridView. If you ARE using .NET 1.x then you are limited to the DataGrid.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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