我正在調度程序,並在dataGridView中,我們有幾個ComboBox列在創建時由3個條目填充,但我希望能夠添加更多,因爲用戶創建它們,但我沒有想法你將如何訪問組合框數據。任何幫助表示讚賞!在dataGridView列中訪問組合框?
// this is initialized in a separate part.
/* System::Windows::Forms::DataGridView^ dataGridView;*/
System::Windows::Forms::DataGridViewComboBoxColumn^ newCol =
(gcnew System::Windows::Forms::DataGridViewComboBoxColumn());
dataGridView->Columns->AddRange(gcnew cli::array<System::Windows::Forms::DataGridViewComboBoxColumn^>(1) {newCol});
// add the choices to the boxes.
newCol->Items->AddRange("User inputted stuff", "More stuff", "Add New...");
我很困惑。它不是**用戶**,它創建條目。這是**您的應用程序**,代表用戶。我不知道,你如何實現這個功能,現在請求幫助實現相同的功能。我錯過了什麼? – IInspectable
列中有下拉組合框,當用戶選擇「添加新」時,它們會顯示一個請求新輸入的文本框。然而,當它輸入時,我不知道如何將它添加到組合框中以供將來選擇。 – Ralis
顯示如何在開始的'ComboBoxColumn'中添加項目 – Fabio