Vertical layout in GridPanel

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Vertical layout in GridPanel

    How do I display a GridPanel in vertical orientation with 2 columns?
    For example, here is a table with 2 columns and many rows. I need to position GridPanel like this table.

    <table>
      <tr>
            <td>First row header</td>
            <td>First row data data data data</td>
     </tr>
     <tr>
            <td>Second row header</td>
            <td>Second row data data data data</td>
     </tr>
    <tr>
            <td>Third row header</td>
            <td>Third row data data data data</td>
     </tr>
    <tr>
            <td>Fouth row header</td>
            <td>Fouth row data data data data</td>
     </tr>
    </table>
    Last edited by AlexMaslakov; Aug 10, 2011 at 12:11 PM.
  2. #2
    Hi,

    Unfortunately, there is no such functionality in GridPanel.

    Not sure but, maybe, you need PropertyGrid.
    https://examples1.ext.net/#/Property...asic/Overview/
  3. #3
    it looks good. Perhaps, I'll use it.
  4. #4
    <ext:Store ID="myStore" runat="server" />
    <ext:PropertyGrid ID="PropertyGrid1" runat="server" Width="600" AutoHeight="true" StoreID="myStore"
        Editable="false">
        <Source>
            <ext:PropertyGridParameter Name="Name1"   />
            <ext:PropertyGridParameter Name="Name2" />
            <ext:PropertyGridParameter Name="Name3" />
            <ext:PropertyGridParameter Name="Name4" />
        </Source>
        <View>
            <ext:GridView ForceFit="true" ScrollOffset="2" runat="server" />
        </View>
    </ext:PropertyGrid>
    
    
    
    protected void Page_Init(object sender, EventArgs e)
            {
    
                myStore.DataSource = GetData();
                myStore.DataBind();
    
            }
    
            private DataTable GetData()
            {
                DataTable dt = new DataTable();
                dt.Columns.Add("Name1");
                dt.Columns.Add("Name2");
                dt.Columns.Add("Name3");
                dt.Columns.Add("Name4");
                dt.Rows.Add("name-data-11", "name-data-22", "name-data-33", "name-data-44");
                return dt;
            }
    How do I map <ext:PropertyGridParameter Name="Name1" /> to "Name1" of myStore (DataTable) ?
  5. #5
    PropertyGrid doesn't use a store
    Just use Source property (set of items (Name/Value pair))
  6. #6
    Source have no setter property. You, probably, mean SetSource() method.
    Thanks, it works as I want.

Similar Threads

  1. Replies: 1
    Last Post: Jul 18, 2011, 8:40 AM
  2. [CLOSED] Two column layout with vertical scroll bar
    By deejayns in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 26, 2011, 10:28 PM
  3. [CLOSED] Vertical Button With Text, Or Vertical Tabs
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 21, 2011, 9:43 PM
  4. Replies: 3
    Last Post: Sep 13, 2010, 4:13 PM
  5. Replies: 4
    Last Post: Dec 30, 2009, 1:31 AM

Posting Permissions