Micro Niche Builder
Closed Thread
Results 1 to 6 of 6

Thread: Binding grid

  1. #1

    Default Binding grid

    I want to bind grid using asp.net and vb.net. But unable to rename the column names in grid.


  2. Micro Niche Builder

  3. #2

    Default

    go to page_load events then write datagridview1.datasourse(datasourse,"scr") then write datagridview1.databind,

  4. #3

    Default

    To bind the Grid in ASP.Net or VB. NET,
    use follwing code in the calling event.

    Dim ds as new Dataset
    Dim adp as new SQLdataadapter("select * fromtablename", cn)
    adp.fill(ds)
    Datagridview1.datasource=ds.tables(0)
    Datagridview1.databind()

  5. #4

    Default

    To bind the Grid in ASP.Net or VB. NET,
    use follwing example code in the calling event.
    imports system.data.sqlclient
    imports ssytem.data
    dim cn as new sqlconnection("connection string")
    Dim ds as new Dataset
    Dim adp as new SQLdataadapter("select * from tablename", cn)
    adp.fill(ds)
    Datagridview1.datasource=ds.tables("scr")
    Datagridview1.databind()

  6. #5

    Cool

    Quote Originally Posted by ruchi_patel View Post
    To bind the Grid in ASP.Net or VB. NET,
    use follwing example code in the calling event.
    imports system.data.sqlclient
    imports ssytem.data
    dim cn as new sqlconnection("connection string")
    Dim ds as new Dataset
    Dim adp as new SQLdataadapter("select * from tablename", cn)
    adp.fill(ds)
    Datagridview1.datasource=ds.tables("scr")
    Datagridview1.databind()
    thanks ruchi.......
    its also helpful to me........
    thanks for sending steps for that.......

  7. #6

Closed Thread

Similar Threads

  1. How to bind data to grid?
    By nikon in forum ASP Help
    Replies: 7
    Last Post: 08-20-2009, 09:36 PM

Tags for this Thread

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