How to assign dataset in Radcombobox using Wpf

6 posts, 0 answers
  1. kottu
    kottu avatar
    23 posts
    Member since:
    Mar 2009

    Posted 11 Sep 2009 Link to this post

    How to use Rad combobox in wpf????????????

    1. Add item in radcombobox ?

    2.display member and Value member   using Radcombobox...



    thanks,

    regards,

    vignesh

  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 11 Sep 2009 Link to this post

    Hello vighesh,

    Our demo site provides nice examples that demonstrate the answers of your questions:
    http://demos.telerik.com/wpf/

    You could also check our online help:
    http://www.telerik.com/help/wpf/radcombobox-populating-with-data.html

    Sincerely yours,
    Valeri Hristov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for WPF is Visual Studio 2017 Ready
  4. kottu
    kottu avatar
    23 posts
    Member since:
    Mar 2009

    Posted 11 Sep 2009 Link to this post

    thanks for ur reply,

    im use Radcombobox in telerik.winforms
    like this way
                 RadCombo.Items.Clear();
                    DbCommand Dbcmd = db.GetStoredProcCommand(ProcName);
                    db.AddInParameter(Dbcmd, "ColumnID", DbType.String, ColumnID);
                    db.AddInParameter(Dbcmd, "ColumnName", DbType.String, ColumnName);
                    db.AddInParameter(Dbcmd, "TableName", DbType.String, TableName);
                         db.LoadDataSet(Dbcmd, ds, TableName);
                    DataTable dt = ds.Tables[TableName];
                    DataRow dr = dt.NewRow();
                    dr[ColumnID] = 0;
                    dr[ColumnName] = "Select";
                    dt.Rows.InsertAt(dr, 0);

                    RadCombo.BindingContext = new BindingContext();
                    RadCombo.DataSource = ds.Tables[TableName];
                    RadCombo.DisplayMember = ColumnName;
                    RadCombo.ValueMember = ColumnID;
                    // RadCombo.SelectedValue = 0;

    my doubt is how to use  Radcombobox in wpf
    bindingcontext,
    datasource,
    displaymember,
    valuemember ,
    it does not support in wpf....
    regards,
    vignesh
  5. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 11 Sep 2009 Link to this post

    Hi vignesh,

    As far as I know the corresponding properties are:
    BindingContext -> DataContext
    DataSource -> ItemsSource
    DisplayMember -> DisplayMemberPath
    ValueMember -> SelectedValuePath

    Sincerely yours,
    Valeri Hristov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. kottu
    kottu avatar
    23 posts
    Member since:
    Mar 2009

    Posted 11 Sep 2009 Link to this post

    thanks for u r reply

    How to assign dataset in Radcombobox????????

    ds ---->dataset

    RadCombo.ItemSource = ds.Tables[TableName];

    Its not working...............
    can u give me  some sample code ....

    regards,
    vignesh
  7. kottu
    kottu avatar
    23 posts
    Member since:
    Mar 2009

    Posted 12 Sep 2009 Link to this post

    thanks a  lot  Valeri Hristov...

    I got it man........

    RadCombo.ItemsSource = datatable1.DefaultView;

    Thanks for ur co-operation.....




    regards ,
    vignesh..







Back to Top
UI for WPF is Visual Studio 2017 Ready