473,405 Members | 2,300 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Displaying selected columns in a DdataGrid

I have a datagrid on my windows form. At design time, I set the DataSource
and DataMember. Then I added a TableStyle and set its MappingName to the
same value as the DataMember. Finally, I created GridColumnStyle for each 3
columns that I wanted to display. But When I run this application I get the 5
origial column display in the datagrid. What did I miss to didn't do?

Thanks
Nov 21 '05 #1
4 923
Hi,

Post some code.

Ken
---------------
"Reza G." <Reza G.@discussions.microsoft.com> wrote in message
news:AC**********************************@microsof t.com...
I have a datagrid on my windows form. At design time, I set the DataSource
and DataMember. Then I added a TableStyle and set its MappingName to the
same value as the DataMember. Finally, I created GridColumnStyle for each 3
columns that I wanted to display. But When I run this application I get the
5
origial column display in the datagrid. What did I miss to didn't do?

Thanks
Nov 21 '05 #2
Reza,

Mostly is in this case the "datamember" not set from the tablestyle

I hope this helps?

Cor
Nov 21 '05 #3
Ken,

I have used the DataGrid's TablesStyles to create one TableStyles and used
GridColumnStyles to create the columns I want to display. When set the
MappingName of the GridColumnStyles, All the fields in table are shown in
the MappingName property of DataGridColumnStyles field.

For this part I have tried to avoid any coding.

"Ken Tucker [MVP]" wrote:
Hi,

Post some code.

Ken
---------------
"Reza G." <Reza G.@discussions.microsoft.com> wrote in message
news:AC**********************************@microsof t.com...
I have a datagrid on my windows form. At design time, I set the DataSource
and DataMember. Then I added a TableStyle and set its MappingName to the
same value as the DataMember. Finally, I created GridColumnStyle for each 3
columns that I wanted to display. But When I run this application I get the
5
origial column display in the datagrid. What did I miss to didn't do?

Thanks

Nov 21 '05 #4
Cor,

If I have 'datamember' of DataGrid and 'mappingname" of TablesStyles set to
the same value.

"Cor Ligthert" wrote:
Reza,

Mostly is in this case the "datamember" not set from the tablestyle

I hope this helps?

Cor

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Matt K. | last post by:
Hi there, I have a form in an Access project that contains a subform which displays the results of a query of the style "select * from where = #a certain date#". In the main part of the form...
3
by: Diego TERCERO | last post by:
Hi... I'm working on a tool for editing text resources for a family of software product my company produces. These text resources are found in a SQL Server database, in a table called...
0
by: optimizeit | last post by:
What I am attempting to do is import an Excel Workbook and display the worksheets in a datagrid dynamically. I am very close to getting this to work. I have to this point successfully imported a...
7
by: What-a-Tool | last post by:
Have an Access table loaded into a DataTable that was created at run time, and am displaying these contents in a data grid. Me.dgGames.DataSource = Me.DsGameInfo.Tables("Games") I would like to...
3
by: RichT | last post by:
Hi all, I am experiencing some odd behaviour with a DataGridView. The DataGridView is bound to a DataTable, which is populated with data from a csv file. The column Headings appear fine,...
1
by: rajiv Joshi | last post by:
Hi all I m displaying locations from database in the dropdownlist box using C# .Its displaying all locations properly but when i select loacation from dropdown it is always displaying first item...
33
by: buss123 | last post by:
Hi all, combo box script code was working in IE perfectly with all modes but OnChange event was not working in FireFox(editable mode, if we select valuese that combo box values r...
8
by: bimeldip | last post by:
Hi, i would like to display the list of tables in a database in a drop down list then when user selects a table, the table will be dispalyed on the page. So far i've done this: <? $dbname =...
2
by: aiswarya | last post by:
I've a table named student in my database.In it there are 7 columns .Now, in my form, when I click my table name, the name of columns should be displayed in one listbox ie in listbox1. Again, when...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.