Results 1 to 2 of 2

Thread: Display Data

  1. #1
    HowardAllen is offline Senior Member
    Join Date
    Dec 2009
    Posts
    196
    Rep Power
    3

    Default Display Data

    Display Data in Data Grid View

    I am new in C#. Net programming language and while learning it, I have one problem of the showing the data in the data grid view. If anybody is having information from which I can capable to resolve this issue then please give me that. It will be helpful to me. I have tried different method it, but not able to get the solution. Any help would be highly appreciated.

  2. #2
    MyersGray is offline Senior Member
    Join Date
    Dec 2009
    Posts
    198
    Rep Power
    3

    Default

    1) Try the following code which is solving your problem:

    Public void Fillgrid()
    {
    Public sqlconnection cn;
    Public sqldataadpter da;
    Public dataset ds;
    Cn=new selconnection (“write connection string”);
    Cn.open();
    Da= new sqldataadpter(“write sql command”,cn);
    Ds=new sqldataset();
    Da.Fill(ds);
    //write gridview control name
    Gridview1.datasource=ds;
    Gridview1.databinding ();
    }

    Apply this method wherever you want.

Similar Threads

  1. Replies: 0
    Last Post: 11-11-2009, 07:48 AM
  2. Data Bank 120GB Portable Digital Data Backup
    By qorian94 in forum Storage
    Replies: 0
    Last Post: 07-24-2008, 08:31 AM
  3. Data Bank Portable 120GB Digital Data Storage
    By jakarta659 in forum Hard Disk
    Replies: 0
    Last Post: 07-16-2008, 02:01 PM
  4. A-Data My Flash BC2 Flash Drive, LCD Display
    By omi.hardo in forum Flash Drives
    Replies: 0
    Last Post: 06-10-2008, 06:09 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48