Apr 11, 2011, 6:36 PM
[CLOSED] Problems once again with referencing Controls : GridPanel "undefined"?
Hey,
so once again I get the dreaded "MyFineControl is not defined".
So, I have a button, that button has a a DirectEvent, and that directEvent has Parametes as can be seen here:
There is no other gridpanel on the page that has that name.
Note:
I cannot use the #{....} things because then at server-side when I look in e.Parameters, the name of the parameter is a whole lot more than "GridPanel_Customer" and since I dont have that other name, I cannot just do
Now, I have looked at this example:
http://forums.ext.net/showthread.php...ore+jsonValues
and in that example, Daniil does not use #{...} or IDMode="Explicit".
Does it work because the Button is defined AFTER the GridPanel in Daniils example? In my code the Button and DirectEvent is defined before the GridPanel.
so once again I get the dreaded "MyFineControl is not defined".
So, I have a button, that button has a a DirectEvent, and that directEvent has Parametes as can be seen here:
<ext:Button ID="btnCreate" Icon="Disk" Text="Save" runat="server" >
<DirectEvents>
<Click OnEvent="Create">
<ExtraParams>
<ext:Parameter
Name="GridPanel_Customer"
Value="GridPanel_Customer.getRowsValues()"
Mode="Raw"
Encode="true" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
The gridpanel that is referenced in the above DirectEvent is here (same page):<ext:GridPanel runat="server" ID="GridPanel_Customer"
Height="150"
AutoExpandColumn="CustomerName">
<Store>
<ext:Store runat="server" ID="Store_Customer">
<Reader>
<ext:ArrayReader>
<Fields>
<ext:RecordField Name="CustomerTypeId"></ext:RecordField>
<ext:RecordField Name="CustomerName"></ext:RecordField>
<ext:RecordField Name="CustomerNbr"></ext:RecordField>
</Fields>
</ext:ArrayReader>
</Reader>
</ext:Store>
</Store>
// etc
</ext:GridPanel>
The question is: why do I get "undefined" when referencing the GridPanel?There is no other gridpanel on the page that has that name.
Note:
I cannot use the #{....} things because then at server-side when I look in e.Parameters, the name of the parameter is a whole lot more than "GridPanel_Customer" and since I dont have that other name, I cannot just do
string jsonValues = e.ExtraParams["GridPanel_Customer"];
since that will give me NullRef because the name is something else. Therefore I cannot use IDMode="Explicit" either as I understand it.Now, I have looked at this example:
http://forums.ext.net/showthread.php...ore+jsonValues
and in that example, Daniil does not use #{...} or IDMode="Explicit".
Does it work because the Button is defined AFTER the GridPanel in Daniils example? In my code the Button and DirectEvent is defined before the GridPanel.
Last edited by Daniil; Apr 15, 2011 at 12:07 PM.
Reason: [CLOSED]