We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Check after validation

Thread ID:

Created:

Updated:

Platform:

Replies:

132574 Sep 9,2017 11:19 AM Sep 13,2017 05:49 AM ASP.NET Core 3
loading
Tags: ListBox
Stefano Capobianco
Asked On September 9, 2017 11:19 AM

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



Narayanasamy Panneer Selvam [Syncfusion]
Replied On September 11, 2017 02:00 PM

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. 


Stefano Capobianco
Replied On September 12, 2017 01:08 AM

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

Narayanasamy Panneer Selvam [Syncfusion]
Replied On September 13, 2017 05:49 AM

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. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;