Search these areas:
Help
Support Forums
Product Info



-Introduction
-DataWeb: What's New
-Creating an Application
-The DataWeb Designer
-Application Management
-Data Tables
-Data Tables
-Views
-Templates
-Components
-Data Analysis
-Members
-Security
-Importing
-Exporting
-FTP
-JavaScript
-Object Model
-Full-Text Search
-Domain and Email Hosting
-HotBlock Modules
-Account Management
-Glossary
-New Responsive UI Module





DataWeb Help
Support Forums
Tutorial
Script Library
Knowledge Base

Home > Support

KnowledgeBase


How To: Use script to determine the current mode of a dataregion
Article TypeHow To
TitleUse script to determine the current mode of a dataregion
<i>How can I determine the current displaymode (grid,details,etc) of a data region?</i><br />
<br />
Set the displaymode of an <a href="http://support.dataweb.com/default.view?Topic=views/xml/vxmlhtmlblock">ws:htmlblock</a>:<br />
<br />
Script inside of an ws:htmlblock is only executed when that ws:htmlblock is rendered. If you'd like to execute script only when your dataregion is in details mode, for example, enclose that script in an ws:htmlblock that displays only in details mode.<br />
<br />
The following view-code declares the variable "mode" and assigns to it a value according to its parent-dataregion's mode.<br />
<br />
<span class="smallCode"><pre>
&lt;!--#var mode="details";-->
&lt;ws:dataregion...>
&lt;ws:htmlblock displaymodes="grid">
&lt;!--#mode="grid";-->
&lt;/ws:htmlblock>
&lt;ws:htmlblock displaymodes="update">
&lt;!--#mode="update";-->
&lt;/ws:htmlblock>
&lt;ws:htmlblock displaymodes="insert">
&lt;!--#mode="insert";-->
&lt;/ws:htmlblock>
&lt;/ws:dataregion></pre></span>
Last ReviewedFebruary 20, 2015 14:07:43

  
Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
DataWeb, 720 North 10th Street, A #145, Renton, Washington 98057 *425-583-5970* Fax 484-770-4706* Email Us