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
240
Problem inserting dropdowm in wingrid cell
posted

all, I have tried using a ultradropdown and a value list.

Here is the code for the dropdown

// set the drop down list

List<ResolveCode> resolvecodes = new List<ResolveCode>();

resolvecodes = GetAllCodes(SessionID);

int mycount = resolvecodes.Count;

this.ultraDropDown1.DataSource = resolvecodes;

ultraDropDown1.DisplayMember = "Description";

ultraDropDown1.ValueMember = "ResolveCodeID";

this.ultraWinGrid.DisplayLayout.Bands[0].Columns["Status"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDown;

this.ultraWinGrid.DisplayLayout.Bands[0].Columns["Status"].ValueList = this.ultraDropDown1;

this.ultraWinGrid.DataSource = details;

this.ultraWinGrid.DataBind();

Parents
  • 152
    posted

    Hi,

     

    You said that you have problem by inserting dropdown in your grid. But what is your problem ?

    For example, when I have a dropdown in a cell, I made this :

    this.myGrid.DisplayLayout.Bands[0].Columns[0].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;

    this.myGrid.DisplayLayout.Bands[0].Columns[0].ValueList = dropDown1;

    List<MyTypeObject> _myList = new List<MyTypeObject>();

    _myList = GetAllObject();

    Datasource1.Rows.Clear();

    foreach (MyTypeObject _object in _myList)

    {

    Datasource1.Rows.Add(
    new object[2] { _object.Attribute1, _object.Attribute2 });

    Datasource1.Rows[Datasource1.Rows.Count - 1].Tag = _object;

    }

    dropDown1.DataSource = Datasource1;

    dropDown1.DataBind();

     

    And it works fine.

    Hope this helps

     

    David

Reply Children