Results 1 to 5 of 5

Thread: New to extjs -- some design queries

  1. #1

    Default New to extjs -- some design queries

    Hi,

    Not sure where to post this, but if any one can help, it would be really great.

    I have to make a ext widget which is as follows :-
    - The top widget is the data entry widget which allows the entry of personnel record
    - All the widgets below (which I call display widgets ) display the details created above sorte d and grouped alphabetically by last name
    - The display widgets have a edit button at top which when clicked which make the display widget editable (i.e name fields become editable text box, department field becomes a dropdown etc)

    So, after going through a lot of doucmentation, I have come up with the following way to implement this -

    * Use a BoxLayout to contain all the widgets
    * Use a simple panel with Form widget elements for the data entry widget
    * Use a DataView with a GroupingStore for the Display Widgets . Add a header to each DataView Widget containing the edit button.
    * When the edit button is clicked I will change the template of the corresponding Widget to display the widget in editable form.

    This was the best I could come up with and frankly it doesn't looks that good of a idea. I don't mind going ahead with approach and finding later that there are issues with it, but if any one has a better idea or any thoughts on how to approach this I will be very grateful

    Thanks in advance !

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    Really it sounds like an EditorGridPanel below, not widgets. That seems like a border layout with a FormPanel as north and GridPanel as center.

  3. #3

    Default

    Quote Originally Posted by Animal View Post
    Really it sounds like an EditorGridPanel below, not widgets. That seems like a border layout with a FormPanel as north and GridPanel as center.
    I did had a look at the editor grid panel, but I had a few doubts , the yare :-

    * I need to add a edit button to each display row, wouldn't this make each row a widget ?
    * One clicking the edit button it's not just the fields that become editable, its's that the whole structure of the row change . fox example of text field becomes dropdown, few new fields are added etc i.e, the template of each column changes (Hope I am clear). But I think EditableGridPanel with TmeplateColumn can take care of this, right ?

    So, do you think the BorderLayout as you mentioned with EditableGridPanel and TmeplateColumn will work better ?

  4. #4
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    I'm sure an EditorGridPanel can do all that. Cell editors can be anything you want.

    You could either use a border layout (if you wanted splitbar draggability and collapsibility), or if that's not needed, vbox layout using align: 'stretch' to make both boxes 100% of the width.

  5. #5

    Default

    I see, thanks a lot for giving me a good start .. I will try it out

Posting Permissions

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