472,127 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,127 software developers and data experts.

Simple Grid

I need to make a simple grid in which the user can cut and paste the
contents of a region of cells from this simple grid to excel.

I thought about ganging a bunch of textboxes (1 textbox = 1 cell)
together which would work for me but I cannot cut and paste a
collection of cells to excel using this approach.

Any ideas where to go next? I know I can buy such a capability and
have done so in the past but I would like to write it in vb.net. I
don't need all the power that comes from commercial versions.

I have tried datagrid and I cannot cut and paste a collection of cells
to excel.

I have played with listview also and did not get what I want either.

I don't need scrolling or binding ... I just need cells that the user
can type in and then cut and paste to excel.

Thanks in advance.

Wayne
Nov 20 '05 #1
3 4175
You can write a routine that select all textboxes you want
A mouse move will give you the coordinates of the selection rectangle
You can check wich text boxes is inside the rectangle, you can change the
bgcolor of selected textboxes to reflect the ideea of selection. On cut, can
arrange the text of each textbox "selected", as you need to be pasted in
excel and fill the clipboard with it
"Wayne" <VB******@hotmail.com> wrote in message
news:5f**************************@posting.google.c om...
I need to make a simple grid in which the user can cut and paste the
contents of a region of cells from this simple grid to excel.

I thought about ganging a bunch of textboxes (1 textbox = 1 cell)
together which would work for me but I cannot cut and paste a
collection of cells to excel using this approach.

Any ideas where to go next? I know I can buy such a capability and
have done so in the past but I would like to write it in vb.net. I
don't need all the power that comes from commercial versions.

I have tried datagrid and I cannot cut and paste a collection of cells
to excel.

I have played with listview also and did not get what I want either.

I don't need scrolling or binding ... I just need cells that the user
can type in and then cut and paste to excel.

Thanks in advance.

Wayne

Nov 20 '05 #2
Just add the Excel spreadsheet control to the project. Go to Add/Remove
items on the toolbar and go to COM. It will be under Microsoft Office
Spreadsheet x depending on your version. Its a fully featured control and
you can turn off the option to display the title bar to make it look more
integrated.

Stephen

"Wayne" <VB******@hotmail.com> wrote in message
news:5f**************************@posting.google.c om...
I need to make a simple grid in which the user can cut and paste the
contents of a region of cells from this simple grid to excel.

I thought about ganging a bunch of textboxes (1 textbox = 1 cell)
together which would work for me but I cannot cut and paste a
collection of cells to excel using this approach.

Any ideas where to go next? I know I can buy such a capability and
have done so in the past but I would like to write it in vb.net. I
don't need all the power that comes from commercial versions.

I have tried datagrid and I cannot cut and paste a collection of cells
to excel.

I have played with listview also and did not get what I want either.

I don't need scrolling or binding ... I just need cells that the user
can type in and then cut and paste to excel.

Thanks in advance.

Wayne

Nov 20 '05 #3
Stephen,

I should add that I want to stay in managed code - hence I don't want
to use com objects.

What I want to do is build a grid using the tools that vb.net has
provided.

Wayne.

"Stephen" <gr******@bellatlantic.net> wrote in message news:<Oh**************@TK2MSFTNGP12.phx.gbl>...
Just add the Excel spreadsheet control to the project. Go to Add/Remove
items on the toolbar and go to COM. It will be under Microsoft Office
Spreadsheet x depending on your version. Its a fully featured control and
you can turn off the option to display the title bar to make it look more
integrated.

Stephen

"Wayne" <VB******@hotmail.com> wrote in message
news:5f**************************@posting.google.c om...
I need to make a simple grid in which the user can cut and paste the
contents of a region of cells from this simple grid to excel.

I thought about ganging a bunch of textboxes (1 textbox = 1 cell)
together which would work for me but I cannot cut and paste a
collection of cells to excel using this approach.

Any ideas where to go next? I know I can buy such a capability and
have done so in the past but I would like to write it in vb.net. I
don't need all the power that comes from commercial versions.

I have tried datagrid and I cannot cut and paste a collection of cells
to excel.

I have played with listview also and did not get what I want either.

I don't need scrolling or binding ... I just need cells that the user
can type in and then cut and paste to excel.

Thanks in advance.

Wayne

Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Geoff Soper | last post: by
3 posts views Thread by MBW | last post: by
5 posts views Thread by Will | last post: by
reply views Thread by Tal Sharfi | last post: by
2 posts views Thread by James | last post: by
reply views Thread by serge calderara | last post: by
1 post views Thread by Eric_Dexter | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.