datagrid question

  • Thread starter Thread starter Steve Chatham
  • Start date Start date
S

Steve Chatham

I have a datagrid I want to display in a web application, that's being read
from a sql table.

So far, things work fine. What I'm having a problem with though is the
formatting of it. It's a list of customers. All of the columns in question
are of varchar type.

The problem is, they seem to take up the entire width of the column.

soldto, shipto and custname are being displayed. The soldto & shipto are
varchar(10), the custname is varchar(35). From best I can tell, it's taking
the whole 10, 10 and 35 characters, even though they may only be 7,6 and 20
wide.

Is there a way to trim the spaces out of the columns as I display them?

SC
 
Hello Steve,

Your SQL Statement should retrieve only few characters like

SELECT LEFT(fieldname,10) FROM Table.

this could solve your problem

Rajupeta Prasanna
 
Back
Top