You could do it in the SQL / Stored proc, truncating the field (so that the data isn't needlessly transferred), or you could do it in your databinding expression:
<%# MaxLength(30,DataBinder.Eval(Container.DataItem, "Alias")) %> Where MaxLength is some function to trim the length of a string to 30 if it is greater. Kirk -----Original Message----- From: Tom Archer [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 15 May 2002 10:15 a.m. To: [EMAIL PROTECTED] Subject: [DOTNET] DataGrid limitation? I have a Web form with a datagrid that is bound to a column in a database with extremely wide values. Is there any way in this scenario to limit the text retrieved for that database column? For example, I'd like to state that I want the grid to truncate any value greater than 30 characters. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.
