ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Multilookup with VB.Net project
Title:
B
I
{code}
?
I have been trying to implement a Multilookup control within a VB project, and problems are occurring because it needs a Search function with a search variable name, as well as a Selected function with a selected variable name, which VB does not support. I can get it to work with modifying some "search" and "selected" strings in the AwesomeMvc.js, but I would prefer not to do this in case of updates. Is there another way I can change either of these items?
Save Changes
Cancel
Dan Lambourne
asked at 23 Jul 2015
Answers
B
I
{code}
?
MultiLookup has .SearchUrl .SelectedUrl and .GetItemsUrl extensions which you can use instead of specifying the controller (this is what the VB.net demo is using), you could also create a custom extension that would set these values, something like: public static MultiLookup<T> SetController<T>(this MultiLookup<T> multi, string controller){ h.GetItemsUrl(multi.Awe.Url.Action("MyGetItemsAction", controller)); h.SelectedUrl(multi.Awe.Url.Action("a2", controller)); h.SearchUrl(multi.Awe.Url.Action("a3", controller)); return this; } you can download the VB.net demo here: http://aspnetawesome.com/Download/VBnetDemo examples of custom helper extensions you can see in AwesomeModExtensions.cs in the main demo
Save Changes
Cancel
Omu
answered at 23 Jul 2015
That got it working, but I have complaints from the boss about the style, saying that you should be able to move the items from left to right, rather than from top to bottom. Is this possible?
at 05 Aug 2015
Dan Lambourne
There's no easy|out of the box way of doing this, you would have to use custom search form and in that view put your custom js that will change the layout, and also change the icons so instead of up and down arrow you would have left and right
at 05 Aug 2015
Omu
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