Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private: System::Void dataGridView1_CellStateChanged(System::Object^ sender, System::Windows::Forms::DataGridViewCellStateChangedEventArgs^ e) {
- if (!isRefreshed)
- {
- for (int i = 0; i < dataGridView1->Rows->Count - 1; i++)
- {
- if (dataGridView1->Rows[i]->Cells["amount"]->Value != nullptr &&
- Int32::Parse(dataGridView1->Rows[i]->Cells["amount"]->Value->ToString()) < 0)
- {
- dataGridView1->Rows[i]->Cells["amount"]->Value = "0";
- dataGridView1->Rows[i]->Cells["availability"]->Value = false;
- }
- else if (dataGridView1->Rows[i]->Cells["amount"]->Value != nullptr &&
- Int32::Parse(dataGridView1->Rows[i]->Cells["amount"]->Value->ToString()) == 0)
- {
- dataGridView1->Rows[i]->Cells["availability"]->Value = false;
- }
- else if (dataGridView1->Rows[i]->Cells["amount"]->Value != nullptr &&
- Int32::Parse(dataGridView1->Rows[i]->Cells["amount"]->Value->ToString()) > 0)
- {
- dataGridView1->Rows[i]->Cells["availability"]->Value = true;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement