The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientListEdit.GetSelectedItem Method

Returns the list editor's selected item.

Declaration

GetSelectedItem(): ASPxClientListEditItem

Returns

Type Description
ASPxClientListEditItem

A ASPxClientListEditItem object that represents the selected item.

Remarks

Use the GetSelectedItem method to obtain the selected item within the list. A null value indicates that no item is currently selected within the list editor.

Examples

The code sample below demonstrates how you can use the ASPxTrackBar control to display the wavelength range of the selected color.

The ASPxClientListEdit.SelectedIndexChanged event is handled to specify the track bar range interval. The ASPxClientTrackBar.SetPositionStart and ASPxClientTrackBar.SetPositionEnd methods specify range limits.

The image below shows the result.

TrackBar_SetPosition

function setWavelength() {
     tbWavelength.SetPositionStart(colorList.GetValue());
     if (colorList.GetSelectedIndex() == 0) tbWavelength.SetPositionEnd(750)
     else tbWavelength.SetPositionEnd(colorList.GetItem(colorList.GetSelectedIndex() - 1).value); 
     label.SetText('The visible ' + colorList.GetSelectedItem().text + ' light has a wavelength in the interval ' 
     + tbWavelength.GetPositionStart() + ' to ' + tbWavelength.GetPositionEnd() + ' nm');
}
See Also