- Home
- Forum
- ASP.NET Core
- Check after validation
Check after validation
Hi support i need help with a listbox.
This is mi listbox and work very well:
<ej-list-box id="RolesIds" show-checkbox="true" height="180px" width="100%" asp-for="RolesIds" selected-itemlist="">
<e-datamanager url="/Security/RolesApi/GetAllRoles" adaptor="WebApiAdaptor"></e-datamanager>
<e-list-box-fields id="Name" value="Name" text="Name" />
</ej-list-box>
The problem is the follow: this listbox is a part of a multi step form. When i submit no problem to retrive data inside the web api but, when i have some errors in others steps i woluld like to recheck the same items checked before the submit and if it's possible, i wouldn't like to use the persistence.
It's possible or i need to use the persistence ? If i need how can i disable/enable the persistence when reset form or when the controller actis is completed without errors ?
Thanks in advance for your help
Stefano Capobianco
SIGN IN To post a reply.
3 Replies
NP
Narayanasamy Panneer Selvam
Syncfusion Team
September 11, 2017 06:00 PM UTC
Hi Stefano Capobianco,
Thanks for contacting syncfusion support.
We have prepared a sample with your requirement. Since we haven’t provided “enablePersistence” support for checkbox, we cannot achieve your requirement by using enablePersistence property. So we suggest you that postback the data without refreshing the listbox data, in the following way. please prevent the default submit button’s action using preventDefault() method.
If we have misunderstood query please share a demo to explain your issue or scenario you are trying to achieve. So that we can help you out better.
Regards,
Narayanasamy P.
SC
Stefano Capobianco
September 12, 2017 05:08 AM UTC
Hi, thx for your answer. I join us the source form source code and the validator source code.
If you need other sources to better undertand say me.
Other little question, when i use a listbox inside the smartwizard (multi step form used in the cshtml) some classes are joined to listbox e-content to div.e-listbox-container and selectItem to li.e-select and the reverse color of selected item don't take the list box length but when i hit ctrl-shift-i the listbox work perfectly without the other classes joined. The same listbox outside this plugin work perfectly .
Best regards
Stefano Capobianco
Attachment: sources_10a85c49.7z
NP
Narayanasamy Panneer Selvam
Syncfusion Team
September 13, 2017 09:49 AM UTC
Hi Stefano Capobianco,
Thanks for your reply.
Query: reverse color of selected item don't take the list box length.
We can reproduce your issue. This is because Listbox is rendered inside a hidden element initially, so the width and height will not be calculated properly. So we suggest you to use refresh() method to refresh Scroller of ListBox. While refreshing scroller dimensions will be updated based on parent element.
We have modified the sample with your requirement. Please find it in the below link: http://www.syncfusion.com/downloads/support/forum/132574/ze/ListBox1670162473
Regards,
Narayanasamy P.
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
SC Stefano Capobianco
- Sep 9, 2017 03:19 PM UTC
- Sep 13, 2017 09:49 AM UTC