Adds the specified part to the parts collection.
Class: PartsCollectionClass
Namespace: Softelvdm.Controls
Assembly: Softelvdm.SftTreeNET
public int Add( GenericPartClass Part );Public Function Add( ByVal Part As GenericPartClass ) As Integer
Defines the new part to append to the parts collection.
The zero-based index of the newly added part.
Adds the specified part to the parts collection.
string strcheck = "";
try {
strcheck = elem.Attributes["Status"].Value;
} catch {
strcheck = "";
}
if (strcheck != "")
check = (strcheck != "0") ? CheckBoxStateEnum.Checked : CheckBoxStateEnum.Unchecked;
newItem.Cells[0].Parts.Add(new CheckBoxPartClass(check));
} else if (elem.Name == "Radiobutton") {
RadioButtonStateEnum check = RadioButtonStateEnum.Unchecked;
string strcheck = "";
try {
strcheck = elem.Attributes["Status"].Value;
} catch {
strcheck = "";
End Try
If (strcheck <> "") Then
If strcheck <> "0" Then
check = CheckBoxStateEnum.Checked
Else
check = CheckBoxStateEnum.Unchecked
End If
End If
newItem.Cells(0).Parts.Add(New CheckBoxPartClass(check))
ElseIf elem.Name = "Radiobutton" Then
Dim check As RadioButtonStateEnum = RadioButtonStateEnum.Unchecked
Dim strcheck As String = ""
Try
strcheck = elem.Attributes("Status").Value
Catch
strcheck = ""See Also PartsCollectionClass Class | Classes | SftTree/NET 3.0