Hi,
i've Ultrawebtab with 5 tabs in each tab i've one ultrawebgrid...
for tab i'm using Async Mode is on and Trigger of SelectedTab....
every thing is work fine.. when i put validator in each grid static.... that time it's not working...
only first tab's grid is working... not others.... why?
if i can add validator in the Code behind that time it'll work i think so....
how to add validator through code behind to perfectly.....
Infragistics.WebUI.UltraWebGrid.
i've written this code after banding that grid.
rev1.ID =
"rfv111";
rev1.ValidationGroup =
"grid1";
rev1.ControlToValidate =
"grid";
rev1.ErrorMessage = "required";
rev1.ValidationExpression =
"[0-9]+$";
item.Value =
vc.Add(item.ToString());
grid.DisplayLayout.Bands[0].Columns.FromKey(
"CA_NewAdditions_YA_Purchase").Validators.Add(item);
but no success please let me know.. how to add validator collections through code behind!
thanks in advance..
ateeqpasha
Ok, I see. The way you were doing it initially should be fine.
Although there is no need to create a new ValidatorItemsCollection. And then after you create a new validator you must add it to the form next to the grid:
grid.Parent.Controls.Add(rev1);
thanks but i not able to the fix this problem....
when i defining uniqueid or clientid to required field validator that time it's showing error!
Unable to find control id 'ctl00_ContentPlaceHolder1_UltraWebTab12__ctl1_UWG' referenced by the 'ControlToValidate' property of 'RFV_Money_Pre
so please let me know with a example one....
thanks in advance
.