How can I make a custom table like excel
Hello,
I want to make something like an excel table that I will populate at runtime.
I want to be able to select each row (not cell). I will have a form where I will write my data that has to update in the containing row.
So I don't need to type inside the list or inside the cells. I just want to select the row and then I will have a new form where I will edit my data.
I tried using tableLayoutPanel but there is no option to select a single row. Then I was thinking to create labels with Autosize:False and with Border: Single.
Then if I stick all the label to one another I will have like a table layout. But then wouldn't it get too busy with so many labels?
Has anyone done something like this? What is the optimum solution?
I also thought of DataGridView but I don't really like how it looks :)
Thx.
Re: How can I make a custom table like excel
Quote:
I also thought of DataGridView but I don't really like how it looks
So change how it looks. It is the obvious choice for this. Or add DataGrid to your toolbox (.Net Components DataGrid (System.Windows.Forms)) It's a little less easy to work with but it has some themed looks that you may find to your liking.
Re: How can I make a custom table like excel
The DGV is what you are looking for, and it has many options for display. However, there are also 3rd party alternatives to the DGV, though the only ones I know of will cost money.
There are other alternatives, such as a collection of borderless textboxes and a whole lot of custom code, but the performance is probably going to be less than you might hope for.
Re: How can I make a custom table like excel
I have never worked with DGV before but as far as I can see it has many options. I didn't know it is so configurable. Regarding design I managed to obtain what I wanted with this control.
Thanks.