This is my table structure 2 column rate chart and qty :
rate chart qty
1 -5 1
6 -10 2
11 -20 3
I have 3 fields on windows form
- 1 combobox
- 1 textbox
- 1 button
I fetch the ratechart column value through combobox, I have that code but my requirement is if user select 1-5 from combobox, then textbox he cannot enter more than 6 in textbox.
Same if user select 6-10 from combobox , then he cannot enter more than 12 in textbox
while he click on save button he get an error that qty is more..
thx in advance. please help me for this code
Assuming
cmbRateChart.SelectedValuecontains qty value with respect to RangeChart.Usage: Call this function to check the validation.
Reference: Validation in Windows Forms