本文整理汇总了C#中System.Windows.Forms.DataGridView.FindForm方法的典型用法代码示例。如果您正苦于以下问题:C# DataGridView.FindForm方法的具体用法?C# DataGridView.FindForm怎么用?C# DataGridView.FindForm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.DataGridView
的用法示例。
在下文中一共展示了DataGridView.FindForm方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DataGridViewPresentation
public DataGridViewPresentation(
DataGridView dataGridView,
ToolStripMenuItem exportToExcel,
ToolStripMenuItem exportToWord,
ToolStripMenuItem retriveAll,
ToolStripMenuItem refresh,
ToolStripMenuItem help,
ToolStripMenuItem options,
ToolStripMenuItem navigations,
ExchangeInfo exchangeInfo)
{
mDataGridViewIT = dataGridView;
if (mDataGridViewIT != null)
{
mDataGridViewIT.SelectionChanged += new EventHandler(HandleDataGridITCurrentCellChanged);
mDataGridViewIT.Scroll += new ScrollEventHandler(HandleDataGridViewITScroll);
mDataGridViewIT.DataError += new DataGridViewDataErrorEventHandler(HandleDataDridViewITDataError);
mDataGridViewIT.KeyDown += new KeyEventHandler(HandleDataGridViewITKeyDown);
mDataGridViewIT.DoubleClick += new EventHandler(HandleDataGridViewITDoubleClick);
mDataGridViewIT.EditingControlShowing += new DataGridViewEditingControlShowingEventHandler(HandleDataGridViewITEditingControlShowing);
mDataGridViewIT.CellBeginEdit += new DataGridViewCellCancelEventHandler(HandleDataGridViewITCellBeginEdit);
mDataGridViewIT.CellEndEdit += new DataGridViewCellEventHandler(HandleDataGridViewITCellEndEdit);
if (exportToExcel!= null)
{
exportToExcel.Text = CultureManager.TranslateString(LanguageConstantKeys.L_POP_UP_MENU_EXPORT_TO_EXCEL, LanguageConstantValues.L_POP_UP_MENU_EXPORT_TO_EXCEL);
exportToExcel.Click +=new EventHandler(HandleExportToExcel);
}
if (exportToWord != null)
{
exportToWord.Text = CultureManager.TranslateString(LanguageConstantKeys.L_POP_UP_MENU_EXPORT_TO_WORD, LanguageConstantValues.L_POP_UP_MENU_EXPORT_TO_WORD);
exportToWord.Click += new EventHandler(HandleExportToWord);
}
//If the argumet allow multiselection, the grid is configure in multiselection mode,
//otherwise the grid is configure in simple selection mode.
ExchangeInfoSelectionForward exchangeInfoSelection = exchangeInfo as ExchangeInfoSelectionForward;
if (exchangeInfoSelection != null)
{
mDataGridViewIT.MultiSelect = exchangeInfoSelection.MultiSelectionAllowed;
}
if (retriveAll != null)
{
retriveAll.Text = CultureManager.TranslateString(LanguageConstantKeys.L_POP_UP_MENU_RETRIEVE_ALL, LanguageConstantValues.L_POP_UP_MENU_RETRIEVE_ALL);
retriveAll.Click += new EventHandler(HandleRetrieveAllClick);
}
if (refresh != null)
{
refresh.Text = CultureManager.TranslateString(LanguageConstantKeys.L_POP_UP_MENU_REFRESH, LanguageConstantValues.L_POP_UP_MENU_REFRESH);
refresh.Click += new EventHandler(HandleRefreshClick);
}
if (help != null)
{
help.Text = CultureManager.TranslateString(LanguageConstantKeys.L_POP_UP_MENU_HELP, LanguageConstantValues.L_POP_UP_MENU_HELP);
}
if (options != null)
{
options.Text = CultureManager.TranslateString(LanguageConstantKeys.L_POP_UP_MENU_OPTIONS, LanguageConstantValues.L_POP_UP_MENU_OPTIONS);
}
if (navigations != null)
{
navigations.Text = CultureManager.TranslateString(LanguageConstantKeys.L_POP_UP_MENU_NAVIGATIONS, LanguageConstantValues.L_POP_UP_MENU_NAVIGATIONS);
}
Form lContainerForm = mDataGridViewIT.FindForm();
if (lContainerForm != null)
{
lContainerForm.Shown += new EventHandler(HandleContainerForm_Shown);
}
else
{
mRaiseEventCurrentCellChanged = true;
}
}
// Assigns the default texts for boolean values
AssignDefaultTextForBooleans();
}