Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
620
SelectedItems on my valueList
posted

I get the rows and the dropdown works fine too.... However, i cannot seem to figure out how i bind the dropdown with the typeId. Could you help plz? 

 

 

 

OnLoad 

ultraGrid2.DataSource = dataLayer.getHaendelseStatus(); //gets Id, name, typeId
          

        }

        private void ultraGrid2_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
        {
            Infragistics.Win.ValueList v1;

            v1 = e.Layout.ValueLists.Add("MyValueList");
            v1.ValueListItems.Add(1, "A");
            v1.ValueListItems.Add(2, "B");
            v1.ValueListItems.Add(3, "C");
           
            e.Layout.Bands[0].Columns.Add("ny", "nothingSpecial");
            e.Layout.Bands[0].Columns["ny"].ValueList = e.Layout.ValueLists["MyValueList"];
            }

 

I have also tried with an ultradropdown approach..

      private void ultraGrid2_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
        {

 ultraDropDown1.DataSource = dataLayer.gettypeNames();
            ultraDropDown1.ValueMember = "Id";
            ultraDropDown1.DisplayMember = "Art";
           
  
            e.Layout.Bands[0].Columns.Add("ny", "nothingSpecial");
            e.Layout.Bands[0].Columns["ny"].ValueList = this.ultraDropDown1;
           

}
 

How on earth do i bind the dropdown to the typeId??  ultraGrid2.DataSource = dataLayer.getHaendelseStatus(); //gets Id, name, typeId

Parents
  • 45049
    posted

    By "bind the dropdown to the typeId?" do you mean "how do I apply this dropdown to the column in my grid that represents the typeId property?"  If that's the case, then do one of the following instead of creating a new column:

    e.Layout.Bands[0].Columns["typeId"].ValueList = e.Layout.ValueLists["MyValueList"]; // from first example

    e.Layout.Bands[0].Columns["typeId"].ValueList = this.ultraDropDown1; // from second example

    If that's not what you meant, can you further explain what you mean by "bind the dropdown to the typeId?"

Reply Children