Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Really, X.GetCmp() doesn't work as expected. We will investigate. (Investigated. See EDIT below the sample.)</p> <p>Though, in any way, it would not give access to a Radio's BoxLabel. X.GetCmp&lt;> just retrieve respective values from POST, but a BoxLabel is not a submitable thing. You can get access to a Radio's InputValue (or its client id if InputValue is omitted).</p> <p>For now, you can retrieve the thing direct from POST.</p> <p><strong>Example</strong></p> <pre><code>&lt;%@ Page Language="C#" %&gt; &lt;%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %&gt; &lt;script runat="server"&gt; protected void RenderRadioGroup(object sender, DirectEventArgs e) { RadioGroup rg = new RadioGroup() { ID = "RadioGroup1", GroupName = "RadioGroup1", ColumnsNumber = 1, Items = { new Radio() { InputValue = "Radio1", BoxLabel = "Radio1" }, new Radio() { InputValue = "Radio2", BoxLabel = "Radio2" } } }; rg.Render(this.Form); } [DirectMethod] public void GetCheckedItems() { X.Msg.Alert("GetCheckedItems", Request.Params["RadioGroup1"]).Show(); } &lt;/script&gt; &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head runat="server"&gt; &lt;title&gt;Ext.NET v2 Example&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;form runat="server"&gt; &lt;ext:ResourceManager runat="server" /&gt; &lt;ext:Button runat="server" Text="Render a RadioGroup" OnDirectClick="RenderRadioGroup" /&gt; &lt;ext:Button runat="server" Text="Get CheckedItems" Handler="App.direct.GetCheckedItems();" /&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p><strong>EDIT</strong></p> <p>Unfortunately, X.GetCmp() can't work. It can work only if populate a created RadioGroup's Items with all its Radio created by X.GetCmp(), but it is too cumbersome. So, getting a value direct from POST looks the only appropriate solution.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload