BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
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.
Please try this and let us know if you have any queries.
Regards,
Thivya.
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
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.
You can try this sample and please let us know if you need any further assistance.
Regards,
Thivya.