ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
How to get o.Main working in vb
Title:
B
I
{code}
?
I got a grid with checkbox working for my VB .net MVC except for one error .Mod(o >= o.Main()) for o is not declared. Is the "O" notation part of the linq systax or something else? I tried to import to the view but seems it doesnt do the trick. I am missing some part of the concept for sure here...pls enlighten me. My source for the checkbox grid is as below: @(Html.Awe().Grid("GridChkPersistent") _ .Mod(Function(o) o.Main(False)) _ .Groupable(False) _ .Sortable(False) _ .Paging(True) _ .Selectable(SelectionType.Single) _ .Url(Url.Action("BatchGetItems")) _ .Columns( New Column With { .Width = 50, .ClientFormat = Html.Awe().CheckBox("BatchId") _ .Ochk() _ .Prefix("cpers.(BatchId)") _ .SyncScript() _ .HtmlAttributes(Nothing, New With {.data_val = ".(BatchId)"}).ToString(), .Header = Html.Awe().CheckBox("ChkAll").Ochk().Prefix("pers").SyncScript().ToString()}, New Column() With {.Bind = "BatchId"}, New Column() With {.Bind = "UploadedTime"}, New Column() With {.Bind = "BatchFilePath"}, New Column() With {.Bind = "UploadedBy"}))
Save Changes
Cancel
Roger Seto
asked at 21 Feb 2022
are you using the latest version ? (Main was added quite recently) in VB.net lambdas are written using `Function` ( `Function(o) o.Main()` ) we have a VB.net demo : https://www.aspnetawesome.com/Download/WebFormsVbDemo it is for web-forms, but there's no big difference between our web-forms and mvc code, have a look at `Default.aspx` for example
at 21 Feb 2022
Omu
It's the latest version 7.0.5 off from demo download. Thanks vm and this really works and enables the mod flawlessly. Updated above code to reflect your comments. I have disabled the ColumnsSelector for my usage.
at 22 Feb 2022
Roger Seto
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