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
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