[CLOSED] [1.0] Checkboxes in user control not updating (incorrect ID)

  1. #1

    [CLOSED] [1.0] Checkboxes in user control not updating (incorrect ID)

    I have a couple of issues with control id's when using Ext components within user controls.

    I have three radio buttons in a group (within a container) that are on a user control (ID=PI). This user control is placed within a panel on another user control (ID=CP0) which is in turn placed on a form within a panel :-

    <ext:RadioGroup ID="groupCheckboxes" runat="server" ColumnsNumber="1" HideLabel="true" HideLabels="false">
    <Items>
    <ext:Radio ID="chkReturnedOK" runat="server" BoxLabel="Returned OK" AnchorHorizontal="98%" />
    <ext:Radio ID="chkReturnedDamaged" runat="server" BoxLabel="Returned Damaged" AnchorHorizontal="98%" />
    <ext:Radio ID="chkReturnedLost" runat="server" BoxLabel="Returned Lost" AnchorHorizontal="98%" />
    </Items>
    </ext:RadioGroup>
    The resulting radio buttons are assigned unique id's of CP0_PI_chkReturnedOK etc.

    When setting the Checked property in code behind during an update the generated ExtJS is not picking up the correct user control prefixes :-

    script:"Ext.net.replaceContent(panelProducts ....... ;chkReturnedOK.setValue(false);chkReturnedDamaged.setValue(false);chkReturnedLost.setValue(false);chkReturnedOK.setValue(true);});"
    Where chkReturnedOK should be PI_RP0_chkReturnedOK etc. This only occurs during a page update.

    I also have a similar issue during the same update with a data store on the same control - in this case however the store is referred to as PI_storeMembers rather than RP0_PI_storeMembers. It would appear that the user control reference is prefixed correctly for the hosting user control, but not the topmost :-

    PI_storeMembers.callbackRefreshHandler(response, {serviceResponse: {success:true,data:{data:[], total: 0}}}, PI_storeMembers, o.eventType, o.action, o.extraParams)
  2. #2

    RE: [CLOSED] [1.0] Checkboxes in user control not updating (incorrect ID)

    Hi,

    Can you provide test sample (test project) which demonstrates the issue?
  3. #3

    RE: [CLOSED] [1.0] Checkboxes in user control not updating (incorrect ID)

    Vlad,

    Attached is a sample project - this demonstrates the data store id issue, and would demonstrate the check box id issue too but for an 'Unexpected end of input' error when calling UpdateContent on the panel. I do not have this problem on my main application and cannot see why it's doing this! I've checked and checked the markup and code behind - looks fine to me, perhaps this error is related? Either that or I'm missing something stupid!

    The sample also demonstrates another problem, in that radio groups within a control do not have their group name prefixed with the control ids - should they? Setting the group name in code doesn't appear to make any difference.

    EDIT: the attachment got lost somewhere in the process, hopefully there now.
  4. #4

    RE: [CLOSED] [1.0] Checkboxes in user control not updating (incorrect ID)

    Hi,

    1. Radio issue. Please update from SVN
    2. js error. You have to add user control to the ContentControls before data binding (before SetupControl calling). Therefore
    - Default.aspx.cs DisplayRecord, move
    panelProducts.ContentControls.Add(rp);
    before rp.SetupControl();

    - ParentControl.aspx.cs DisplayRecord, move
    this.panelProductLines.ContentControls.Add(p1);
    before p1.SetupControl();


    P.S. Please do not attach any assemblies, just define your toolkit version
  5. #5

    RE: [CLOSED] [1.0] Checkboxes in user control not updating (incorrect ID)

    Once again, many thanks for your very prompt response. Confirm all issues fixed :-)

Similar Threads

  1. [CLOSED] Updating UI in a Dynamic Control DirectEvent
    By mmemioglu in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Mar 06, 2012, 10:02 AM
  2. Replies: 2
    Last Post: Feb 06, 2012, 9:06 AM
  3. [CLOSED] Window control not updating contents
    By sadaf in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Oct 24, 2011, 3:57 PM
  4. how to upload user control dynamicaly on user control
    By archana mahadule in forum 1.x Help
    Replies: 1
    Last Post: Jan 13, 2011, 12:05 PM
  5. Replies: 2
    Last Post: Apr 15, 2010, 5:33 AM

Posting Permissions