[CLOSED] Custom Control

  1. #1

    [CLOSED] Custom Control


    as per a UI requirement, i need to implement a DateField custom control that will allow selection of Date, month and year from three different adjacent dropdown. But developer should be able to get and set the date value to the control like customCtrl.value = date;

    Can you please give me a some clue to get started.

    Thanks in advance.
    Last edited by Daniil; Jan 12, 2016 at 3:41 PM. Reason: [CLOSED]
  2. #2

    Two thoughts:

    1) Is it not possible to use the existing DateField or DatePicker as that offers a lot more flexibility and usability benefits compared to 3 separate dropdown fields? https://examples3.ext.net/#/search/datefield

    2) If you do need to do it this way, perhaps extending a FieldContainer would be the way to go so you can reuse this combination elsewhere on your forms as needed? https://examples3.ext.net/#/Form/Fie...iner/Overview/ - also see Ext JS documentation: https://docs.sencha.com/extjs/5.1/5....FieldContainer

    For a custom FieldContainer, you may be better off creating the subclass as an Ext JS subclass of FieldContainer with appropriate Value related fields to then send the right date parts to your relevant dropdowns, and then on the Ext.NET side, create a subclass the renders your JavaScript subclass.

    For more information on how to get started on that I answered a similar post about a year ago here with some other links to other forums topics that help:

    Although I am not trying to plug my book, chapter 9 on custom controls could be quite helpful as well, if you have it?

    Hope that helps?

Similar Threads

  1. Replies: 12
    Last Post: Jul 28, 2015, 10:11 AM
  2. [CLOSED] Extending Ext.net Control / Creating Custom Control
    By ljankowski in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 01, 2014, 6:52 PM
  3. [CLOSED] Custom Control or User Control in razor MVC
    By matrixwebtech in forum 2.x Legacy Premium Help
    Replies: 13
    Last Post: Aug 08, 2014, 9:21 AM
  4. Custom control
    By umberto72 in forum 2.x Help
    Replies: 2
    Last Post: Mar 06, 2013, 1:14 PM
  5. Replies: 2
    Last Post: Jan 09, 2012, 7:18 AM

Posting Permissions