08.01.2015 Views

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 12 ■ <strong>AJAX</strong> EXTENSIONS FOR <strong>ASP</strong>.<strong>NET</strong> 297<br />

Now that you have your data connection, it’s pretty easy to tie a DataGrid up to it to<br />

view the results of the query.<br />

Drag <strong>and</strong> drop a GridView control onto the page, <strong>and</strong> open its Tasks pane (see<br />

Figure 12-15 for details).<br />

Figure 12-15. Adding a GridView to your application<br />

Select SqlDataSource1 from the Choose Data Source drop-down, <strong>and</strong> you’ll see the<br />

grid reconfigure itself to the fields that the data source exposes. Enable paging, sorting,<br />

<strong>and</strong> selection by selecting their check boxes in the Tasks pane, as shown in Figure 12-16.<br />

Figure 12-16. Binding the grid to the data source

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!