how to validate the ultrawebgrid cells not to accept special characters like (@#$%^&*:;><?..)
You could use a RegularExpressionValidator. There are instructions for assigning a validator to a cell at:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/WebGrid_Validating_Cells.html
There are instructions for forming regular expressions at:
http://regexlib.com/
"[^@#$%^&*:;><?]+" (without the quotes) will exclude these: @#$%^&*:;><?..
"[0-9a-zA-Z]+" (without the quotes) will exclude everything except digits and alpha characters, including spaces.
thanka a lot .....
I need to check the ultragridvalue cells using script how can i get the cell ID from ultragrid , I can get cell by its Id when it is binded using sqldatasource but i want to bind them using coding at that time am not able to get its ID by defining as cell =igtbl_getCellById(cellid)
that to i am searching an expression to accept alphabets alone ,alphanumeric(both starting with alphabets followed by digit and digits followed by a alphabets ) but not to accept digits alone i used many exp bu if any thing restricts digits means it also restricts alphanumeric starts with digits pls give me a solution....
once again Thanks .....
Hello Priya,
It really depends on where you want your validation to play. If you want the grid to not show certain data in read-only (default) mode, then you will need to filter the datasource first yourself (using SQL for example) and just then bind the grid.
If you are using defualt cell editors you can check out this:
http://forums.infragistics.com/forums/p/772/12836.aspx#12836
If you are using RowEditTemplate, you can check out the following forum thread
http://forums.infragistics.com/forums/p/10042/39078.aspx#39078
Finally, I also recommend the following great article on how to implement UltraWebGrid in production (full blown) - part of this deals exactly with validation and getCellById methods:
http://dotnetslackers.com/articles/aspnet/QuickGuideToImplementingTheNetAdvantageUltraWebGrid.aspx
hi ..
thank you for ur reply ..
now i find cellID but i cant find the regex for what i need...
Thanks in advance...
Well, regular expressions is a tricky topic and I really am not sure if I can help a lot here, but I guess you can always use Google to formulate your expression.
I can also suggest one great too, Regulator, that helps you build regular expressions for you - you may find this useful.
http://tools.osherove.com/Default.aspx?tabid=185
thanks one more question i had two columns one is primarykey field so i set that column Allow Update = no so it is in non editable mode now that primary key field is not identity field or autogenerated so i have to give value to that while Adding a new row but i cant give value for that column pls give me a solution....
Thanks a lot for replying...
Hey rathinapriya... I am having the same problem, and somenoe mentioned to try this:
http://community.infragistics.com/forums/p/25143/92225.aspx#92225
hope that helps...