 |
|
 |
niranjan_mca2003 Level: Protégé
 Registered: 29-12-2004 Posts: 4
|
list box on data grid
hi everybody,
New Year Wishes To All.
My question is,
i have a datagrid and two list boxes. the list boxes are filled with data from the databases. when ever i selected the data in the list boxes it must appear in the data grid and the condition or the main question is that,
the data grid has two columns namely col1 and col2. for each cell in col1 when ever i select a cell the list box must appear in that column and whenever i select a data it must be displayed in that cell. this must happen for each cell.
the second list box is filled with the data from the table with the condition as follows.
select col1 from table where col1=listbox1.text
same as the first list box which appears in each and every cell of the col1 of data grid the second list box must appear in each and every cell of col2.
hope i can get answer. i had some solution designed by me but it is not working clearly.
please send me the solution.
____________________________
[niru]
|
|
03-01-2005 at 06:16 AM |
|
|
Goran Level: Moderator
 Registered: 16-05-2002 Posts: 1681
|
Re: list box on data grid
Well, theoretically, you would need to detect cell's left& top coordinates that mouse is over, and "paste" (set its coordinates to cell's coorindates and make it visible) combobox (I assume you ment combobox instead of listbox) over this cell. The combobox should be the same size as the cell. AFter a user selects some item from combobox, you should set cell's text property to items value, set visible property of combobox to false, and perform data operations to fil other grid.
____________________________
If you find the answer helpful, please mark this topic as solved.
|
|
03-01-2005 at 08:36 PM |
|
|
niranjan_mca2003 Level: Protégé
 Registered: 29-12-2004 Posts: 4
|
Re: list box on data grid
thanks goran,
i tried the same way. is it possibel for u to send me a demo code. because i am still at the begining of vb
____________________________
[niru]
|
|
04-01-2005 at 03:57 AM |
|
|
Goran Level: Moderator
 Registered: 16-05-2002 Posts: 1681
|
Re: list box on data grid
Sorry, now I dont have time to worj on your code, cause always around new year there is a LOT of work to be done, and I am kind of weak with time. YOu could try exploring MS datagrids (there are several grids shipped with VS) properties, and see which one will be the most convinient for your task. And then when you pick the right one, and you get stuck somewhere post and we will try to help.
____________________________
If you find the answer helpful, please mark this topic as solved.
|
|
04-01-2005 at 10:43 PM |
|
|
|
|
 |
 |