Can't give you the code as you want learn but I can suggest you steps to implement rest is your ability to code:
When submit is clicked get the textbox.text and pass it to dataaccess layer.This is done in .aspx.cs if you are using web.If windows Form.cs
in the data access layer.In the data access layer use SQL command,Connection,Reader objects to fetch data if you want to use connected architecture.Else use SQL command,DataAdapater,Dataset.
Return the dataset to your form.cs or aspx.cs. and assign the datatset.defaultview to the datasource of the grid and call the grid.bind() (in ASP.NET only ).
This displays the data on you page/form
here are the URLS
http://www.dotnetperls.com/datagridview-tutorial[
--WinForms]
http://msdn.microsoft.com/en-us/library/aa479341.aspx[
--WebForms]
Happy learning :)
Happy ugadi to you too