Question Locked

ASP.NET Gridview EditMode max size

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a gridview with edit mode enabled. How do I limit the number of characters a user can enter?

2 replies

by namorales

I'll never had worked with gridview; but follow the principles, when the server send the page this is interpreted like a table and boundfield in this case like a textareas; because are multiline and have the problem with max limit.

Then in your object (cell) to edit add the follow code:

"javascript:return imposeMaxLength(this, ##);"

where ## are limit in characters, and in the head area the follows lines

so it limit a caracters entered by user.

enjoy it.

This discussion is closed to new replies.