Q: DataGrid data format

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
In my DataGrid, I used DataFormatString="{0:d}" for a float type field, it
gave me error.
How can I force user type a float number in a cell? I also need to force
user to type only one character in another cell, is it possible?
Thanks,
Jim.
 
Assuming you mean ASP.NET datagrid, keep in mind that web applications
typically don't work identically to windows applications. Usually the user
enters their data and validation is performed all at once when some sort of
submit button is clicked. Yeah, not as nice a UI as windows, but it can be
quite a challenge to achieve the same kind of UI on a web page.

If you really want that, you will probably need to create some validator
objects in your EditItemTemplate, or write some client-side javascript of
your own.
 
Thanks for the reply,
How should I set validator for a cell in the datagrid, can you give me an
example?
Thanks,
Jim.
 
Back
Top