Intersoft WebGrid Documentation
PrimaryKeys Property
See Also  Example Send Feedback
ISNet.WebUI.WebGrid Namespace > IHierarchicalObject Interface : PrimaryKeys Property






Gets a value indicating whether a property is the primary key.

Syntax

Visual Basic (Declaration) 
<NonRetrievableAttribute()>
ReadOnly Property PrimaryKeys As String()
Visual Basic (Usage)Copy Code
Dim instance As IHierarchicalObject
Dim value() As String
 
value = instance.PrimaryKeys
C# 
[NonRetrievableAttribute()]
string[] PrimaryKeys {get;}
Delphi 
read-only property PrimaryKeys: array of String; 
JScript 
NonRetrievableAttribute()
function get PrimaryKeys : String[]
Managed Extensions for C++ 
[NonRetrievableAttribute()]
__property string*[]* get_PrimaryKeys();
C++/CLI 
[NonRetrievableAttribute()]
property array<String^>^ PrimaryKeys {
   array<String^>^ get();
}

Example

C#Copy Code
[PrimaryKey()]
public string CustomerID
{
    get { return _customerID; }
    set { _customerID = value; }
}

Remarks

In every objects patterned according to best practices, there should be a member which acts as PrimaryKey. In object, however the PrimaryKey member can not be obtained automatically because there is no standard way to obtain it in such generic objects. In V4.0, developers can easily mark a member as PrimaryKey by putting the PrimaryKey in the Member's attribute.

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

©2012 Intersoft Solutions Corp. All Rights Reserved.