<
Now we want to add a filter to our page to demonstrate a new feature to NetTiers:
Next, change the data source control to add a parameter for the whereClause parameter of the GetPaged method:
The SqlParameter allows you to define external filter controls that will be combined to generate the filter expression.
Update (11-Aug-2006): a new property has been added to the SqlParameter object to provide support for the New Query Builder Classes.
Now we can add the magic! Make sure you have a reference to the Atlas Script Manager:
We want to wrap the GridView control with an UpdatePanel:
Notice that the trigger is tied to the CountryList control so that the GridView is updated every time the selected country is changed.
bdiaz wrote:There you have it, a quick example of how you can use Atlas, or any Ajax library, along with the .netTiers generated classes to deliver a responsive user interface.Please see the attached file for the complete code presented in this example. Note that there is no code-behind page needed!Enjoy.
wrong attached file? I saw a two line text file.
EDIT:
Please ignore me, it is Friday here in "sunny" Scotland and I must have been half asleep when i posted this.
DOUGH!!!
DavidOrigional Post:
"Please excuse me if the answer to my question is obvious, but i have recently started working with NetTiers and Atlas for my DAL and AJAX functionality instead of writing my own.
My question is on your example, as below, you are using "<data:". Where does this come from? Is it your own custom object or am i completely misunderstanding your example?
Thanks in advance, David
<data:CustomersDataSource ID="CustomersDataSource1" runat="server" SelectMethod="GetPaged" EnablePaging="true" EnableSorting="true"/>"
I am using the 8/8/2006 release and I cannot not get your sample to fly.
On page load I get a:
Unable to cast object of type 'Northwind.Data.SqlFilterParameterCollection' to type 'System.String'.
Source Error:
Line 1192: Line 1193: // known parameters Line 1194: WhereClause = (String) values["WhereClause"]; Line 1195: Line 1196: if ( values["OrderBy"] != null )
I tried it first with my progrject, then did a new Norwthwind to check.
I did not get a prior release to see if that solved it.
thanks,
jamesm