This is a migrated thread and some comments may be shown as answers.

Multiple grid view in multiple taps

3 Answers 78 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Anoop
Top achievements
Rank 1
Anoop asked on 22 Mar 2011, 06:40 AM

I want to run separate query in each grid view, these grids is located in deferent taps that was created via dockā€¦

Is that possible in rad grid view for win form?

The information I need to add is retrieved from the same DB

3 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 22 Mar 2011, 10:59 AM
Hello Anoop,

I'm not really sure what your requirement is. Please could you expand on what you wish to do, including any supporting code and screenshots that may help.
thanks
Richard
0
Anoop
Top achievements
Rank 1
answered on 23 Mar 2011, 06:09 AM

Hi Rechard,
As you see I wana use in each tap separate grid view, each one should have different query however my bind method is running only one query in two grid

How can I make it more flexible and running in each tap?

thanks in advance

Function BindGrid2(ByVal queryString As String) As DataSet
  
        Dim settings As ConnectionStringSettings
        settings = System.Configuration.ConfigurationManager.ConnectionStrings("")
        Dim connectionString As String
        connectionString = ""
  
        Dim Dbcon = New SqlConnection(connectionString)
        Dbcon.Open()
        Dim rd As SqlDataReader
        Dim cmd = New SqlCommand(queryString, Dbcon)
        rd = cmd.ExecuteReader()
        rd.Read()
        RadGridView1.MasterTemplate.LoadFrom(rd)
        rd.Close()
  
    End Function
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 23 Mar 2011, 10:20 AM
Hello Anoop,

You can bind more than one grid to the same data source if that's what you mean. Or you could pass in the grid that you wish to bind to your method, or better still give the querystring, and pass back a data source which would make it more generic.

I hope that helps, but let me know if you need more information
Richard
Tags
GridView
Asked by
Anoop
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Anoop
Top achievements
Rank 1
Share this question
or