Note that there are some explanatory texts on larger screens.

plurals
  1. POImplementing Drill-Thru Gridview Functionality 100 Different Times With 1 Page
    primarykey
    data
    text
    <p><strong>The requirement:</strong> There are 100 objects that each have a gridview on a webpage. Each object has one element that is an aggregate of another object (i.e. Order has many Items; i.e. Customer has many Orders). The user needs to be able to click on the "Items" cell in the "Order" gridview and have a pop up of a gridview that lists all the "Items". </p> <p><strong>The Problem:</strong> This is easy to do statically for 1 gridview: send the filter values needed to a prebuilt "Items" gridview on a prebuilt "Items" page and then populate. This is what all the existing examples online show. But how would you build this system for <strong>100</strong> gridviews using <strong>1</strong> page? </p> <p><strong>The purposed solution:</strong></p> <p>Each object's gridview has a column that is a hyperlinkfield which belongs to the aggregate object (i.e. "Orders" gridview has a hyperlinkfield called "Items"). On the "DataNavigateUrlFormatString" value of this hyperlinkfield there is the URL address to a single generic page that houses a generic gridview. The "DataNavigateUrlFormatString" value also contains a list of query string parameters. These parameters use a standard naming convention that the receiving generic page can parse. These parameters contain the object's name, along with a list of those object element names and paired values which are required for the query. </p> <p>For instance if the user was looking at Orders and clicked the "Items" gridview cell, the hyperlink would then open a pop up with this URL:</p> <pre><code>"~GenericPage.aspx?ObjectName=Items&amp;paramName1=OrderID&amp;paramName2=IsActive&amp;paramValue1=135&amp;paramValue2=true" </code></pre> <p>This would then get parsed in the GenericPage.aspx Page_Load event by looking for the objectName, and the existance of any number of any "paramName" and "paramValue" parameters. The page would then use these values to construct a query against the BLL for all "Items" that have an OrderID of 135 and IsActive value equal to true. The results would then get bound to the gridview.</p> <p><strong>The Better Design?</strong></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload