ISPrincess
Programmer
I am having a major issue getting a working CompareValidator into Datagrid.
Here is some background
Say i have a grid with 3 columns.
Column1 = ItemNo
Column2 = TotalNumber
Column3 = AvailableNumber
The only editable (textbox) column is AvailableNumber.
I have a working RequiredFieldValidator against that field, but need a CompareValidator to compare AvailableNumber to TotalNumber to be sure that AvailableNumber is <= TotalNumber.
I have tried everything, but since the TotalNumber column is not editable and therefore is either an itemtemplate or databound column, I do not know what control or value to compare against. I have even tried placing the TotalNumber value into a sessionvariable on EditRow, but still the compare does not work.
If I cannot get a compare to work, then on the UpdateRow process, is there a way that I can just popup a javascript to tell the user "Available Number cannot be greater than Total"? I just dont know how to write the javascript inside the following if statement:
If iAvailableNumber > Session("TotalNumber") Then
javascript alert popup here
end if
PH
I was walking home one night and a guy hammering on a roof called me a paranoid little weirdo.
In morse code.
-Emo Phillips
Here is some background
Say i have a grid with 3 columns.
Column1 = ItemNo
Column2 = TotalNumber
Column3 = AvailableNumber
The only editable (textbox) column is AvailableNumber.
I have a working RequiredFieldValidator against that field, but need a CompareValidator to compare AvailableNumber to TotalNumber to be sure that AvailableNumber is <= TotalNumber.
I have tried everything, but since the TotalNumber column is not editable and therefore is either an itemtemplate or databound column, I do not know what control or value to compare against. I have even tried placing the TotalNumber value into a sessionvariable on EditRow, but still the compare does not work.
If I cannot get a compare to work, then on the UpdateRow process, is there a way that I can just popup a javascript to tell the user "Available Number cannot be greater than Total"? I just dont know how to write the javascript inside the following if statement:
If iAvailableNumber > Session("TotalNumber") Then
javascript alert popup here
end if
PH
I was walking home one night and a guy hammering on a roof called me a paranoid little weirdo.
In morse code.
-Emo Phillips