grid control

selnekav
03-26-2003, 11:41 PM
Hi,
I need some grid control that will have two main abilities

1. the option to copy some field by using the mouse ( in the same form like you are copy some text within document )

2. the option to control how many rows within the control.

thanks,

me_again
03-26-2003, 11:51 PM
I believe you can get all that functionality from the standard FlexGrid that shipped with VB. The copy and pasting functionality you can add in with a few lines of code.

selnekav
03-26-2003, 11:57 PM
The problem with the standard datagrid is that you can't detrmine how many rows it will show ,
for example if you have only two rows with data, i want to show 5 rows so the last 3 will be empty.

me_again
03-27-2003, 12:07 AM
Off course you can! See the Rows and Cols properties for the FlexGrid control. See the attached image. I've got 5 empty rows with NO data showing.

selnekav
03-27-2003, 12:14 AM
I am soory but there is misundrstanding here, remmber what i said in the biggining

I need some grid control that will have two main abilities

1. the option to copy some field by using the mouse ( in the same form like you are copy some text within document )

2. the option to control how many rows within the control.

in the flexgrid you can't put the focus inside the cell and therefore you can't have ability no 1

am i right ?

me_again
03-27-2003, 12:18 AM
If you look at the image which I have attached, you will notice that there is a focus rectangle drawn in cell(2,2), or the first non fixed cell, which means that cell(2,2) has the focus.

I don't think you'll find a grid control that supports copy and paste functionality ready made. Anyway, it will take two or three lines of code max to implement copy/paste functionality.

selnekav
03-27-2003, 12:22 AM
The question is if you can put the foucs within the cell not as rectangle

me_again
03-27-2003, 12:25 AM
Ok, I see what you mean....you want the user to be able to edit values directly in the cell?!

selnekav
03-27-2003, 12:28 AM
not to edit, just to be able to mark the value ( like you mark some text within word doc ) and then to copy it.

me_again
03-27-2003, 12:38 AM
Ok, but in order for you to select anything, you must be able to edit it. I.o.w you must be able to display the info in a textbox or something similar.

me_again
03-27-2003, 12:47 AM
Ok, here's what you need. Go to http://www.visualbasicforum.com/t67614.html and download the EdFlexGrid control by Banjo. It encapsulates the MSFlexGrid and adds a textbox for you. Now you can double click on a cell and get a textbox with the cell's value.

selnekav
03-27-2003, 01:13 AM
Thanks a lot,
can you tell me how i can add this component to my project

me_again
03-27-2003, 01:34 AM
Either compile the control, and then include in under the components menu under the project menu, or include the .ctl and .pag files directly into your project.

selnekav
03-27-2003, 01:57 AM
Only one problem there is no option to have the cell lock, and i can't allow the user's to change the content any seggstaion
thanks,

me_again
03-27-2003, 02:58 AM
Come on mate, you've got the source code. What more can you ask for? Just change the source to do what you want. ;)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum