When I started programming I would scour the internet for good examples of code, You usually end up writing most yourself. I began programming <html> in 1999 and used notepad until I found out about Dreamweaver and Visual Studio and then I went crazy making sites. This article will teach the advanced and Intermediate users the great WYSIWYG of the Dreamweaver environment and the power of MX and .Net with a little homemade code to make it all come together for Complex ASP.Net Datagrid ASC/DESC sorting and paging.
Complex Sorting and Paging ASP.Net and DWMX
Step 2
Creating the Data Set:
A dataset will be all the information from the database that will be displayed in your datagrid. On the "Applications" panel click the "Bindings" tab on the top then click the "+" sign and select "DataSet (Query)" from the list of options.
The dataset box will come up in one of two views "simple" or "advanced". This is what the advanced view looks like (below). If you have a button on the right side that says "Advanced.." click it! you should see this box:
Make the following changes:
- Name: dsGrid
- Connection: select "connlocal" from the dropdown box (remember you just created this)
- Either type in the SQL string or select it from the "Database Items" Selection box
Now click "Test" you should see the result set from the Northwind database then click "OK" and "OK" again on the "Dataset" box:
Note: if you get an error close out the "Dataset" box and try creating it again (Step 2 again).
You have created the Dataset which you can see in the "Bindings" panel:
Charles Stratton
I enjoy programming and someday plan on writing a book. I have been developing Enterprise web applications since 1999.
Comments
sorting
Great tutorial !
Charles,
Finally there is someone that can present a ASP.NET tutorial which gives me the 'push' to actually get started with moving to ASP.NET.
Hope you have some more of these tutorials in 'the magic head' covering ASP.NET in DWMX.
Thanks
Thanks - VB .NET examples?
VB Version
Great article...i was able to follow it and convert it to VB .Net, if anyone wants the code for this drop me a line.
Cheers,
Stephen
You must me logged in to write a comment.