datagrid horizontal layout

Posted on 2004-10-25
Last Modified: 2012-08-13
I'm almost sure I have seen this before but it may have been in a dream or something hehe.
The defaut layout for the datagrid is vertical.
I was wondering if there was a way to line up date horizontal.
Vertical layout
Total - Item
1         546
3         324
5         234

horizontal layout
Total  1       3     5
Item  546  324  234

I was hopeing to do with  datagridlayout = horizontal....that would be awsome
 but i could redo my sql to make a pivit table that would work too.

thanks for any help
Question by:j_tipps
    LVL 4

    Expert Comment

    hi buddy,
    Yep, sometimes it's a dream but you know with programing, you can make you dream come true buddy.:-) , the important is ideas, like yours.
    About your dream, with me, you will give you my 2 bad solution, may be...:-)
    1.You can horizontal you data with datatable, no need to use datagrid, you can add rows one by one with your data retriever, DataSet or DataReader.
    2.With datagrid, just an idea, haven't tested, you can bind every row for every column like this :
    ' .... with the H_reader is your datareader
    dim H_grid as datagrid
    dim H_column as datagridColumn
    dim H_tableCell as TableCell
    H_tableCell.text = H_reader("anything")
    H_column.InitializeCell(H_tableCell, i+1, ListItemType.Item)
    End While

    Nice day
    LVL 3

    Accepted Solution


    Author Comment

    Didn't there used to be the option to share points between two answers on this web site?
    OO well couldn't find that options this time around.

    Thanks alot to you both of you.  
    I gave the point to Hendrik becuase thats the solution i'm going and provided with code.
    I think vinhthuy_nguyen's option one soultion is the same idea as in the link.

    Thanks again guys.  maybe you can talk to somebody about bringing the split points option back.
    LVL 4

    Expert Comment

    It's ok j_tipps, no need to split the point, Hendrik actually give a perfect link that make thing clear and update me a lot.
    Nice day

    Expert Comment

    Accepted Solution contains a bad link ("Bad Request (Invalid Hostname)")...

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    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.

    If you haven’t already, I encourage you to read the first article ( in my series to gain a basic foundation of R and R Studio.  You will also find the …
    The purpose of this article is to demonstrate how we can use conditional statements using Python.
    The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.
    The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

    884 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

    17 Experts available now in Live!

    Get 1:1 Help Now