ComboBox set SelectedItem.Value shows value, not text of selected item....

  1. #1

    ComboBox set SelectedItem.Value shows value, not text of selected item....

    When I have server side code to set the value of a drop-down, the combobox shows the ID of the selected value, not the text...

        this.cmboChangeGroup.SelectedItem.Value = groups[0].CompanyGroupId.ToString();
    How can I set the combobox on the server side to show the text, but maintain the fact that the selected value is chosen, so that the users doesn't have to select the item...

    I imagine I could do this?
    
        this.cmboChangeGroup.SelectedItem.Value = groups[0].CompanyGroupId.ToString();
        this.cmboChangeGroup.SelectedItem.Text= groups[0].CompanyGroupName;


    but that just seems wrong...
  2. #2

    RE: ComboBox set SelectedItem.Value shows value, not text of selected item....

    I ran into the same issue, is this the best solution?


    	this.cmboChangeGroup.SelectedItem.Value = groups[0].CompanyGroupId.ToString();
        	this.cmboChangeGroup.SelectedItem.Text= groups[0].CompanyGroupName;
  3. #3

    RE: ComboBox set SelectedItem.Value shows value, not text of selected item....

    Hi,

    this.cmboChangeGroup.Value= groups[0].CompanyGroupName;
    Maia.
  4. #4

    not disply text showing id in combobox..

    Hi

    I have the same problem please any one solve this........

Similar Threads

  1. Replies: 6
    Last Post: Feb 26, 2014, 9:59 AM
  2. [CLOSED] Always selected Item is nothing for combobox as menu item
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 04, 2011, 4:51 PM
  3. [CLOSED] ComboBox SetValue doesn't change SelectedItem.Text
    By ewgoforth in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Nov 11, 2010, 9:11 AM
  4. Replies: 10
    Last Post: Apr 05, 2010, 1:42 AM
  5. Get Combobox Selected item
    By yarlenvas in forum 1.x Help
    Replies: 3
    Last Post: Mar 08, 2009, 2:04 PM

Posting Permissions