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.

Listbox - Item Actionlink

Thread ID:

Created:

Updated:

Platform:

Replies:

108793 May 13,2013 10:05 AM May 14,2013 02:54 AM Mobile MVC(Classic) 2
loading
Tags: Tools
Frank Wachsmuth
Asked On May 13, 2013 10:05 AM

It is possible to create an actionlink for an item in a databound Listbox? I use the following code:

    @{
        
        Html.MobSyncfusion().ListBox("lbDatabinding").Title("DataBinding").RequestMapper("lbdatabindingreq").ActionMode(ActionMode.Server)
        .RenderMode(RenderMode.Auto)
        .OnItemSelect("LbOnItemSelect")
         .BindDataSource(Model, map =>
         {
             map.MapTo<ILDispo2.Entities.ildispo_FahrAufträge>(binding =>
             {
                 binding.ItemDataBound((item, nd) =>
                 {
                     item.Text = nd.FahrAuftragNr;
                     item.PrimaryKeyValue = nd.FahrAuftragNr;    
                     //ActionLink ???              
                 });
                 
             });
 
         })
 
         .Render();
        
        }


Frank Wachsmuth
Replied On May 13, 2013 03:05 PM

i want to create a separate actionlink for each item in the listbox. Is this possible?

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

Hi Frank,

Thanks for using our Syncfusion Mobile product.

Yes, it’s possible to provide actionlink in each list items using ‘Html’ property. In which you can render the Actionlink control with client sire rendering. Please refer the below code snippets.

[View]

@Html.MobSyncfusion().ListBox("Incidents").RenderMode(RenderMode.Auto).IOS(c => c.ShowCorners(false)).BindDataSource(Model, map =>
{
    map.MapTo<MobileMVCWeb.Controllers.Products>(binding =>
    {
        binding.ItemDataBound((item, nd) =>
        {
            item.PrimaryKeyValue = nd.PrimaryKey;
            item.Html = nd.Title +
"<br/>" + "<a rel='nofollow' href='Home/Views' data-role='sf-m-actionlink' type='button'>Link</a>";
        });
    });
})

Also we have created sample for the same, you can find the sample in below attachment.

Listbox.zip

Please try this sample and let us know if it helps out.

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.

;