any basic example on gridview

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    SOLVED : any basic example on gridview

    Any basic example on how to populate a gridview programatically -> vb.net if you can and how to set the nice features that it offers?
    Thank you.

    vb code :
     Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            If Not IsPostBack Then
                Store1.DataSource = querydbdata("SELECT * FROM local_stoc")
                Store1.DataBind()
            End If
        End Sub
        Public Function querydbdata(ByVal xxx As String) As DataTable
            Dim mydatatable As New DataTable
            Try
                myconnection = New MySqlConnection(myconnstr)
                Dim myadapter As New MySqlDataAdapter(xxx, myconnection)
                myconnection.Open()
                myadapter.Fill(mydatatable)
                myconnection.Dispose()
            Catch ex As Exception
                ' mydatatable.Columns.Add()
                ' mydatatable.Rows.Add()
                ' mydatatable.Rows(0)(0) = ex.Message.ToString
            End Try
            Return mydatatable
        End Function
    aspx page
    <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="WebApplication2.WebForm1" %>
    
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
        
            <ext:ResourceManager ID="ResourceManager1" runat="server" />
            <ext:Window ID="Window1" runat="server" Collapsible="true" Height="185" Icon="Application" Title="Title" Width="350">
                <Items>
                </Items>
            </ext:Window>
           
        
          
            <ext:GridPanel ID="GridPanel1" runat="server" Height="300" Title="Title">
                <Store>
                      <ext:Store ID="Store1" runat="server">
                          <Model>
                              <ext:Model runat="server" >
    
                              </ext:Model>
                          </Model>
            </ext:Store>
                </Store>
                <View>
                    <ext:GridView ID="GridView1" runat="server" TrackOver="false" />
    </View>
                <ColumnModel runat="server" >
    
                </ColumnModel>
            </ext:GridPanel>
           
        
        </div>
        </form>
    </body>
    </html>
    not working...
    Last edited by stonegate; Oct 26, 2012 at 7:51 AM. Reason: SOLVED
  2. #2
    Hi,

    What would you like to populate the <ext:GridView> with? There's only a few properties that can be set.

    http://docs.sencha.com/ext-js/4-1/#!/api/Ext.grid.View

    <asp:GridView> != <ext:GridView>
    Last edited by geoffrey.mcgill; Mar 30, 2016 at 9:45 AM.
    Geoffrey McGill
    Founder
  3. #3
    Quote Originally Posted by geoffrey.mcgill View Post
    Hi,

    What would you like to populate the <ext:GridView> with? There's only a few properties that can be set.

    http://docs.sencha.com/ext-js/4-1/#!/api/Ext.grid.View

    <asp:GridView> != <ext:GridView>
    I need to have a blank gridview but with all the setings on : search in the header , can move colunms, show/display columns , filters etc... and while using a list to populate with all the fields from several databases and then based on the selection that will be done in the gridview to make a report.
  4. #4
    Quote Originally Posted by stonegate View Post
    I need to have a blank gridview but with all the setings on : search in the header , can move colunms, show/display columns , filters etc... and while using a list to populate with all the fields from several databases and then based on the selection that will be done in the gridview to make a report.
    i tried that and i cannot handle it....
    i don;t understand how to configure it to display a select if i don;t know the columns .....
  5. #5
    Hello @vaynenick! Welcome to Ext.NET forums!

    I am afraid we are talking about a different GridView here.

    Give it a look on the pointed documentation Geoffrey mentioned: http://docs.sencha.com/ext-js/4-1/#!/api/Ext.grid.View

    In the context of Ext.NET, the GridView is but an auxiliary class to the full component Grid Panel. The grid view here can be seen as an "overlay" of the Grid Panel, which just controls displayed data at a given moment, following the rules determined by the GridPanel itself -- and in some situations.

    In other words, we are talking here about the Ext.NET's GridPanel, one as nice as this: Grid Panel: SQL DataSource

    In essence, our GridPanel would be the equivalent of a superset of the ASP.NET's GridView, with theming, and lots of features as you can see in the neighboring examples to the one pointed above. We hope you like it!
    Fabrício Murta
    Developer & Support Expert
  6. #6

    Asp.Net GridView

    Check this complete tutorial of...Asp.Net GridView

Similar Threads

  1. Visual Basic.Net Help
    By leonelcra in forum 2.x Help
    Replies: 0
    Last Post: Oct 17, 2012, 1:31 AM
  2. Basic MVC Plumbing
    By Patrick_G in forum 2.x Help
    Replies: 3
    Last Post: May 25, 2012, 7:15 PM
  3. Replies: 2
    Last Post: Nov 04, 2011, 6:06 PM
  4. Error in example PropertyGrid > Basic > Overview
    By george.paoli in forum Bugs
    Replies: 1
    Last Post: Nov 17, 2010, 9:05 PM
  5. Getting Started Basic Example
    By tarekahf in forum 1.x Help
    Replies: 3
    Last Post: Nov 09, 2009, 1:17 AM

Posting Permissions