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.

assign value to list box item in Syncfusion Orubase

Thread ID:

Created:

Updated:

Platform:

Replies:

109004 May 24,2013 11:42 PM May 28,2013 01:20 AM Orubase 3
loading
Tags: Orubase
Yara
Asked On May 24, 2013 11:42 PM

I'm work on Orubase Syncfusion in asp.net mvc

I have a list box in my view that has it's value from model from controller , I want to assign for each item specific value to use it in JavaScript

I tried to use

Item.PrimaryKeyValue                              //where PrimaryKeyValue  is integer

And

Item.Value                                                   //where Value  is string

 

 But when I access it in java script by using the following code

function listDetal(sender, args) {

        alert(args.Text.toLowerCase());

 

 

         alert(args.Value);

 

 

    }

Or

         alert(args. PrimaryKeyValue);

 

It gave me undefined value

So, how can I assign values to Items in listbox

Thanks and Regards 


Thivya [Syncfusion]
Replied On May 27, 2013 07:02 AM

Hi Yara,

Please find the below code snippet to get the text and primary key value while selecting the list box items.

//OnItemSelect event
function
select(sender, args) {
   alert("Text : " + args.Text + "\nKey : " + $(args.selectedItem).attr("data-primarykey"));
}

We have also created sample for the same. Please find the sample in the below attachment.

ListBox.zip

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

Regards,
Thivya.


Yara
Replied On May 27, 2013 04:12 PM

thank you very much for your response
it Worked for me

Yara

Thivya [Syncfusion]
Replied On May 28, 2013 01:20 AM

Hi Yara,

We are glad to hear it helps. Please let us know if you need any further assistance.

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.

;