I'm using an UltraGrid to display and edit data from different db tables depending on what the user selects (i.e. - show data from table1 or show data for table2). Is there a way to have the grid automatically determine the max characters that users can enter?
Thanks
Rose Anna Smith
Hi Rose,
Do you mean for a fixed-length string field or something like that? I don't think the BindingManager exposes that information, so there's no way the grid can get it.
You can set the MaxLength property on the grid column, though.
Mike,
I think you are right. I've spend most of the day looking for that answer so I can set the maxlength for the grid column. The reason this came up was because the user entered a string that was greater than the maxlength and received an error. The data in the grid wasn't updated. I'm looking at a way to get the column max length using the code in the following link.
http://www.codeproject.com/KB/cs/LinqColumnAttributeTricks.aspx
Rose Anna