Jul 25, 2016, 2:59 PM
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:
I have tried other ways as well:
Can you help me, please, what is the problem?
Thans in advance,
Zagrei
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.