Multi-Column--Get Column Value From Selected Row

6 posts, 0 answers
  1. Velma
    Velma avatar
    32 posts
    Member since:
    Jul 2011

    Posted 21 Feb 2012 Link to this post

    (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?
  2. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 24 Feb 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Velma
    Velma avatar
    32 posts
    Member since:
    Jul 2011

    Posted 06 Mar 2012 Link to this post

    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? 
  5. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 09 Mar 2012 Link to this post

    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.
  6. athiq
    athiq avatar
    2 posts
    Member since:
    Nov 2015

    Posted 18 Oct Link to this post

    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

  7. Peter Milchev
    Admin
    Peter Milchev avatar
    144 posts

    Posted 20 Oct Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017