|
-
Feb 10th, 2003, 11:42 AM
#1
Thread Starter
Lively Member
Datagrid how to show Selected columns
This is driving me nuts. I need to have a dataset binded to a datagrid. The data grid must not show all columns in the dataset but only a few. I will be adding records to the dataset in code and these should show in the datagrid, any kind of editing or adding is not allowed in the datagrid.
I tried using also dataviews, basically it would have been nice to have a dataview with a select statement on the dataset, thus selecting only the fields required, but it seems that this is not possible.
Any ideas are much appreciated.
Thanks
-
Feb 25th, 2003, 01:56 AM
#2
Sleep mode
simply do this to have dataset binded to datagrid :
after initialization of connection and filling data do this :
VB Code:
DataSet1.DataSource = dataset.Tables("your table")
-
Feb 25th, 2003, 01:59 AM
#3
Thread Starter
Lively Member
Resolved
Thanks for the reply. Actually my problem was not to display a datagrid but to limit the number of columns. I did encounter the solution in various forums and issue was resolved.
-
Feb 25th, 2003, 02:00 AM
#4
-
Feb 25th, 2003, 06:36 AM
#5
Hyperactive Member
was that to set the column width to 0?, assuming you create a datagridstyle.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|