Grid with RadioGroup

  1. #1

    Grid with RadioGroup

    Hello,

    I have issue with adding RadioGroup to gridpanel.
    Ive found this comment: http://forums.ext.net/showthread.php...ll=1#post49885 and tried to use it.
    Unfortunately, i have to rework code from comment to something like this:
    Html.X().GridPanel()
       .ID("RelatedCasesGrid" + i)
       .Width(520)
       .EnableColumnMove(false)
       .Region(Region.West)
       .SortableColumns(false)
       .Store(
          Html.X().Store().PageSize(5)
             .RemoteSort(true)
             .Model(
                Html.X().Model()
                   .Fields(
                      new ModelField("Id"),
                      new ModelField("Number"),
                      new ModelField("CreatedOn"),
                      new ModelField("Status")
                   )
                )
             .Proxy(
                Html.X().AjaxProxy()
                   .Url(Url.Action("GetLinkCases"))
                   .Reader(Html.X().JsonReader().Root("data"))
                )
             .Parameters(ps =>
                {
                   ps.Add(new StoreParameter("caseId", ViewBag.CaseId.ToString(), ParameterMode.Value));
                })
          )
       .ColumnModel(
          Html.X().Column().Text("Id").DataIndex("Id").Hidden(true),
          Html.X().Column().Text("Number").DataIndex("Number").MenuDisabled(true).Flex(1).Sortable(true),
          Html.X().DateColumn().Text("Created On").DataIndex("CreatedOn").Format("dd.MM.yyyy").MenuDisabled(true).Flex(1).Sortable(true),
          Html.X().Column().Editor(el =>
             {
                el.Add(Html.X().RadioGroup()); // line with error !!!!!!!!!!!!!
             },
          Html.X().Column().Text("Status").DataIndex("Status").MenuDisabled(true).Flex(1).Sortable(true)
       )
       .Hidden(false)
       .View(Html.X().GridView().StripeRows(true))
       .BottomBar(
          Html.X().PagingToolbar()
       )
    But I get error, because Html.X().RadioGroup() is not Ext.Net.Field.

    I have tried other ways as well:

    .ColumnModel(
       Html.X().Column().Text("Id").DataIndex("Id").Hidden(true),
       Html.X().Column().Text("Номер").DataIndex("Number").MenuDisabled(true).Flex(1).Sortable(true),
       Html.X().DateColumn().Text("Дата создания").DataIndex("CreatedOn").Format("dd.MM.yyyy").MenuDisabled(true).Flex(1).Sortable(true),
       Html.X().Column().Editor(Html.X().RadioGroup()), // line with error !!!!!!!!!!!!!
       Html.X().Column().Text("Статус").DataIndex("Status").MenuDisabled(true).Flex(1).Sortable(true)
    )
    The same error (editor is waiting Ext.Net.Field as arg)

    .ColumnModel(
       Html.X().Column().Text("Id").DataIndex("Id").Hidden(true),
       Html.X().Column().Text("Номер").DataIndex("Number").MenuDisabled(true).Flex(1).Sortable(true),
       Html.X().DateColumn().Text("Дата создания").DataIndex("CreatedOn").Format("dd.MM.yyyy").MenuDisabled(true).Flex(1).Sortable(true),
       Html.X().Column().Editor(el => // lines with error !!!!!!!!!!!!!
          {
             el.Add(Html.X().Radio());
             el.Add(Html.X().Radio());
             el.Add(Html.X().Radio());
          }),
       Html.X().Column().Text("Статус").DataIndex("Status").MenuDisabled(true).Flex(1).Sortable(true)
                                                            )
    This one compiles correctly, but instead of 3 radiobuttons i see just white space, and there isn't anything in html-code.

    Can you help me, please, what is the problem?

    Thans in advance,
    Zagrei
    Last edited by Zagrei; Jul 25, 2016 at 3:06 PM.

Similar Threads

  1. RadioGroup in Grid Panel Error
    By ddeniz in forum 2.x Help
    Replies: 1
    Last Post: Nov 19, 2015, 1:46 PM
  2. Replies: 2
    Last Post: Oct 10, 2012, 6:27 PM
  3. [CLOSED] Help RadioGroup inside Editable Grid
    By sharif in forum 1.x Legacy Premium Help
    Replies: 23
    Last Post: Jan 26, 2012, 9:39 PM
  4. Grid with RadioGroup
    By Dominik in forum 1.x Help
    Replies: 13
    Last Post: Jul 18, 2011, 11:31 AM
  5. RadioGroup
    By JsonTerre in forum 1.x Help
    Replies: 4
    Last Post: Jan 30, 2009, 2:58 PM

Posting Permissions