I got this to work with the following function:
function ValidateLocator()
{
if(/\d{1}[A-z]|[A-z]{1}\d/.test(frmGeneral.txtLocator.value))
{
frmGeneral.submit();
}else{
alert("You entered an invalid Locator");
document.frmGeneral.txtLocator.focus();
return(false);
}
}...
I have a page with one validation in place (must be only numbers), but I would like to add another validation. The second textbox, txtLocator, must have at least 1 number and at least 1 letter to be validated. So, it could be
1M, 1M13, 5RRR34, etc etc...5 would fail, 555 would fail, MMM would...
I loose my selected item now when I do the sort, but that is perfectly fine with me. It is working good enough for the user that needs it, thanks guys!
That's why I thought I'd have my little workaround, but it doesn't work. Sub dgrdDetailsTargets_ItemCommand(ByVal s As Object, ByVal e As DataGridCommandEventArgs)
Dim intRecordID As Integer
If dgrdStates.DataKeys(e.Item.ItemIndex) = -1 Then
intRecordID =...
I'm pretty sure when I fire the sort column command, it fires the item command as thats where it errors out at, which sucks. I've tried workarounds but don't really know of any off hand.
I'm not sure how to check the control lifecycle to see if it fires twice or once. As far as I know, it shouldn't be firing when I click the sort column, but it is firing off. It should only fire when I select an item in my collection to display more data, but it appears it is firing off when I...
I don't know how to do that, add breakpoints. I think it is failing because I have two functions thinking e is something. It appears to be two different things. The sort column, and the item index selected...so, it will be an integer, and a string.
Any ideas on how I can do this debugger...
The error happens when I select the column name to sort. I can select the line and the data displays correctly, it breaks when I try to sort the column.
How do I go about attaching a debugger?
I have a datagrid which displays data which a user can select an item to display more data based upon selection. I try to add sorting, but come up with an error. Here is my code and below that is my error:
Sub BindStatesGrid(ByVal strSortField)
Dim cmdSelect As SqlCommand...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.