PopupCell CreateCustomTypePopupCell()
{
PopupCell popupCell1 = new PopupCell();
// Pop up student edit form when click button.
popupCell1.Popup = new StudentEditForm();
// Use student edit form's Student property's value as cell's value.
popupCell1.PopupValueMember = "Student";
popupCell1.TextBoxReadOnly = true;
popupCell1.Size = new Size(150, 21);
return popupCell1;
}
Private Function CreateCustomTypePopupCell() As PopupCell
Dim popupCell1 As New PopupCell()
' Pop up student edit form when click button.
popupCell1.Popup = New StudentEditForm()
' Use student edit form's Student property's value as cell's value.
popupCell1.PopupValueMember = "Student"
popupCell1.TextBoxReadOnly = True
popupCell1.Size = New Size(150, 21)
Return popupCell1
End Function