BrowserDeviceType property: Request class
Description
Use this property to return the device's type as a string value:
| String Value | Description |
|---|---|
|
pc |
Desktop or laptop computer |
|
phone |
Phone |
|
tablet |
Tablet |
This property is read-only.
Important:
Use this property within fluid applications only.
Example
Local Grid &LGrid = GetGrid(Page.QE_NUI_GRIDLAYOUT, "PCODEGRID");
Local string &Devicetype;
&Devicetype = %Request.BrowserDeviceType;
Evaluate &Devicetype
When "pc"
If %Request.BrowserTypeClass = "chrome" Then
&LGrid.Layout = %DataGrid;
Else
&LGrid.Layout = %DivGrid;
End-If;
When "phone"
&LGrid.Layout = %OriginalFlexGrid;
When "tablet"
&LGrid.Layout = %ListGrid;
End-Evaluate;