datagrid and combo boxes

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rut

    datagrid and combo boxes

    I have a need to put a combobox in one column of a datagrid. My problem is that I need to be able to have different datasources for each row of comboboxes. Is there anyway to do this

    Thanks
    Rut
  • scorpion53061

    #2
    Re: datagrid and combo boxes

    I am assuming you have tried to bind the combo boxes to their data sources?
    [color=blue]
    > My problem is that I need to be able to have different
    >datasources for each row of comboboxes. Is there
    >anyway to do this?
    >
    > Thanks,
    > Rut[/color]


    Comment

    • rut

      #3
      Re: datagrid and combo boxes

      I guess that's the question. I'm not sure how you can bind each combobox (one in each row) to it's own datasource. Can this be done? Or maybe it more in how the combo is added to the datagrid. I assume that if you add a combobox to a datagrid column and set it's datasource then it will be that way for each row.

      Comment

      • scorpion53061

        #4
        Re: datagrid and combo boxes

        "rut" <anonymous@disc ussions.microso ft.com> wrote in message
        news:B98C47D8-964A-422A-ADA7-359FE4C31E3C@mi crosoft.com...[color=blue]
        > I guess that's the question. I'm not sure how you can bind each combobox[/color]
        (one in each row) to it's own datasource. Can this be done?

        May I suggest another approach?

        Instead write the data you need to arraylists and populate your combo boxes
        with these. You would be making too many round trips on your database
        unnecessarily which will slow you down.


        Comment

        • scorpion53061

          #5
          Re: datagrid and combo boxes

          "rut" <anonymous@disc ussions.microso ft.com> wrote in message
          news:516DD9CD-96EC-4BD4-ABCD-26DC40B6913D@mi crosoft.com...[color=blue]
          > That might be a good work-around although it won't save trips to the[/color]
          database. The contents of the combo is loaded based on the value entered in
          another column of the datagrid.

          Can you work with the data in your dataset instead of returning to the
          database each time? It looks like you need some concept work here.


          Comment

          Working...