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. Image for the cookie policy date
close icon

MultiColumnDropDown: how to retrieve selected row?

Hi,

I'm quite new to SyncFusion Framework for ASP .NET MVC.

I would like to know how to manage MultiColumnDropDown. Here is my pb:

I have a form with 5 MultiColumnDropDown Inside. Each MultiColumnDropDown is binded to a IEnumerable<MyBusinessObject>. For example, I have de BusinessObject with Id (Guid), FirstName (String), LastName (String).

In the dropdown, I show only First and LastName.

The user select an item in the MultiColumnDropDown then click on the submit button.

But on Server side, I can retrieve only the Fisrt/LastName of the selected item. How can I retrieve the Id?

(I'm quite sure i don't use it in the correct way ;-))


1 Reply

VR Varalakshmi R.S Syncfusion Team February 13, 2013 07:28 AM UTC

Hi Clark,

 

Thanks for contacting Syncfusion forums.

 

We suggest you to use “ClientSideOnSelect” event to retrace the selected row details from MultiColumnDropDown control. Please refer the below code snippet to achieve this,

<code>

[View]

@(Html.Syncfusion().MultiColumnDropDown<MultiDDC.Models.Student>("Multicolumndropdown", "dropdown", columns =>

{

    columns.Add(c => c.UniversityCode).HeaderText("Univ Code").Width(100);

    columns.Add(c => c.Title).HeaderText("Title").Width(100);

    columns.Add(c => c.CourseFees).HeaderText("Course fees").Width(100);

    columns.Add(c => c.CGPA).HeaderText("CGPA").Width(100);

}))

[Script]

function ClientSideOnSelect(sender, args) {

        var selectedRow = args._SelectedRow; //retrieved the row details and pass it to the controller during post

        debugger

    }

</code>

 

Kindly let us know if it helps.

 

Regards,

Varalakshmi


Loader.
Live Chat Icon For mobile
Up arrow icon