lunaclover
Programmer
- Jun 22, 2005
- 54
Okay I'm having a hard time even describing my problem (as indicated in the subject line above), so here it goes.
For some background:
I have a datagrid displaying many columns dependent on the selections made in comboboxes right above it. Then I write
SqlDataAdapter3.SelectCommand.Parameters("@param1").Value = cb1.Text
for each combobox. There are a total of 12 constraints (the combobox selections).
I have two comboboxes, one is called 'Min' and one is called 'Max'. They are pulling from the db using the same sqlserveradapters pointed at the same column, but with two different datasets (one for min and one for max). When running, you can select from 0 to 16 from both boxes. I want it to pull a range (e.g. Min is set to 8 and max is set to 12, it will pull all records where columnA is between 8 and 12). This is tricky enough if you're me and just beginning. But it gets even trickier - I want the user to be able to select between two radio buttons, rb1 or rb2. If the user selects rb1, I want the data to pull from columnA, populate the two combboxes with the appropriate data, have the user select one from each cb, and when the user pushes the button, the datagrid displays only records that fall between the user-specified 'Min' and 'Max'. If the user selects rb2, I want the comboboxes to change columns (i.e. use a different sql data adapter configured to column2), display these numbers from this column that the user can choose from, and then when the almighty button is hit, display the results that fall between this min and max within this column.
Please tell me that makes sense. I would think this would be an easy thing to find but maybe I am using the wrong search words. Regardless, I haven't had any luck finding it so I thought I would post it. I just want to know how to start.. anything anybody could offer would be great!
For example, can you even connect one combobox to two different sql server adapters and change it depending on a radiobutton selection? Where should the code be to grab records which fall between the indicated range - this is confusing to me. I guess I will need something also that ensures min to always be smaller than max.. now that I think about it. This is seeming too much to ask - does anybody know where I can go to learn something like this?
Thanks again,
lunaclover
For some background:
I have a datagrid displaying many columns dependent on the selections made in comboboxes right above it. Then I write
SqlDataAdapter3.SelectCommand.Parameters("@param1").Value = cb1.Text
for each combobox. There are a total of 12 constraints (the combobox selections).
I have two comboboxes, one is called 'Min' and one is called 'Max'. They are pulling from the db using the same sqlserveradapters pointed at the same column, but with two different datasets (one for min and one for max). When running, you can select from 0 to 16 from both boxes. I want it to pull a range (e.g. Min is set to 8 and max is set to 12, it will pull all records where columnA is between 8 and 12). This is tricky enough if you're me and just beginning. But it gets even trickier - I want the user to be able to select between two radio buttons, rb1 or rb2. If the user selects rb1, I want the data to pull from columnA, populate the two combboxes with the appropriate data, have the user select one from each cb, and when the user pushes the button, the datagrid displays only records that fall between the user-specified 'Min' and 'Max'. If the user selects rb2, I want the comboboxes to change columns (i.e. use a different sql data adapter configured to column2), display these numbers from this column that the user can choose from, and then when the almighty button is hit, display the results that fall between this min and max within this column.
Please tell me that makes sense. I would think this would be an easy thing to find but maybe I am using the wrong search words. Regardless, I haven't had any luck finding it so I thought I would post it. I just want to know how to start.. anything anybody could offer would be great!
For example, can you even connect one combobox to two different sql server adapters and change it depending on a radiobutton selection? Where should the code be to grab records which fall between the indicated range - this is confusing to me. I guess I will need something also that ensures min to always be smaller than max.. now that I think about it. This is seeming too much to ask - does anybody know where I can go to learn something like this?
Thanks again,
lunaclover