[CLOSED] number fields in grid/columns

  1. #1

    [CLOSED] number fields in grid/columns

    Hi,
    can you show me the best way to get a grid of number fileds in wich tu put quantity values?
    Please look at the picture to see what I mean.
    Click image for larger version. 

Name:	grid.png 
Views:	62 
Size:	18.1 KB 
ID:	4257

    Thanks in advance
    Marco
    Last edited by Daniil; May 23, 2012 at 8:41 PM. Reason: [CLOSED]
  2. #2
    Please, note that controls should be rendered per column.
    Click image for larger version. 

Name:	grid2.png 
Views:	55 
Size:	7.2 KB 
ID:	4258
    M
  3. #3
    Hi,

    I can suggest the following solution.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Container 
                runat="server" 
                Height="75" 
                Width="250" 
                Layout="HBoxLayout">
                <Items>
                    <ext:Container runat="server" Flex="1">
                        <Defaults>
                            <ext:Parameter Name="labelWidth" Value="30" Mode="Raw" />
                            <ext:Parameter Name="width" Value="70" Mode="Raw" />
                        </Defaults>
                        <Items>
                            <ext:NumberField runat="server" FieldLabel="label" />
                            <ext:NumberField runat="server" FieldLabel="label" />
                            <ext:NumberField runat="server" FieldLabel="label" />
                        </Items>
                    </ext:Container>
                    <ext:Container runat="server" Flex="1">
                        <Defaults>
                            <ext:Parameter Name="labelWidth" Value="30" Mode="Raw" />
                            <ext:Parameter Name="width" Value="70" Mode="Raw" />
                        </Defaults>
                        <Items>
                            <ext:NumberField runat="server" FieldLabel="label" />
                            <ext:NumberField runat="server" FieldLabel="label" />
                            <ext:NumberField runat="server" FieldLabel="label" />
                        </Items>
                    </ext:Container>
                    <ext:Container runat="server" Flex="1">
                        <Defaults>
                            <ext:Parameter Name="labelWidth" Value="30" Mode="Raw" />
                            <ext:Parameter Name="width" Value="70" Mode="Raw" />
                        </Defaults>
                        <Items>
                            <ext:NumberField runat="server" FieldLabel="label" />
                            <ext:NumberField runat="server" FieldLabel="label" />
                        </Items>
                    </ext:Container>
                </Items>
            </ext:Container>
        </form>
    </body>
    </html>
    You will have to manually put a NumberField into a respective column.
  4. #4
    I hoped for something more dynamic.

    The number and labels of numberfields are the result of a query.

    Is there a way to bind the control to a store?

    M
  5. #5
    Quote Originally Posted by marco.morreale View Post
    Is there a way to bind the control to a store?
    Generally, no. You could only load a Store record data into FormPanel fields values.

    Quote Originally Posted by marco.morreale View Post
    I hoped for something more dynamic.

    The number and labels of numberfields are the result of a query.
    You can render these fields dynamically either on server or client sides. I've just demonstrated a layout you could use.
  6. #6
    Do you mean that I should dynamically create the numberFields and calculate for each one wich container to put them in?

    If so, maybe aspnet Datalist is a easier way.

    M
  7. #7
    Quote Originally Posted by marco.morreale View Post
    Do you mean that I should dynamically create the numberFields and calculate for each one wich container to put them in?
    Well, I don't think it would be difficult. You just should know Height of the main container (with HBoxLayout) and Height of a single NumberField.


    Quote Originally Posted by marco.morreale View Post
    If so, maybe aspnet Datalist is a easier way.
    At the first glance, we think it won't be easier with DataList. Though we are not sure. If you would demonstrate how it can be achieved using DataList, we will try to get the same in Ext.NET (if it will be possible).

Similar Threads

  1. [CLOSED] MultiHeader filter example with number columns
    By jmcantrell in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 28, 2012, 10:12 PM
  2. [CLOSED] Dynamic Columns and Fields MVC application.
    By romeu in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 27, 2012, 6:23 PM
  3. [CLOSED] Dynamic Columns and Fields MVC application
    By romeu in forum 2.x Legacy Premium Help
    Replies: 10
    Last Post: Feb 27, 2012, 6:08 PM
  4. Replies: 2
    Last Post: Nov 22, 2010, 3:16 PM
  5. [CLOSED] Clear store fields and grid columns from AjaxEvent
    By jchau in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Feb 22, 2009, 2:18 PM

Posting Permissions