The Controls collection cannot be modified because the control contains code blocks (i.e. ).

  1. #1

    The Controls collection cannot be modified because the control contains code blocks (i.e. ).

    Hi,

    I'm working with Coolite 0.8.2 and when I open some page.aspx where hava the some line with <%=...%>, the following error occurs(Images Attached).
    I have a gridPanel where I have some js, when I insert the line below on the js of the gridPanel, occurs the error information wich are on the images attached.

         <%=txt_dstId.ClientID %>.setValue(id);
    I would like know how can I do?

    Thanks!

    Flavio da Maia.
    Coolite 0.8.2.




  2. #2

    RE: The Controls collection cannot be modified because the control contains code blocks (i.e. ).

    Hi,

    This exception occurs if you use <%=...%> inside header. Move that code outside header or use TokenScript control inside header (with #{} syntax)
    Vladimir Shcheglov
    Sr. Developer
  3. #3

    RE: The Controls collection cannot be modified because the control contains code blocks (i.e. ).


    Hi Vladimir,

    Sometimes I use the syntax #{...}.syntax when I need use on the Handler, but I forever used the syntax <%=...ClientID%>.syntax. Example: http://examples1.ext.net/#/GridPanel...etails_Window/
    I tried use the #{...}.syntax on the part of JS but isn't worked.

    This is my src on JS:

    <script type="text/javascript">
    
     var getIdDst = function(grid, rowIndex, columnIndex) { 
           var record = grid.getStore().getAt(rowIndex); 
           var columnId = grid.getColumnModel().getColumnId(columnIndex); 
           var columnValue = grid.getColumnModel().getDataIndex(0); 
           var id = record.get(columnValue); 
           <%= txtId.ClientID%>.setValue(id);
    }
    
    </script>
    This is my src on Coolite:
      <Listeners>
          <CellClick Fn="getIdDst" />
      </Listeners>

    When I used the asd 0.8.1 this syntax worked, but on the asd 0.8.2 isn't work and occur the error informed in the last post.

    Thanks!

    Flavio da Maia.
    Coolite 0.8.2.
  4. #4

    RE: The Controls collection cannot be modified because the control contains code blocks (i.e. ).



    Hi Vladimir,

    The problem was solved!

    Thanks attention!

    Flávio da Maia.
    Coolite 0.8.2.

Similar Threads

  1. Replies: 6
    Last Post: Dec 07, 2011, 12:55 PM
  2. Replies: 5
    Last Post: Jun 14, 2011, 11:47 AM
  3. Replies: 3
    Last Post: May 19, 2011, 10:13 AM
  4. Replies: 3
    Last Post: May 21, 2010, 12:42 AM
  5. Replies: 1
    Last Post: Feb 11, 2010, 7:48 PM

Posting Permissions