Grid with custom query

  Previous topic Next topic Print this topic Mail us feedback on this topic!

  Default  
  Web part control ID: Serves as an identifier for the web part. This ID must be unique within the context of each page template. The value of this property may only contain alphanumeric characters and the underscore character ( _ ).  
  Web part title: Title of the web part displayed on the Design tab of CMS Desk. If empty, the value of the Web part control ID property is used for this purpose.  
  Disable view state: Indicates if view state should be disabled for this web part.  
  Disable macros: If checked, macros contained in the values of the web part's properties will no longer be resolved.  
   

  Visibility  
  Visible: Indicates if the web part should be displayed.  
  Hide on subpages: Indicates if the web part should be hidden on sub-pages. If checked, the web part will not be displayed on documents that inherit the web part from a parent document.  
  Show for document types: Contains a list of document types on which the web part should be displayed. If the currently selected document uses the page template containing this web part, but its type is not specified by this property, the web part will be hidden. The document types in the list must be specified by their code names and separated by semicolons (;). If empty, the web part will be displayed on all document types.  
  Display to roles: Contains a list of roles to which the web part should be displayed. This may be used to implement documents with specific functionality for different types of users. The roles in the list must be specified by their code names and separated by semicolons (;). If empty, the web part will be displayed to all users.  
   

  Content  
  Query name: Sets the name of the predefined SQL query that should be used to retrieve the data. Queries are specified in format <class name>.<query name>.  
   

  Content filter  
  ORDER BY expression: Sets the value of the ORDER BY clause in the query used to retrieve data. For this property to be applied, the used query must have the ##ORDERBY## macro expression as the value of its ORDER BY clause.  
  Select top N: Sets the maximum amount of items to be retrieved by the specified query. For this property to be applied, the used query must contain the ##TOPN## macro expression directly after its SELECT statement.  
  WHERE condition: Sets the value of the WHERE clause in the query used to retrieve data. For this property to be applied, the used query must have the ##WHERE## macro expression as the value of its WHERE clause.  
  Selected columns: Lists the columns (separated by commas) that should be loaded by the specified query. For this property to be applied, the used query must contain the ##COLUMNS## macro expression after its SELECT statement.  
  Filter name: Sets the name of the Filter web part that should be connected.  
   

  Design  
  Displayed columns: Allows the selection and configuration of the columns that should be displayed in the grid. Please be aware that it is impossible to display columns that are not loaded by the web part (depending on the settings of the 'Selected columns' property). The selection dialog provides the option to display the values of a column as links. If you wish to use this function, your query must retrieve the NodeAliasPath and DocumentUrlPath columns (e.g. from the View_CMS_Tree_Joined view), so that an appropriate URL can be generated for the links.  
  Show header: Indicates if the grid header should be displayed.  
  Show footer: Indicates if the grid footer should be displayed.  
  Tool tip: Sets the tooltip displayed when a user hovers their mouse over the grid.  
  Skin ID: Sets the SkinID of the skin that should be applied to the web part. The skin must be defined in the Default.skin file located in the App_Themes directory under the folder of the stylesheet used by the page.  
   

  Paging  
  Enable paging: Indicates if the displayed data should be paged.  
  Page size: Determines the maximum number of records displayed per page.  
  Pager style: Allows the selection of the method used for navigation between pages. The options are Previous/Next buttons and page number links.  
   

  Sorting  
  Enable sorting: Indicates if sorting according to individual columns should be allowed in the displayed grid.  
  Default sort field: Sets the name of the field used to sort the records in the grid by default.  
  Sort ascending: Indicates if the default sorting order should be ascending.  
  Set first page after change sorting: Indicates if the first page should be displayed instead of the current page after the sorting of the grid is changed.  
   

  System settings  
  Cache item name: Sets the name of the cache key used for the content of the web part. If not specified, this name is generated automatically based on the site, document path, Web part control ID and current user. A cache key can be shared between multiple web parts with the same content on different pages in order to avoid keeping redundant data in the memory.  
  Cache minutes: Sets the number of minutes for which the content of the web part should remain cached before its latest version is reloaded from the database. If left empty, the value entered into the Site Manager -> Settings -> System -> Performance -> Cache content (minutes) setting will be used instead. If set to 0, caching will be disabled for the web part.  
  Cache dependencies: Contains a list of cache keys on which the partial cache of the web part depends. When the specified cache items change, the partial cache of the web part is deleted. Each line may only contain a single item. If the Use default cache dependencies box is checked, the default dependencies will be used, which include all possible object changes that could affect the specific web part.  
   

  No data behavior  
  Hide if no record found: Indicates if the web part should be hidden when no items to be displayed are retrieved.  
  No record found text: Text that should be displayed if no records are found. This text will not be visible if the Hide if no record found property of the web part is enabled.  
   

  Web part container  
  Web part container: Specifies the name of the container (box) to be displayed around the web part. Only the containers defined at Site Manager -> Development -> Web part containers can be selected. The selected container can be edited directly by using the Edit button.  
  Container title: Sets a title for the container. This title is displayed only if the {%ContainerTitle%} macro is used in the code of the container.  
  Container CSS class: CSS class used for the container. Applied only if the {%ContainerCSSClass%} macro is used as the value of the Class attribute in the code of the container.  
  Container custom content: Custom content to be used in the container. Applied only if the {%ContainerCustomContent%} macro is used in the code of the container.  
  Hide container on subpages: Indicates if the web part container should be hidden on sub-pages.  
   

  HTML Envelope  
  Content before: HTML content placed before the web part. Can be used to display a header or add some encapsulating code, such as <div> or <table> elements to achieve the required layout.  
  Content after: HTML content placed after the web part. Can be used to display a footer or close the tags contained in the ContentBefore value, such as </div> or </table> elements.  
   

  AJAX  
  Use update panel: Indicates if an AJAX UpdatePanel container should be used for this web part.  
   

  Time zones  
  Time zone: Specifies the type of time zone used for the content of the web part.  
  Custom time zone: May be used to assign a custom time zone specifically for the content of this web part. If selected, the time zone will be used regardless of current user or website time zone settings.  
   

  Partial caching  
  Partial cache minutes: Sets the number of minutes for which the output HTML code of the web part should remain cached. This process is similar to full-page caching, but only for the code of the web part specifically. If left empty or set to 0, partial caching will be not be used for the web part.  
  Partial cache dependencies: Contains a list of cache keys on which the partial cache of the web part depends. When the specified cache items change, the partial cache of the web part is deleted. Each line may only contain a single item. If the Use default cache dependencies box is checked, the default dependencies will be used, which include all possible object changes that could affect the specific web part.  
   

Help URL: http://devnet.kentico.com/docs/webparts/index.html?querydatagrid_properties.htm