[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

MULTI LINE DATAGRIDVIEW VS 2008 C#

Posted on 2010-01-08
3
Medium Priority
?
771 Views
Last Modified: 2012-05-08
Is it possible to have a mutli-line display grid view? In my case, I have 10 fields to display on one row. It will be too tight to display them on one line, so I need to put 6 fields on the first line, 3 fields on the second and one on the third. So I need each row to look like this:

Line/Part Number/Desc/Note  Quantity Cost         Sell         Vendor
------------------------------------------------------------------------------------------------------
1.00 MyPartNumber                 10          2.49         4.95        My Vendor
Decription of part                    Each      3-4 week delivery  My Vendor Name
Note pertaining to part
------------------------------------------------------------------------------------------------------

So as you can see each row contain 10 fields and these fields are displayed over 3 lines.
0
Comment
Question by:rwheeler23
  • 2
3 Comments
 
LVL 10

Expert Comment

by:Rakesh Jaimini
ID: 26213740
i suggest you to use scrollbars :)
instead of creating this kind of layout because it would not be user friendly
0
 

Author Comment

by:rwheeler23
ID: 26214234
I will play around with scrollbars. I do not see it as a control but I will search. I bellieve they are an actual property of the data view. Speaking of which, if you look a that attached screen shot, I have a couple of questions.
1) In my data view grid the date formats to MM/DD/YY. However, in my text box above is it the long type format. How do I correct this?
2) On the screen shot how did I get rid of the column on the far left that has the little black arrow? That is just wasting space.
3) How do I set the format of the line number column to have just 2 decimal places?
4) How do set the cost and sell colmns to be decimal?

Finally is there any documentation that describes all of these format types?
QuoteScreen.bmp
0
 
LVL 10

Accepted Solution

by:
Rakesh Jaimini earned 2000 total points
ID: 26246464
I bellieve they are an actual property of the data view
yes i was talking about the same
there is too much for 1 question as expert-exchange allows you to ask one question per thread
anyways try following
1) when you assign datetime value to textbox use date1.Date instead of date1
2)the left column is rowheader, You can hide row headers in the DataGridView control by using the RowHeadersVisible property
3) and 4)
this.dataGridView1.Columns["UnitPrice"].DefaultCellStyle.Format = "c";
this way you can set the format of cell to currency type
also check this
http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/95e7e7ef-2e71-412f-abe5-ffbee2c12c18
 
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question