0

I have a combox and trying to cast its SelectedItem property to DataRowView like this

    DataRowView drFromWareHouse = cmbFromWareHouse.SelectedItem as DataRowView;

but it is showing redline and when I move the Cursor on it. It shows me cmbFromWareHouse does not exist in the current context. Kindly guide me what's going wrong with it?

buddy
  • 418
  • 4
  • 10
  • 29

1 Answers1

1

The variable "cmbFromWareHouse" is out of scope. You can't access it from where you are trying to access it from

Jesse Petronio
  • 693
  • 5
  • 11