asp.net
So I have a Grid that users enter data in (no surpise there) and then they hit a submit button to submit the changes to the database.
In the ItemDataBound event I determine if the field is a text box, then determine if I should set it multi or single line (if it is under a certain number of characters, it will stay singline.)
I do not know if you can set the mode like this on the fly without rebinding the grid...
Also the reason I do not set the MultiLine always to true on textboxes is because of the scrollbar that shows up in the multiline text box. It is very distracting to see a bunch of little arrows in all my text box fields and would like them visible only when necessary. Unless there is a way to get ride of them.
So I have a Grid that users enter data in (no surpise there) and then they hit a submit button to submit the changes to the database.
In the ItemDataBound event I determine if the field is a text box, then determine if I should set it multi or single line (if it is under a certain number of characters, it will stay singline.)
Dim txt As TextBox = CType(e.Item.FindControl("txtValue"), TextBox)
txt.TextMode = TextBoxMode.MultiLine
I am trying to figure out how to do this same logic on the client side in javascript.
function processValueChange(sender, rowID) {
var myTextValue = row.findElement("Value");
myTextValue = Multiline;
}
I do not know if you can set the mode like this on the fly without rebinding the grid...
Also the reason I do not set the MultiLine always to true on textboxes is because of the scrollbar that shows up in the multiline text box. It is very distracting to see a bunch of little arrows in all my text box fields and would like them visible only when necessary. Unless there is a way to get ride of them.