Posted on 2010-01-08
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.
Question by:rwheeler23
    LVL 10

    Expert Comment

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

    Author Comment

    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?
    LVL 10

    Accepted Solution

    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

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
    We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now