This is a migrated thread and some comments may be shown as answers.

Multi-Column--Get Column Value From Selected Row

5 Answers 713 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Velma
Top achievements
Rank 1
Velma asked on 21 Feb 2012, 06:32 PM
(1) In a multi-column RadCombo, is there some way to get a value from the selected row (which is not the SelectedValue and not the SelectedText)? Client-side preferred.

(2) In a multi-column RadCombo, is there some way to get the input area to display in columns matching the dropdown?

5 Answers, 1 is accepted

Sort by
0
Ivana
Telerik team
answered on 24 Feb 2012, 11:47 AM
Hello Velma,

You should consider using custom attributes -- for more information you could refer to our online documentation: [http://www.telerik.com/help/aspnet-ajax/combobox-custom-attributes.html].

Also, I have prepared a sample project showing how to use and access custom attributes on the client.

I hope this would help.

Regards,
Ivana
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Velma
Top achievements
Rank 1
answered on 06 Mar 2012, 06:06 PM
Thanks very much. I will try it. Any thoughts on the second question?:
(2) In a multi-column RadCombo, is there some way to get the input area to display in columns matching the dropdown? 
0
Ivana
Telerik team
answered on 09 Mar 2012, 01:39 PM
Hi Velma,

If I understand your question right, you want to display the text of all columns of a specific row (the selected one), in the input area. If this is your question, then this is shown in the sample page I have provided in my previous post:
protected void OnItemDataBound(object sender, RadComboBoxItemEventArgs e){
 
        DataRowView dataSourceRow = (DataRowView)e.Item.DataItem;
        e.Item.Text =  dataSourceRow["ProductName"].ToString() + " + " + dataSourceRow["Manufacturer"].ToString()
            + " + " + dataSourceRow["Price"].ToString();
         
        e.Item.Attributes["customAttribute1"] = dataSourceRow["ProductName"].ToString();
        e.Item.Attributes["customAttribute2"] = dataSourceRow["Manufacturer"].ToString();
        e.Item.Attributes["customAttribute3"] = dataSourceRow["Price"].ToString();
        e.Item.DataBind();
    }

If not, I will need a little more details about the scenario you want to achieve -- it will be very helpful if you can provide us with a sample page or images explaining your scenario.

Greetings,
Ivana
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
athiq
Top achievements
Rank 2
answered on 18 Oct 2016, 08:22 AM

Hi there,

I have similar question on how to Get Column Value From Selected Row. I'm working in Telerik UI for WinForms.

like for instance I have 2 columns display on RadMultiColumnCombo Name and ID. want to store ID second column on selected item.

Hope you got my question. can you please post a sample code on this.

where and what code should i write to get second column data..?

 Private Sub RadCombo2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RadCombo2.SelectedIndexChanged
        ' MsgBox(RadCombo2.SelectedValue)

  End Sub

 

Attached file is my code FYI.

18-OCT-2016

0
Peter Milchev
Telerik team
answered on 20 Oct 2016, 09:57 AM
Hello Athiq,

This thread is for the RadComboBox for ASP.NET AJAX, while your question is for RadMultiColumnCombo for WinForms. That is why I would like to ask you to open (in the corresponding forums section) new threads for questions that are not related to the thread's original topic and scenario. Thus we can keep the threads concise and easy to track, if needed. Also you would get a better support service.

Regards,
Peter Milchev
Telerik by Progress
Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
Tags
ComboBox
Asked by
Velma
Top achievements
Rank 1
Answers by
Ivana
Telerik team
Velma
Top achievements
Rank 1
athiq
Top achievements
Rank 2
Peter Milchev
Telerik team
Share this question
or