Results 1 to 3 of 3

Thread: how to fill comboobx using dataset

  1. #1

    Thread Starter
    Fanatic Member karthikeyan's Avatar
    Join Date
    Oct 2005
    Location
    inside .net
    Posts
    919

    how to fill comboobx using dataset

    hi can any one show some example how to fill combobox using dataset
    i used this:

    ds_code = general.ExecuteDataset(con, "HRUser_sprollcodeselect")
    Dim i As Integer = ds_code.Tables(0).Rows.Count
    HRUser_cmb_rollcode.DataSource = ds_code.Tables(0)
    HRUser_cmb_rollcode.DisplayMember = "roll_code"

    but i couldn't get i am getting system.data.datarowview,can any one help me please

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: how to fill comboobx using dataset

    That means that there is no column named "roll_code" in the bound table. Make sure that you are specifying a valid column name, taking note that DisplayMember is case-sensitive.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Fanatic Member karthikeyan's Avatar
    Join Date
    Oct 2005
    Location
    inside .net
    Posts
    919

    Re: how to fill comboobx using dataset

    hi jmcilhinney, thanks a lot, i did a small mistake,i found that using ur help thank you very much

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width