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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Dialog and newline

Thread ID:

Created:

Updated:

Platform:

Replies:

146426 Aug 2,2019 07:47 PM UTC Aug 7,2019 05:29 PM UTC ASP.NET MVC 7
loading
Tags: Dialog
Pio Luca Valvona
Asked On August 2, 2019 07:47 PM UTC

I have an array of strings that I have to show in a dialog. 
Is it possible to insert a carriage return between one string and another to have each string on a different line?

Ashokkumar Balasubramanian [Syncfusion]
Replied On August 5, 2019 12:03 PM UTC

Hi Pio Luca Valvona, 
 
Good day to you. 
 
We are not clear about your query regarding dialog control, can you share the addition details about your query, like what have you tried, your code snippet and share the expected output. Refer the below link for documentation about the dialog control in MVC. 
 
 
Please let us know, if you have any concern on this. 
 
Regards, 
Ashokkumar B. 


Pio Luca Valvona
Replied On August 5, 2019 04:48 PM UTC

This is my code:

@Html.EJ().Dialog("ErrorList").ShowOnInit(false)
$("#ErrorList").ejDialog("setContent", response.alerts);
$("#ErrorList").ejDialog("open");
"response.alert" is a list of string.

Result is attached.

I need every string in the list to be displayed on a new line.

Attachment: dialogResult_352567b6.zip

Ashokkumar Balasubramanian [Syncfusion]
Replied On August 6, 2019 01:17 PM UTC

Hi Pio Luca, 
 
Thank you for sharing the code block. 
 
Based on your requirement, we have prepared the sample for display the array of strings in Dialog component, please find it below. 
 
 
Note: For this application, we have added the pre tag in application level, so could you please ensure, if you are applying any styles for this element? 
 
Please let us know, if you have any concerns. 
 
Regards, 
Ashokkumar B. 


Pio Luca Valvona
Replied On August 6, 2019 03:48 PM UTC

Hi Pio Luca, 
 
Thank you for sharing the code block. 
 
Based on your requirement, we have prepared the sample for display the array of strings in Dialog component, please find it below. 
 
 
Note: For this application, we have added the pre tag in application level, so could you please ensure, if you are applying any styles for this element? 
 
Please let us know, if you have any concerns. 
 
Regards, 
Ashokkumar B. 


Thanks for the support, the change you've shown me works as expected, but a bootstrap style is applied.
 Is there a way to have the same result without changing the style?

Ashokkumar Balasubramanian [Syncfusion]
Replied On August 7, 2019 01:31 PM UTC

 
Hi Pio Luca, 
 
Thank you for your concerns. 
 
As per your concerns, we have removed the pre tag and used custom class to achieve your requirement in below sample. Could you please check sample and update your concerns? 
 
 
Regards, 
Ashokkumar B. 


Pio Luca Valvona
Replied On August 7, 2019 02:35 PM UTC

 
Hi Pio Luca, 
 
Thank you for your concerns. 
 
As per your concerns, we have removed the pre tag and used custom class to achieve your requirement in below sample. Could you please check sample and update your concerns? 
 
 
Regards, 
Ashokkumar B. 


Thanks for the support Ashokkumar , the change you've shown me works as expected. It's perfect,

Ashokkumar Balasubramanian [Syncfusion]
Replied On August 7, 2019 05:29 PM UTC

Hi Pio Luca, 
 
We are glad to hear the problem has been resolved. Please let us know, if you need any further assistance. 
 
Regards, 
Ashokkumar B. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon