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.

item.Html and item.ImageUrl in Orubase list Box didn't worked together

Thread ID:

Created:

Updated:

Platform:

Replies:

109450 Jun 13,2013 11:26 PM Jun 25,2013 12:21 AM Orubase 7
loading
Tags: Orubase
Yara
Asked On June 13, 2013 11:26 PM

I'm working on Orubase Syncfusion , and I used list box tool 
I want to add in the list item: multiple line text and image and align content to the right , when I use 
item.text , I cant assign to it a style and cant display multiple line but image in ImageUrl  shown 
and when I use item.html I can do what I need but the image in ImageUrl  not displayed 
so, where is the problem please 
thanks again and again 

Yara


Thivya [Syncfusion]
Replied On June 14, 2013 02:54 AM

Hi Yara,

Thanks for your interest in Orubase product.

If you want to make the content to appear in multiline then you should use ItemTemplate property, but while using this feature you should define all other things like text, image along with this. You cannot make text, image to appear by means of Text and Image property. Please refer the below sample code snippet.

@Html.Orubase().ListBox("lbCore").IOS(ios => ios.ShowCorners(true)).Items(items =>
{
    items.Add().ItemTemplate(@<a><h3>
         
Airplane</h3>
         
The content for Airplane feature.<img src="../../images/airplane.png" class="sf-image"/></a>);   
    […]
})

We have also created sample for your reference. You can find it in the below attachment.

ListboxDemo

Please try this and let us know if you have any queries.

Regards,
Thivya.


Yara
Replied On June 14, 2013 07:20 PM

Thank you very much for your response

I apply item template in my project  it gave me the errors in loading

I pass model object from controller to view and write the following

 

@Html.Orubase().ListBox("list").OnItemSelect("OnSelect").RenderMode(RenderMode.Auto).IOS(c => c.ShowCorners(false)).BindDataSource(Model, map =>

{

    map.MapTo<Class1>(binding =>

    {

        binding.ItemDataBound((item, nd) =>

        {

items.Add().ItemTemplate(@<a><h3>

            nd.data</h3>

            nd.Detail<img src=nd.ImUrl/></a>);

 

         

      

        });

    });

})

Can you help me please

Thanks again

 

Yara


Thivya [Syncfusion]
Replied On June 17, 2013 12:14 AM

Hi Yara,

Could you please let us know what error you are facing so that we could find out the cause of the issue. The information you provide will be great helpful for us to assist you further.

Regards,
Thivya.

Yara
Replied On June 17, 2013 07:49 AM

Thank you very much for your response
ok, I pass model object from controller to view in asp.net mvc , this object include many data and image url to be displayed in list box, data will be displayed in multiple line,
as I told you I tried item.Html and item.ImageUrl  it didn't worked together
your previous reply to use item.ItemTemplate it did't gave me any compiler error but when run the application it gave me loadinig page error
now , 
how I can display my data and image on list item please
thanks again
Yara

Thivya [Syncfusion]
Replied On June 18, 2013 01:59 AM

Hi Yara,

While using Databinding, you cannot use ItemTemplate property to show the content with multiple line. Instead of that you can use Html property. Please refer the below code snippets.

//View Page
@{

    Html.Orubase().ListBox("list").IOS(c => c.ShowCorners(false))
        .BindDataSource(Model, map =>
         {
             map.MapTo<Products>(binding =>
             {
                 binding.ItemDataBound((item, nd) =>
                 {
                     item.Html = "<div class='first'>" + nd.Text + "<div class='second'>" + nd.Content + "<img class='sf-image' src =" + nd.ImageUrl + "></img";  
                 });
             });
         }).Render();

}

We have also created sample for your reference. Please refer the sample in the below attachment.

ListboxDataBinding

You can try this sample and please let us know if you need any further assistance.

Regards,
Thivya.


Yara
Replied On June 24, 2013 09:34 AM

thank you very much for your response

Rana

Thivya [Syncfusion]
Replied On June 25, 2013 12:21 AM

Hi Rana,

We are glad to help you out. Please feel free to get in touch with us if you require any further clarifications.

Regards,
Thivya.



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.

;