help needed about datagrid

aniskhan

Well-known member
Joined
Oct 24, 2005
Messages
90
Location
D.I.Khan
Programming Experience
1-3
i have a table

VB.NET:
ID	FNAME	LNAME	ADDRESS in database

i take a datagrid
VB.NET:
MADE..
datasource=dataset11
displaymember=dataset11.table
[/CODE]

but the datagrid displays the columns in different format

i-e FNAME LNAME ID

why does it do this , how to correct ,how is the column indexed as it does it automatically here..
 
It happens because you used databinding.

Easy solution is to change your SQL query to something like "SELECT FNAME as [First Name], LNAME as [Last Name]..."

It can potentially get ugly with joins.
 
re:

thx

i have sorted out the small problem

when i configured the adapter the sequence of fieldds in the query was different then desired.

I generated a dataset and this created the problem.

SOLUTION:
Delete dataset.
corrected query in adapter.
then generated dataset
 
Back
Top