borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Non microsoft grid controls)Next Topic (ActiveX Remove MenuBar ToolBar AddressBar) New Topic New Poll Post Reply
AndreaVB Forum : ActiveX : list box on data grid
Poster Message
niranjan_mca2003
Level: Protégé

Registered: 29-12-2004
Posts: 4

icon 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
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon 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
View Profile Send Email to User Show All Posts | Quote Reply
niranjan_mca2003
Level: Protégé

Registered: 29-12-2004
Posts: 4
icon 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
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon 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
View Profile Send Email to User Show All Posts | Quote Reply
niranjan_mca2003
Level: Protégé

Registered: 29-12-2004
Posts: 4
icon Re: list box on data grid

ok goran,
  i had got some solution and i am at the door of the solution. if really got it i will post the code and if possibel please check that and give me suggestions.


____________________________
[niru]

05-01-2005 at 02:55 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
AndreaVB Forum : ActiveX : list box on data grid
Previous Topic (Non microsoft grid controls)Next Topic (ActiveX Remove MenuBar ToolBar AddressBar) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder