Results 1 to 4 of 4

Thread: Floating Formpanel or Dialog With formpanel

  1. #1
    Sencha Premium Member
    Join Date
    Feb 2016
    Posts
    6

    Default Answered: Floating Formpanel or Dialog With formpanel

    Hi,

    I am trying to create floating formpanel and which Will be the generic class.The formpanel is updateable using different data from different launch point.I have tried using kitchensink Dialog sample with formpanel but could not able to make it float.Can some suggest to do something?..

    Sample Code

    Code:
    import React, { Component } from 'react';import {
         Dialog,FormPanel, ComboBoxField,Container,Button,TextField,TextAreaField
    
    
    } from '@extjs/ext-react';
    import data from './data';
    export default class AppDetails extends Component {
          state = {
                 showDialog: false
             }
    
    
       
         render() {
             const { showDialog } = this.state;
    
    
    
    
             return (
                 <Container>
                     <Button text="Show Dialog" handler={this.showDialog} ui="action raised"/>
                     <Dialog
                         displayed={showDialog}
                         title="Dialog"
                         closable
                         maximizable
                         closeAction="hide"
                         maskTapHandler={this.onCancel}
                         bodyPadding="20"
                         maxWidth="200"
                         defaultFocus="#ok"
                         onHide={() => this.setState({ showDialog: false })}
                     >
                     <FormPanel shadow>
                         <ComboBoxField
                             width={200}
                             label="State"
                             store={data}
                             displayField="name"
                             valueField="code"
                             queryMode="local"
                             labelAlign="placeholder"
                             clearable
                         />
                         <TextField
                                            labelAlign="placeholder"
                                            label="Label"
                                            errorMessage="The value you entered is invalid."
                                            value="invalid value"
                                            errorTarget="under"
                          />
                          <TextAreaField
                                label="Description"
                                width="300"
                                maxRows={10}
                          />
    
    
                          </FormPanel>
    
    
                    </Dialog>
                 </Container>
             )
         }
    
    
         showDialog = () => {
             this.setState({ showDialog: true });
         }
    
    
         onOk = () => {
             this.setState({ showDialog: false });
         }
    
    
         onCancel = () => {
             this.setState({ showDialog: false });
         }
    
    
    }
    Thanks,
    Sundarganesh R

  2. Here is an example of using a grid cell tool to open a dialog and editing a record


  3. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,450
    Answers
    3997

    Default

    The dialog is floating, the child formpanel shouldn't float within the dialog. I'm not sure what UI you are going for but I see the form within the dialog

    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  4. #3
    Sencha Premium Member
    Join Date
    Feb 2016
    Posts
    6

    Default

    Quote Originally Posted by mitchellsimoens View Post
    The dialog is floating, the child formpanel shouldn't float within the dialog. I'm not sure what UI you are going for but I see the form within the dialog

    Hi,

    Thanks for your reply.Actually My grid row every first cell having hyperlink,When i click on the cell i needs to open a dialog with formpanel. So i thought call dialog with form panel function as global one.So that no need to put the same code in each row of the cell.Can you please suggest some ideas?

    Thanks,
    Sundarganesh R

  5. #4
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,450
    Answers
    3997

    Default

    Here is an example of using a grid cell tool to open a dialog and editing a record

    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

Similar Threads

  1. [NOREPRO] Select field closing floating formpanel
    By mitchellsimoens in forum Sencha Touch 1.x: Bugs
    Replies: 11
    Last Post: 8 Sep 2011, 11:21 AM
  2. [DUPE-461] FormPanel With SelectField in Floating Panel
    By schmoboy in forum Sencha Touch 1.x: Bugs
    Replies: 0
    Last Post: 8 Feb 2011, 2:56 PM
  3. 0.94 FormPanel Floating
    By steve1964 in forum Sencha Touch 1.x: Discussion
    Replies: 7
    Last Post: 9 Sep 2010, 3:18 AM
  4. Position a non-floating formPanel
    By jameslenig in forum Ext 2.x: Help & Discussion
    Replies: 7
    Last Post: 22 May 2008, 7:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •