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






Specifies whether or not the child table can be expanded.

Syntax

Visual Basic (Declaration) 
<DescriptionAttribute("Gets or sets a value indicating whether or not the child row is expandable. When set to True, the expand/plus icon will not be shown.")>
<DefaultValueAttribute()>
<NotifyParentPropertyAttribute(True)>
Public Property ChildNotExpandable As Boolean
Visual Basic (Usage)Copy Code
Dim instance As WebGridRow
Dim value As Boolean
 
instance.ChildNotExpandable = value
 
value = instance.ChildNotExpandable
C# 
[DescriptionAttribute("Gets or sets a value indicating whether or not the child row is expandable. When set to True, the expand/plus icon will not be shown.")]
[DefaultValueAttribute()]
[NotifyParentPropertyAttribute(true)]
public bool ChildNotExpandable {get; set;}
Delphi 
public read-write property ChildNotExpandable: Boolean; 
JScript 
DescriptionAttribute("Gets or sets a value indicating whether or not the child row is expandable. When set to True, the expand/plus icon will not be shown.")
DefaultValueAttribute()
NotifyParentPropertyAttribute()
public function get,set ChildNotExpandable : boolean
Managed Extensions for C++ 
[DescriptionAttribute("Gets or sets a value indicating whether or not the child row is expandable. When set to True, the expand/plus icon will not be shown.")]
[DefaultValueAttribute()]
[NotifyParentPropertyAttribute(true)]
public: __property bool get_ChildNotExpandable();
public: __property void set_ChildNotExpandable( 
   bool value
);
C++/CLI 
[DescriptionAttribute("Gets or sets a value indicating whether or not the child row is expandable. When set to True, the expand/plus icon will not be shown.")]
[DefaultValueAttribute()]
[NotifyParentPropertyAttribute(true)]
public:
property bool ChildNotExpandable {
   bool get();
   void set (    bool value);
}

Example

The following example shows you how to create the child table not expendable on rows if their cell contains UK.
C#Copy Code
private void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e)
{
   if (e.Row.Table.DataMember == "Customers") 
   {
      if (e.Row.Type == ISNet.WebUI.WebGrid.RowType.Record) 
      {
        // if country is UK, then assume there are no child in it
        if (e.Row.Cells.GetNamedItem("Country").Text == "UK")
        e.Row.ChildNotExpandable = true;
      }
   }
}

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

WebGridRow Class
WebGridRow Members

Tasks

How-to: Remove (+) sign for rows that contain no child row

©2012 Intersoft Solutions Corp. All Rights Reserved.