[CLOSED] Checkbox control does not exist when it is called to set value

  1. #1

    [CLOSED] Checkbox control does not exist when it is called to set value

    The topic has been closed.
    Last edited by Daniil; Nov 15, 2010 at 1:12 PM. Reason: [CLOSED]
  2. #2
    Hi,

    It happens because JavaScript is trying to get an access to non-exist component. By default DropDownField's content is not rendered (lazy mode) while a trigger is not clicked.

    To prevent it please set the CheckboxGroup's LazyMode to Instance.
    <ext:CheckboxGroup runat="server" LazyMode="Instance">
    The second way is setting the Checked property in initial config.
    group.Items.Add(new Checkbox { ID = "item1", BoxLabel = "Item 1", Checked = true });
    Note:

    Please note that if you want to handle dynamically created controls on serverthey should be recreated during each request. There is a lot of threads on the forums regarding this topic.
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi,

    It happens because JavaScript is trying to get an access to non-exist component. By default DropDownField's content is not rendered (lazy mode) while a trigger is not clicked.

    To prevent it please set the CheckboxGroup's LazyMode to Instance.
    <ext:CheckboxGroup runat="server" LazyMode="Instance">
    The second way is setting the Checked property in initial config.
    group.Items.Add(new Checkbox { ID = "item1", BoxLabel = "Item 1", Checked = true });
    Note:

    Please note that if you want to handle dynamically created controls on serverthey should be recreated during each request. There is a lot of threads on the forums regarding this topic.
    Hi,

    Thank you very much. Sorry for closing the topic. We maybe post at the same time.
  4. #4
    It's nothing but could you return the initial post? It can help someone in the future.

Similar Threads

  1. Set control validation after checkbox is checked
    By HexElffilter in forum 1.x Help
    Replies: 1
    Last Post: Feb 16, 2012, 2:21 PM
  2. Replies: 2
    Last Post: Dec 08, 2011, 1:00 PM
  3. [CLOSED] Store.reload() not being called in user control
    By IT1333 in forum 1.x Legacy Premium Help
    Replies: 12
    Last Post: Jun 14, 2011, 9:02 PM
  4. [CLOSED] [1.0] Extended Control Resources property called 3 times?
    By bsnezw in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 24, 2011, 7:16 PM
  5. How add Checkbox in TreeView Control
    By Satyanarayana murthy in forum 1.x Help
    Replies: 2
    Last Post: Nov 16, 2009, 11:25 PM

Posting Permissions