ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Boolean toggle value is showing "No" by default on edit in inline editing grid
Title:
B
I
{code}
?
Hi I am using inline editing grid in my application. I have some records inserted in it with some boolean columns. @(Html.Awe().Grid("ContactFieldSettingGrid") .SingleColumnSort(true) .Mod(o => o.PageInfo().PageSize().ColumnsSelector()) .Mod(o => o.PageInfo().InlineEdit(Url.Action("Create"), Url.Action("Edit"))) .Url(Url.Action("GridGetItems", "ContactFieldSetting")) .Parent("SelectedcontactType", "search") .Parent("txtSearch", "searchFieldLbl") .Persistence(Persistence.View) .Resizable(true) .Groupable(false) .Columns( new Column { Bind = "FieldID" , Hidden = true }.Mod(o=>o.InlineId()), new Column { Bind = "FieldName", Header="Field Name" }, new Column { Bind = "FieldLabel", Header = "Field Label" }.Mod(o=>o.Inline(Html.Awe().TextBox("FieldLabel"))), new Column { Bind = "IsStaticField", Header = "Static Field", Width = 100 }, new Column { Bind = "IsVisible", Header = "Visible", Width = 80 }.Mod(o => o.InlineBool(cssClass: "btoggle")), new Column { Bind = "IsMandatory", Header = "Mandatory", Width = 100 }.Mod(o => o.InlineBool(cssClass: "btoggle")), new Column { Bind = "OverwriteAlways", Header = "Overwite If Always" }.Mod(o => o.InlineBool(cssClass: "btoggle")), new Column { Bind = "OrgName", Header = "Department", Width = 180 }, new Column { ClientFormat = GridUtils.InlineEditFormatForSettings(), Width = 60 } )) problem is when I am clicking on the EDIT button the boolean toggle buttons are set to false/No by default instead of their actual value. Please suggest some help
Save Changes
Cancel
Tanuj Shrivastava
asked at 13 Oct 2016
in the previous version a Prop+Checked property was needed in the grid model, you can update to the new version (5.0) and this will be easier
at 15 Oct 2016
Omu
I cannot download and implement new version as my project is in last phase, please suggest some help in this case only.
at 17 Oct 2016
Tanuj Shrivastava
I just did "in the previous version...", you also have the previous demo so you can look there for an example
at 17 Oct 2016
Omu
yes exactly I am using the previous demo example only and wrote my code as shown above, still facing the problem that's why I wanted your help to find out is there any problem in the code above.
at 17 Oct 2016
Tanuj Shrivastava
you need to have the Prop+Checked property in the grid model, that's all I can help you with the information I have, but you can do the following to help me help you: http://aspnetawesome.com/learn/mvc/CommonProblems#Isolate-the-problem
at 17 Oct 2016
Omu
may you please exactly point where this prop+checked property is defined in grid model
at 17 Oct 2016
Tanuj Shrivastava
it's in the Map function, you can download the previous demo from [https://awesome.codeplex.com/downloads/get/1513437 here] open `GridInlineEditDemoController.cs` and search for "checked"
at 17 Oct 2016
Omu
Answers
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK