Intersoft WebGrid Documentation
AllowSorting Property
See Also  Example Send Feedback
ISNet.WebUI.WebGrid Namespace > LayoutSet Class : AllowSorting Property






Specifies whether or not to allow users sort columns from within WebGrid.

Syntax

Visual Basic (Declaration) 
<DefaultValueAttribute()>
<DescriptionAttribute("Specifies whether or not to allow users sort columns from within WebGrid.")>
<ISNet.Serialization.BinarySerializableAttribute()>
<ISNet.Serialization.XmlSerializableAttribute()>
<NotifyParentPropertyAttribute(True)>
Public Property AllowSorting As Sorting
Visual Basic (Usage)Copy Code
Dim instance As LayoutSet
Dim value As Sorting
 
instance.AllowSorting = value
 
value = instance.AllowSorting
C# 
[DefaultValueAttribute()]
[DescriptionAttribute("Specifies whether or not to allow users sort columns from within WebGrid.")]
[ISNet.Serialization.BinarySerializableAttribute()]
[ISNet.Serialization.XmlSerializableAttribute()]
[NotifyParentPropertyAttribute(true)]
public Sorting AllowSorting {get; set;}
Delphi 
public read-write property AllowSorting: Sorting; 
JScript 
DefaultValueAttribute()
DescriptionAttribute("Specifies whether or not to allow users sort columns from within WebGrid.")
ISNet.Serialization.BinarySerializableAttribute()
ISNet.Serialization.XmlSerializableAttribute()
NotifyParentPropertyAttribute()
public function get,set AllowSorting : Sorting
Managed Extensions for C++ 
[DefaultValueAttribute()]
[DescriptionAttribute("Specifies whether or not to allow users sort columns from within WebGrid.")]
[ISNet.Serialization.BinarySerializableAttribute()]
[ISNet.Serialization.XmlSerializableAttribute()]
[NotifyParentPropertyAttribute(true)]
public: __property Sorting get_AllowSorting();
public: __property void set_AllowSorting( 
   Sorting value
);
C++/CLI 
[DefaultValueAttribute()]
[DescriptionAttribute("Specifies whether or not to allow users sort columns from within WebGrid.")]
[ISNet.Serialization.BinarySerializableAttribute()]
[ISNet.Serialization.XmlSerializableAttribute()]
[NotifyParentPropertyAttribute(true)]
public:
property Sorting AllowSorting {
   Sorting get();
   void set (    Sorting value);
}

Example

The sample code below shows you how to set the AllowSorting property programmatically.
C#Copy Code
private void WebGrid1_InitializeLayout(object sender, ISNet.WebUI.WebGrid.LayoutEventArgs e)
{
        e.Layout.AllowSorting = ISNet.WebUI.WebGrid.Sorting.Yes;
}

Remarks

Data can be sorted based on a column by clicking on the column header. The sort order of subsequent click is, Ascending, Descending and then back to None. Users can also sort multiple columns by pressing SHIFT key when click on column header. Alternatively, user can also do the sort selectively by right clicking on the column header and select on either Sort Ascending or Sort Descending.

Please note that when WebGrid is operating in Unbound mode, all data-bound features including Sorting should not be enabled.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

Reference

LayoutSet Class
LayoutSet Members

Tasks

How-to: Perform sorting data and apply multiple sorting in WebGrid

Concepts

Advanced User Interactions

Other Resources

Automatic Data Processing

©2012 Intersoft Solutions Corp. All Rights Reserved.