Infragistics Home

Infragistics Forums

Infragistics community online discussions.
Welcome to Infragistics Forums Sign in | FAQ
in Search

WebDatChooser clone not working

Last post 06-30-2008 8:52 by raluca_c84. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 03-28-2008 6:34

    WebDatChooser clone not working

    I have a WebDateChooser hidden on a page. I also have a combobox depending on which different fields are shown. When selecting a date type from the combobox, I try to clone (BLOCKED SCRIPT cloneNode function) the WebDateChooser, make it visible and position in next to the combobox (the combobox position changes, so I cannot place a combobox on a fixed position and just make it visible; this is why I am using clone).

     The cloning is not correctly working: a new and visible WebDateChooser appears, but when clicking on it to choose a date, 1. the calendar appears near the original hidden WebDateChooser 2. the chosen date is not written in the visible clicked WebDateChooser.

     Can anyone give me a suggestion?

     Thanks!

    • Post Points: 20
  • 04-04-2008 17:47 In reply to

    Re: WebDatChooser clone not working

    Hi,

    I guess you put WebDateChooser in a <div> and use private IE function cloneNode to create copy of its children. If it is correct, then I would not expect it to work at all. I wonder how it manages to drop-down calendar.
    The WebDateChooser and any other Infragistics control relies on javascript object and its initialization. In most cases that object contains member variables filled with references of subobjects (like button, calendar, etc).
    Sorry, but only html generated by server which contains all required tags and javascripts is supported.

    Regards,
    Viktor
    Infragistics web team
    • Post Points: 20
  • 04-07-2008 8:38 In reply to

    Re: WebDatChooser clone not working

    Thanks for the reply! Big Smile 

    Yes, the hidden WebDateChooser is in a DIV and I am cloning it with CloneNode.

    What can I do, to have a WebDateChooser shown when a specific value is selected in a DropDownList?

    The position of the DropDownList is not fixed: I am using it for a Filter Criteria, and there is a "Add Filter" Button that adds new criteria, and sometimes the user selects the "Start Date" Criteria, and the WebDateChooser should appear near the DropDownList.

    • Post Points: 20
  • 04-07-2008 9:21 In reply to

    Re: WebDatChooser clone not working

    Hi,

    If you already have WebDateChooser inside of <div>, then you may use style="position:absolute;" of that div and set its left and top attributes to the desired location (of DropDownList). You also may set position:absolute to WebDateChooser by itself and use its left/top style attributes.
    If you do not want to use absolute position, then you may try to reparent html-element of WebDateChooser. For example, if you want to move it to a <td> which is located below <td> with your dropdownlist, then you may:

    var dc = igdrp_getComboById("WebDateChooser1");
    if(!dc)
      return;
    var elem = dc.Element;
    elem.parentNode.removeChild(elem);
    //assume that td is reference to new container of dc
    td.appendChild(elem);

    Regards,
    Viktor
    Infragistics web team
    • Post Points: 20
  • 04-15-2008 9:36 In reply to

    Re: WebDatChooser clone not working

    Hi and thanks for your reply!

     The control is something like this:

    1. I have a "Add Filter" button and nothing else but a hidden WebDateChooser at the bottom of the page, in a <div>.

    2. I click "Add Filter" button and a line with

    Search by |Number (Drop Down List)|        Add_Filter_Button     Remove_Filter_Button

    3. I can let the NUMBER in the dropdownlist or change it. I choose to let it as it is, number. I click "Add_Filter_Button".

    4.  A new line appears and I choose Start Date. This is the moment in which the hidden WebDateChooser has to be clonated and positioned correctly to look something like:

    Search by   |Start Date (Drop Down List)|   |Date Chooser|      Add_Filter_Button     Remove_Filter_Button

    5. I again click "Add_Filter_Button" and select End Date, and the hidden WebDateChooser has to be clonated and positioned correctly to look like this:

    Search by   |End Time (Drop Down List)|     |Date Chooser|      Add_Filter_Button     Remove_Filter_Button

    6. I choose to remove the second filter, "Start Time", so I click the "Remove_Filter_Button" from the corresponding line.

    7. I then rethink and want to readd the Start Time filter, so on the "End Time" line, I click Add_Filter_Button. The hidden WebDateChooser needs to be clonated for the third time.

    All these filter elements are created throught javascript, and placed in a <div>.

    So the moving solution would work if I would know how many times I need to clonate a WebDateChooser, but I don't know, and if I would create one WebDateChooser for Start Time and one for End Time and on Add_Filter I would un-hidden it and placed it where it is needed, and on Remove_Filter I would have to re-hidden in and reposition it to the bottom of the page.

    Any other solutions? I really have to solve this problem! Tongue Tied

    • Post Points: 5
  • 06-30-2008 8:52 In reply to

    Re: WebDatChooser clone not working

    Can anyone help me with a suggestion or something?

    Thanks.

    • Post Points: 5
Page 1 of 1 (6 items)
Powered by Community Server (Commercial Edition), by Telligent Systems