Home Forums WinForms controls Xceed Grid for WinForms Using Xceed Editors on Grid v2.5

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #15920 |

    Hi all,

    Yes, I am a bit behind the times. We are currently using Grid v2.5 and are not planning to upgrade as we have no allowance in our budget.

    But looking at the “what’s new” section for the Grid product on the Xceed wesbite, it says that v2.5 is compatable with Xceed Editors. I basically want to have a combobox as one of the cells. I know this is possible with v3 on with the “CellEditorManager” property, but we are only licensed for v2.5, so I hoping that there is a way to replicate this through code.

    Is anyone (ideally Xceed staff 🙂 ) able to supply me with some sample code to show how this is possible? All the latest product doco that I have if for the latest offerings, not older versions.

    regards,

    Mac

    Imported from legacy forums. Posted by Dominic (had 1947 views)

    User (Old forums)
    Member
    Post count: 23064

    You can use the CellEditor property on the column class, and set it to a GridComboBox (included with the editors of version 2.5 of the gird).

    Here is a code snippet taken from another thread on the forums :

    GridComboBox comboEditor = new Xceed.Grid.Editors.GridComboBox();
    this.Columns[ colNames[i]].CellEditor = comboEditor;
    this.Columns[ colNames[i]].CellViewer = comboEditor;

    SqlCommand comm = new SqlCommand(“Get”+colNames[i]+”List”);
    //appConn.GetData will return a filled dataset containing the display/value items for the combobox
    DataSet ds2 = appConn.GetData(comm, colNames[i]+”DS”, colNames[i]+”Tbl”);

    comboEditor.DataSource = ds2.Tables[colNames[i]+”Tbl”];

    comboEditor.DisplayMember = “DisplayValue”;

    comboEditor.ValueMember = colNames[i];

    Imported from legacy forums. Posted by André (had 3408 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.