Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > I would like to add a button that the user can click to execute query - fills gridView control

Reply
Thread Tools

I would like to add a button that the user can click to execute query - fills gridView control

 
 
jonny
Guest
Posts: n/a
 
      07-30-2007
How can I do this with ASP controls & VB.NET

On click of button run query to fill gridView.

 
Reply With Quote
 
 
 
 
Brandon Gano
Guest
Posts: n/a
 
      07-30-2007
I think you want something like this (forgive the sloppy VB; I'm a C# guy):

--aspx--
<asp:Button ID="MyButton" runat="server" Text="Fill"
OnClick="MyButton_Click" />
<asp:GridView ID="MyGrid" runat="server" ...>
...
</asp:GridView>

--aspx.vb--
Protected Sub MyButton_Click(ByVal sender As Object, ByVal e As EventArgs)

'TODO: Create data source (MyDataSource)

MyGrid.DataSource = MyDataSource
MyGrid.DataBind()

End Sub


"jonny" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> How can I do this with ASP controls & VB.NET
>
> On click of button run query to fill gridView.
>


 
Reply With Quote
 
 
 
 
Masudur
Guest
Posts: n/a
 
      07-30-2007
On Jul 30, 10:54 am, "Brandon Gano" <(E-Mail Removed)> wrote:
> I think you want something like this (forgive the sloppy VB; I'm a C# guy):
>
> --aspx--
> <asp:Button ID="MyButton" runat="server" Text="Fill"
> OnClick="MyButton_Click" />
> <asp:GridView ID="MyGrid" runat="server" ...>
> ...
> </asp:GridView>
>
> --aspx.vb--
> Protected Sub MyButton_Click(ByVal sender As Object, ByVal e As EventArgs)
>
> 'TODO: Create data source (MyDataSource)
>
> MyGrid.DataSource = MyDataSource
> MyGrid.DataBind()
>
> End Sub
>
> "jonny" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed) ups.com...
>
> > How can I do this with ASP controls & VB.NET

>
> > On click of button run query to fill gridView.


Hi...

don't forget to visit the asp.net data tutorials...
every thing you need to work with data is there...
http://www.asp.net/learn/data-access/

Masudur

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in running a basic code in python 3.3.0 that includes HTML file Satabdi Mukherjee Python 1 04-04-2013 07:48 PM
get data that fills a gridviewocontrol inside it (i'm extendig the gridview) Sergio E. ASP .Net Building Controls 4 08-10-2007 12:12 PM
get data that fills a gridviewocontrol inside it (i'm extendig the gridview) Sergio E. ASP .Net 4 08-10-2007 12:12 PM
get data that fills gridview inside the gridview Sergio E. ASP .Net Web Controls 0 08-08-2007 01:15 PM
Would like to load a datagrid already in edit mode instead of having the user click the edit button Frank Kurka ASP .Net Datagrid Control 8 04-29-2005 09:33 AM



Advertisments