ASP.NET datagrid is cutting off bound text column

D

Dave

I have a datagrid in my asp.net page (using VS 2003). One of the columns is bound to a text field. The length of some of these text field values is more than 255 characters but when the grid displays it cuts off the text displayed in the grid at 255 characters. How do I change this??

I am creating my connection and command objects like this in the page load event...
Dim oConn As SqlClient.SqlConnection = New SqlClient.SqlConnection
Dim cmd As SqlClient.SqlCommand

oConn.ConnectionString = "Data Source=MBSQL1\MBAPPS;Initial Catalog=MainDB;User Id=someuser;Password=somepwd"

cmd = New SqlClient.SqlCommand("SELECT ReportLoc, PreviewImgLoc, DisplayName, ReportDescr FROM vwMainDBView WHERE IsMgrReport = 0 AND GroupID = " & lGrpID & " ORDER BY DisplayName", oConn)

Dim da As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(cmd)
Dim ds As New DataSet
da.Fill(ds, "vwMainDBView")

dgGrid.DataSource = ds
dgGrid.DataMember = "vwMainDBView"

The field ReportDescr is the one that is being truncated at 255 characters. The field in the SQL Server db is a varchar(5000) field. Any help would greatly be appreciated. If there is more info you need please let me know what it is.


Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top