IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Ext JS / Sencha Discussion :

Probleme affichage grid


Sujet :

Ext JS / Sencha

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre actif
    Inscrit en
    Août 2010
    Messages
    78
    Détails du profil
    Informations forums :
    Inscription : Août 2010
    Messages : 78
    Par défaut Probleme affichage grid
    Bonjour ,

    Le code suivant marche trés bien :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
     
     
     
     
    Ext.onReady(function(){
     
    var win=new Ext.Window ( {
     
       title:' Gestion des éditions',
       width: 1034 ,
       length: 648,
     
    	items: [{
            xtype: 'panel',
            height: 59
        },
    	{
            xtype: 'panel',
            height: 363,
            layout: 'absolute',
            width: 1023,
            frame: true,
            tbar: {
                xtype: 'toolbar',
                items: [
                    {
                        xtype: 'button',
                        text: 'Acceuil'
                    },
                    {
                        xtype: 'button',
                        text: 'Gestion d une édition'
                    },
                    {
                        xtype: 'button',
                        text: 'Administration'
                    }
                ]
            },
            items: [
                    {
                        xtype: 'fieldset',
                        title: 'Ajout d\'une édition',
                        width: 550,
                        height: 260,
                        x: 270,
                        y: 20,
                        layout: 'absolute',
     
                    items: [
                                      {
    									    xtype: 'label',
    									    text: 'Application',
    									    x: 30,
    									    y: 120
    									},
    									{
    									    xtype: 'label',
    									    text: 'Domaine',
    									    width: 50,
    									    x: 30,
    									    y: 150
    									},
    									{
    									    xtype: 'label',
    									    text: 'Date création',
    									    x: 30,
    									    y: 90
    									},
    									{
    									    xtype: 'label',
    									    text: 'Type édition',
    									    x: 30,
    									    y: 60
    									},
    									{
    									    xtype: 'label',
    									    text: 'Libellé',
    									    x: 320,
    									    y: 30
    									},
    									{
    									    xtype: 'label',
    									    text: 'Identifiant',
    									    x: 30,
    									    y: 30
    									},
     
    									{
    									    xtype: 'label',
    									    text: 'Chemin template',
    									    x: 30,
    									    y: 180
    									},
    									{
    									    xtype: 'label',
    									    text: 'Programme',
    									    x: 320,
    									    y: 120
    									},
    									{
    									    xtype: 'textfield',
    									    x: 380,
    									    y: 20
    									},
    									{
    									    xtype: 'datefield',
    									    x: 120,
    									    y: 80,
    									    width: 130
    									},
    									{
    									    xtype: 'combo',
    									    x: 120,
    									    y: 50,
    									    width: 130
    									},
    									{
    									    xtype: 'combo',
    									    x: 120,
    									    y: 140,
    									    width: 130
    									},
    									{
    									    xtype: 'combo',
    									    x: 380,
    									    y: 110,
    									    width: 130
    									},
    									{
    									    xtype: 'combo',
    									    x: 120,
    									    y: 110,
    									    width: 130
    									},
    									{
    									    xtype: 'textfield',
    									    x: 120,
    									    y: 170
    									},
    									{
    									    xtype: 'textfield',
    									    x: 120,
    									    y: 20
    										},
    										{
    									    xtype: 'button',
    									    text: 'Parcourir',
    									    x: 250,
    									    y: 170
    										}
    						      ] },
    						      {
    			                        xtype: 'panel',
    			                        x: -2,
    			                        y: 0,
    			                        width: 90,
    			                        height: 320,
    			                        frame: true,
    			                        layout: 'accordion',
    			                        items: [
    			                            {
    			                                xtype: 'panel',
    			                                title: 'My Panel'
    			                            },
    			                            {
    			                                xtype: 'panel',
    			                                title: 'My Panel'
    			                            },
    			                            {
    			                                xtype: 'panel',
    			                                title: 'My Panel'
    			                            }
    			                        ]
    			                    },
    			                    {
    			                        xtype: 'button',
    			                        text: 'Valider',
    			                        x: 500,
    			                        y: 290,
    			                        width: 60,
    			                        height: 30
    			                    },
    			                    {
    			                        xtype: 'button',
    			                        text: 'Annuler',
    			                        x: 580,
    			                        y: 290,
    			                        width: 60,
    			                        height: 30
    			                    } 
    			                ]	       
    			                  }
     
     
     
    	        ]
     
     
     
     
     
     
     
     
    });
    win.show();
     
     
     
     
     
     
    });
    mais quand je modifie le code ci-dessus pour afficher une Grid ..une page blanche s'affiche lors de l'excution :s :s
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    Ext.onReady(function(){
    	
    var win=new Ext.Window ( {
    	
       title:' Gestion des éditions',
       width: 1034 ,
       length: 648,
    
    	items: [{
            xtype: 'panel',
            height: 59
        },
    	{
            xtype: 'panel',
            height: 363,
            layout: 'absolute',
            width: 1023,
            frame: true,
            tbar: {
                xtype: 'toolbar',
                items: [
                    {
                        xtype: 'button',
                        text: 'Acceuil'
                    },
                    {
                        xtype: 'button',
                        text: 'Gestion d une édition'
                    },
                    {
                        xtype: 'button',
                        text: 'Administration'
                    }
                ]
            },
            items: [
                    {
                        xtype: 'fieldset',
                        title: 'Ajout d\'une édition',
                        width: 550,
                        height: 260,
                        x: 270,
                        y: 20,
                        layout: 'absolute',
                    
                    items: [
                                      {
    									    xtype: 'label',
    									    text: 'Application',
    									    x: 30,
    									    y: 120
    									},
    									{
    									    xtype: 'label',
    									    text: 'Domaine',
    									    width: 50,
    									    x: 30,
    									    y: 150
    									},
    									{
    									    xtype: 'label',
    									    text: 'Date création',
    									    x: 30,
    									    y: 90
    									},
    									{
    									    xtype: 'label',
    									    text: 'Type édition',
    									    x: 30,
    									    y: 60
    									},
    									{
    									    xtype: 'label',
    									    text: 'Libellé',
    									    x: 320,
    									    y: 30
    									},
    									{
    									    xtype: 'label',
    									    text: 'Identifiant',
    									    x: 30,
    									    y: 30
    									},
    									
    									{
    									    xtype: 'label',
    									    text: 'Chemin template',
    									    x: 30,
    									    y: 180
    									},
    									{
    									    xtype: 'label',
    									    text: 'Programme',
    									    x: 320,
    									    y: 120
    									},
    									{
    									    xtype: 'textfield',
    									    x: 380,
    									    y: 20
    									},
    									{
    									    xtype: 'datefield',
    									    x: 120,
    									    y: 80,
    									    width: 130
    									},
    									{
    									    xtype: 'combo',
    									    x: 120,
    									    y: 50,
    									    width: 130
    									},
    									{
    									    xtype: 'combo',
    									    x: 120,
    									    y: 140,
    									    width: 130
    									},
    									{
    									    xtype: 'combo',
    									    x: 380,
    									    y: 110,
    									    width: 130
    									},
    									{
    									    xtype: 'combo',
    									    x: 120,
    									    y: 110,
    									    width: 130
    									},
    									{
    									    xtype: 'textfield',
    									    x: 120,
    									    y: 170
    									},
    									{
    									    xtype: 'textfield',
    									    x: 120,
    									    y: 20
    										},
    										{
    									    xtype: 'button',
    									    text: 'Parcourir',
    									    x: 250,
    									    y: 170
    										}
    						      ] },
    						      {
    			                        xtype: 'panel',
    			                        x: -2,
    			                        y: 0,
    			                        width: 90,
    			                        height: 320,
    			                        frame: true,
    			                        layout: 'accordion',
    			                        items: [
    			                            {
    			                                xtype: 'panel',
    			                                title: 'My Panel'
    			                            },
    			                            {
    			                                xtype: 'panel',
    			                                title: 'My Panel'
    			                            },
    			                            {
    			                                xtype: 'panel',
    			                                title: 'My Panel'
    			                            }
    			                        ]
    			                    },
    			                    {
    			                        xtype: 'button',
    			                        text: 'Valider',
    			                        x: 500,
    			                        y: 290,
    			                        width: 60,
    			                        height: 30
    			                    },
    			                    {
    			                        xtype: 'button',
    			                        text: 'Annuler',
    			                        x: 580,
    			                        y: 290,
    			                        width: 60,
    			                        height: 30
    			                    } 
    			                ]	       
    			                  },
               // code ajoutée par rapport l autre code 
    			                  {
    			                  	xtype: 'grid',
    			                  	title: 'Liste',
    			                  	columns: [
    			                  	          { xtype: 'gridcolumn',
    			                  	          dataIndex: 'string',
    			                  	          header: 'Column',
    			                  	          sortable: true,
    			                  	          width: 100    
    			                  	          }
    			                  	          ]
    			                  	          
    			                  	          
    			                  	          
    			                  	
    			                  }
    			                  
        
        
        
        
    	        ]
    	
    	
    	
    	
    	
    	
    	
    	
    });
    win.show();
    
    
    
    
    
    
    });

  2. #2
    Membre éclairé
    Avatar de abraxis
    Homme Profil pro
    Développeur Web
    Inscrit en
    Mai 2007
    Messages
    439
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mai 2007
    Messages : 439
    Par défaut
    Bonjour,

    Est ce que tu utilise firebug (plug-in de firefox) ?
    Si oui, as tu une erreur dans firebug ?

  3. #3
    Membre actif
    Inscrit en
    Août 2010
    Messages
    78
    Détails du profil
    Informations forums :
    Inscription : Août 2010
    Messages : 78
    Par défaut
    Ouiii :

    Erreur : this.ds is undefined

  4. #4
    Membre éclairé
    Avatar de abraxis
    Homme Profil pro
    Développeur Web
    Inscrit en
    Mai 2007
    Messages
    439
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mai 2007
    Messages : 439
    Par défaut
    Il te manque un store dans ton grid ^^

  5. #5
    Membre actif
    Inscrit en
    Août 2010
    Messages
    78
    Détails du profil
    Informations forums :
    Inscription : Août 2010
    Messages : 78
    Par défaut
    Quand je le met , ils me disent : store undefined :s

  6. #6
    Membre éclairé
    Avatar de abraxis
    Homme Profil pro
    Développeur Web
    Inscrit en
    Mai 2007
    Messages
    439
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mai 2007
    Messages : 439
    Par défaut
    Tu dois déclarer ton store avant la construction de ton window.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    var monStore = new Ext.data.JsonStore({
    	storeId: 'monStoreId',
    	url: 'maPage.php',
    	root: 'data',
    	fields: [
    		'monDataIndex'
    	]
    });
    et dans ton grid tu appel ton store comme ça :
    ou

  7. #7
    Membre actif
    Inscrit en
    Août 2010
    Messages
    78
    Détails du profil
    Informations forums :
    Inscription : Août 2010
    Messages : 78
    Par défaut
    L errer exact est : this.store is undefined

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. []probleme affichage valeur dans combobox
    Par gup dans le forum VB 6 et antérieur
    Réponses: 5
    Dernier message: 23/09/2005, 09h22
  2. Probleme affichage de mon site
    Par Braq dans le forum Webdesign & Ergonomie
    Réponses: 15
    Dernier message: 10/08/2005, 14h08
  3. problem affichage avec HTML::TableExtract
    Par rootdaoud dans le forum Web
    Réponses: 2
    Dernier message: 04/07/2005, 19h35
  4. Probleme affichage noir quand Build/Compile
    Par balabi dans le forum MFC
    Réponses: 3
    Dernier message: 01/06/2005, 16h12
  5. Probleme affichage dans tableau selon requête
    Par moulette85 dans le forum Langage SQL
    Réponses: 11
    Dernier message: 01/03/2005, 15h44

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo