Re: DataGrid boundcolumn problem

From: Eliyahu Goldin (removemeegoldin_at_monarchmed.com)
Date: 10/20/04

  • Next message: Leon: "Re: SET NOCOUNT ON OPTION"
    Date: Wed, 20 Oct 2004 10:25:15 +0200
    
    

    Tom,

    If I understand you correctly, you want to show one record field per line.
    For this you can bind you datagrid (or datalist as Ken has noted) to a
    dataset with a table that will have records with one field only. You can
    convert your original records to this new table either in a stored procedure
    or in the code. In the latter case you will have to get the original table
    in a dataset first, loop through the records and add every field with a
    value to your new table as a separate row. Then bind the datagrid/datalist
    to the new table.

    Eliyahu

    "tshad" <tscheiderich@ftsolutions.com> wrote in message
    news:OCseaojtEHA.3972@TK2MSFTNGP15.phx.gbl...
    > I want to use a datagrid with my display, but I don't want to use 1 row
    per
    > record.
    >
    > What I have is a record with up to 6 values -
    > (answer1,answer2,answer3,answer4,answer5,answer6). I want to display them
    > with alternating styles. One record may only have the first 3 fields with
    > data and another with 4 and still another with 6.
    >
    > I want it to show as:
    >
    > Answer1
    > Answer2
    > Answer3
    >
    > or
    >
    > Answer1
    > Answer2
    > Answer3
    > Answer4
    > Answer5
    >
    > Can I set up a DataGrid this way?
    >
    > Thanks,
    >
    > Tom
    >
    >
    >


  • Next message: Leon: "Re: SET NOCOUNT ON OPTION"

    Relevant Pages

    • Problems displaying data from OleDb Provider
      ... I am trying to display information from Active Directory using a DataGrid. ... into a DataView, bind to the DataGrid, voila! ... The main driver is that trying to bind a SearchResultCollection to a DataGrid ...
      (microsoft.public.dotnet.framework.aspnet.datagridcontrol)
    • Trouble with OleDbDataAdapter
      ... I am trying to display information from Active Directory using a DataGrid. ... into a DataView, bind to the DataGrid, voila! ... The main driver is that trying to bind a SearchResultCollection to a DataGrid ...
      (microsoft.public.dotnet.framework.adonet)
    • Re: Best Method For Binding to a Datagrid?
      ... you can't bind ot a reader. ... Would I be better off not using databindings and populating the datagrid by ... >> you can't bind a SqlDataReader to the datagrid. ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: Error: No default member found for type MyClass
      ... Return CType, clsAgentPostalCode) ... Dim oAgentPostalCodeCollection As New clsAgentPostalCodeCollection ... > You try to make from your dataset a collection to bind that to a datagrid. ...
      (microsoft.public.dotnet.languages.vb)
    • Re: ASP.NET Remoting problem
      ... > I have added a web reference to this service. ... > But now I cannot bind an array of this object to a DataGrid because ... > properties to be able to bind with data grid. ...
      (microsoft.public.dotnet.framework.aspnet)