GridPanel; Wasting column width for showing fully a data column

Page 1 of 2 12 LastLast
  1. #1

    GridPanel; Wasting column width for showing fully a data column

    Hi,
    Firstly I?m new in ext.net, my GridPanel waste lot of width space to showing fully data in a column , for example to show the column data fully in ?Pointage Debut? (see image below).

    I work in ext.net for MVC v2.5.1 and I update to v2.5.2 without effect.
    Click image for larger version. 

Name:	Sans titre.png 
Views:	34 
Size:	46.1 KB 
ID:	11831
    Last edited by othmanee; Jun 04, 2014 at 6:26 AM.
  2. #2
    Hi @othmanee,

    Welcome to the Ext.NET forums!

    Please ensure that there is no scaling in a browser. Zoom should be 100%. Is it reproducible with 100% zoom?
  3. #3
    Thanx Danil,

    i verified in Chrome and IE11 and i found 100% of scale, but the problem persist.
  4. #4
    Please provide a full test case.
  5. #5
    this my code :



    @X.Viewport().Layout(LayoutType.Border).Items(
    
        X.Container().Region(Region.North).Height(150).Weight(10),
        X.Panel().Region(Region.West).Frame(true).Split(true).Width(230).Collapsible(true).Layout(LayoutType.Border).Weight(15).Items(
    
            X.Container().Region(Region.North).Height(100).Items(
                //items ...    
            ),
    
            X.Container().Region(Region.Center).Layout(LayoutType.Accordion).Items(
    
                /*
                 * Some controls ...
                //*/
                )
            ),
    
    
    
    
            X.GridPanel().ID("CompteursGridPanel").SimpleSelect(true).Border(false).Icon(Icon.CalculatorEdit)
                .Collapsible(true).Region(Region.Center).Title("Gestion des Compteurs.").AutoScroll(true)
            .SelectionModel(X.CheckboxSelectionModel())
            .Plugins(
                X.CellEditing()
            ).DockedItems(
                X.Toolbar().Dock(Dock.Top).Items(
                //buttons...
                    ),
                X.StatusBar().Dock(Dock.Bottom).Items(
                //Page...
                )
    
            ).Tools(
                    //tools ...
                )
                .Features(
                    X.GridFilters().Local(true).Filters(
                    //Filters for all column...
                        )
                )
                .Store(
    
                    X.Store().ID("CompteursStore").PageSize(10).RemotePaging(false)
                        .Proxy(
                            X.AjaxProxy()
                            //...
                            
                        )
                        .Model(
                            X.Model().ID("CompteursModel").IDProperty("Id").Fields(
                            //Datamodel...
    
                                )
                ).ColumnModel(
                    X.RowNumbererColumn(),
                    X.Column().Text("ID").DataIndex("Id").Flex(2),
                    X.Column().Text("Nom").DataIndex("Nom").Editor(X.TextField()),
                    X.Column().Text("Description").DataIndex("Description").Editor(X.TextField()).Flex(1),
                    X.BooleanColumn().Text("Pointage Debut").DataIndex("PointageDebutObligatoire").TrueText("Obligatoire").FalseText("Non obligatoire").Editor(X.Checkbox()).ToolTip("Pointage au d?but obligatoire ou non."),
                    X.BooleanColumn().Text("Pointage Fin").DataIndex("PointageFinObligatoire").TrueText("Obligatoire").FalseText("Non obligatoire").Editor(X.Checkbox()).ToolTip("Pointage au fin obligatoire ou non."),
                    X.ProgressBarColumn().Text("Taux").DataIndex("Taux").Editor(X.NumberField()).ToolTip("Taux normale."),
                    X.Column().Text("PlafondHeuresSup").DataIndex("PlafondHeuresSup").Renderer(new Renderer { Fn = "heure" }).Editor(X.NumberField()).ToolTip("Plafond des heures suppl?mentaire en nombre d'heure."),
                    X.ProgressBarColumn().Text("TauxAbsences").DataIndex("TauxAbsences").Editor(X.NumberField()).ToolTip("Taux des absences."),
                    X.ProgressBarColumn().Text("TauxHeuresSup").DataIndex("TauxHeuresSup").Editor(X.NumberField()).ToolTip("Taux des heures suppl?mentaires."),
                    X.Column().Text("FormuleDecalcul").DataIndex("FormuleDecalcul").Editor(X.TextField()).ToolTip("La formule de calcul.")
    
                )
                )
  6. #6
    Sorry, we need something runnable. We should be able to copy, paste and run your code sample without any changes from our side.
  7. #7
    This a simple example for my probleme: (Result in imageClick image for larger version. 

Name:	Sans titre.png 
Views:	27 
Size:	15.9 KB 
ID:	11841)


    @X.Viewport().Layout(LayoutType.Border).Items(
        @X.GridPanel().Region(Region.North).Height(600)
            .ColumnModel(
                X.RowNumbererColumn(),
                X.Column().Text("Column1").DataIndex("Column1"),
                X.Column().Text("Column2").DataIndex("Column2")
            ).Store(X.Store().Model(
    
                X.Model().IDProperty("Column1").Fields(
    
                    X.ModelField().Name("Column1").Type(ModelFieldType.String),
                    X.ModelField().Name("Column2").Type(ModelFieldType.String))
                ).DataSource(
                    new object[]{
                        new object[]{"data1", "data1"},
                        new object[]{"data2", "data2"}
                    })))
    Last edited by othmanee; Jun 04, 2014 at 9:30 AM.
  8. #8
    The modified code is Runnable and lightweight
  9. #9
    Thank you.

    It is what I see running the test case.


    Do you see the same?

    If yes, please clarify what is wrong with that?

    If no, please post your screenshot.
    Attached Thumbnails Click image for larger version. 

Name:	1.JPG 
Views:	50 
Size:	12.0 KB 
ID:	11851  
  10. #10
    For me i dont know why it gives me that (Click image for larger version. 

Name:	Sans titre.png 
Views:	29 
Size:	19.4 KB 
ID:	11881)

    for more information i have many Panels in the ViewPort.
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 2
    Last Post: Jan 31, 2013, 4:56 PM
  2. Replies: 1
    Last Post: Nov 04, 2011, 8:51 AM
  3. GridPanel showing only one column of data
    By HexElffilter in forum 1.x Help
    Replies: 2
    Last Post: Jan 27, 2011, 3:42 PM
  4. Replies: 6
    Last Post: Jun 11, 2010, 12:47 PM
  5. Replies: 4
    Last Post: Aug 04, 2009, 11:37 AM

Posting Permissions