473,387 Members | 1,899 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,387 software developers and data experts.

DataGrid "MappingName" property

_e_
I'm trying to set custom widths and headings for DataGrid columns, but
they keep displaying as defaults. I did configure the params via the
TableStyles collection -> ColumnStyles collection. MappingName
is set to the name of the DataTable.

My understanding is that the names should match or else the defaults
will be used. Though all the data is being displayed, it does look
like the column sizes and headers are set to defaults (Names = Column
names in the DataTable).

My own DataTable is actually inherited from DataTable, but I am
referring to it by its name:

public class DTX : DataTable {
...
}

I'm using DTX as the mapping name.

So...What am I overlooking?
Nov 15 '05 #1
7 3773
Hi,

The MappingName property value for the DataGridTableStyle object should be
equal to the DataTable's TableName property, not to the type name.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"_e_" <no****@nospam.com> wrote in message
news:ov********************************@4ax.com...
I'm trying to set custom widths and headings for DataGrid columns, but
they keep displaying as defaults. I did configure the params via the
TableStyles collection -> ColumnStyles collection. MappingName
is set to the name of the DataTable.

My understanding is that the names should match or else the defaults
will be used. Though all the data is being displayed, it does look
like the column sizes and headers are set to defaults (Names = Column
names in the DataTable).

My own DataTable is actually inherited from DataTable, but I am
referring to it by its name:

public class DTX : DataTable {
...
}

I'm using DTX as the mapping name.

So...What am I overlooking?


Nov 15 '05 #2
_e_
On Thu, 12 Feb 2004 14:22:51 +0200, "Dmitriy Lapshin [C# / .NET MVP]"
<x-****@no-spam-please.hotpop.com> wrote:
Hi,

The MappingName property value for the DataGridTableStyle object should be
equal to the DataTable's TableName property, not to the type name.


Thanks, Dmitiry. The docs I was looking at were vague on the
subject, and they referred to use of reflection to get parameter
types. That threw me.

Do you happen to know of any books or sites that cover it better than
the VS online docs? I'd like to dig deeper into some obscure features
of Datagrid controls... see if it's possible to add pushbuttons, etc.

Maybe I should post a separate query about that.
Nov 15 '05 #3
_e_
I need some detailed info on Datagrid controls. I haven't been able to
find references on adding pushbuttons, etc. What is the best book or
online reference to check for stuff like this?
Nov 15 '05 #4
Jan
Dear,

Unfortunately good information on the extensibility of the datagrid is
rare.

There have been some more or less successfull attemps to extend it. Have a
look at :

http://www.i-syn.com/devcom/colstyles/intro.htm (includes source-code,
and Ulrich seems to be working on an improved version)

http://dotnet.leadit.be/extendeddatagrid/ (unfortunately without
source-code)
http://www.codeproject.com/cs/miscct...387#xx715387xx
(includes source)

Also the faq at http://www.syncfusion.com/faq/winforms/ has a very good
section dedicated to the datagrid.

HTH,

Jan

"_e_" <no****@nospam.com> wrote in message
news:0l********************************@4ax.com...
I need some detailed info on Datagrid controls. I haven't been able to
find references on adding pushbuttons, etc. What is the best book or
online reference to check for stuff like this?

Nov 15 '05 #5
"ASP.NET Data Web Controls" by Scott Mitchell, published by Sams is
excellent.
Jim

"_e_" <no****@nospam.com> wrote in message
news:0l********************************@4ax.com...
I need some detailed info on Datagrid controls. I haven't been able to
find references on adding pushbuttons, etc. What is the best book or
online reference to check for stuff like this?

Nov 15 '05 #6
_e_
>"_e_" <no****@nospam.com> wrote in message
news:0l********************************@4ax.com.. .
I need some detailed info on Datagrid controls. I haven't been able to
find references on adding pushbuttons, etc. What is the best book or
online reference to check for stuff like this?

On Sat, 14 Feb 2004 12:57:18 +0100, "Jan" <ms****@tss.be> wrote:
Unfortunately good information on the extensibility of the datagrid is
rare.

There have been some more or less successfull attemps to extend it. Have a
look at :

http://www.i-syn.com/devcom/colstyles/intro.htm (includes source-code,
and Ulrich seems to be working on an improved version)

http://dotnet.leadit.be/extendeddatagrid/ (unfortunately without
source-code)
http://www.codeproject.com/cs/miscct...387#xx715387xx
(includes source)

Also the faq at http://www.syncfusion.com/faq/winforms/ has a very good
section dedicated to the datagrid.


Excellent! Thanks, Jan.

I also found a chapter on databinding in a Wrox book: "Windows GUI
Programming using C#" Like many Wrox books, it isn't well edited or
organized, but at this point, I'm looking for any available fragments.

The i-syn site above seems to be one of the better ramp-ups on the
subject, and Shepherd's Forms Faq is quite amazing.

Nov 15 '05 #7
_e_
On Sat, 14 Feb 2004 10:15:11 -0600, "Jim McGivney"
<mc******@nospam.winid.com> wrote:
"ASP.NET Data Web Controls" by Scott Mitchell, published by Sams is
excellent.
Jim


I didn't realize that Web Datagrid controls related that closely to
Forms controls. I'll check into the book. Thanks, Jim.
Nov 15 '05 #8

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

Similar topics

8
by: pei_world | last post by:
Hi, there; I have a problem with my datagrid control. I declared it in one of my form, set with DataGridTalbeStyle as well, and when I click on button, I would like to retrive Data from Database...
0
by: berg | last post by:
All, I am binding an ArrayList full of custom objects to an DataGrid. The property in the custom class are all public. I define a DataGridTableStyle and set the MappingName to "ArrayList". I...
6
by: Das | last post by:
Hi everyone, I'm using datagrid control to display the data. I want to hide column to be displayed into the data grid. I'm using the code as given below: Method given below is used to bind the...
3
by: Quetzal | last post by:
Hello, I have a dataset populated using an XML file. The schema has hierarchical components. Let's say <a><b></b></a>. I have created a datagrid and I have assigned a datastyle and then...
6
by: Robert Schuldenfrei | last post by:
Dear NG, After being away from C# programming for a spell, I am trying my hand at what should be a simple task. I have been hitting my head against the wall this morning. I have a simple order...
24
by: Mike L | last post by:
This is for a Win form, in C# 2005. I want to load a datagrid, make some columns width 0, and then clean out the record I added. I get the error message, ""Index was out of range. Must be...
5
by: J | last post by:
Ok, they have changed a lot of stuff in VB.net. How in the world do you hide a column on the Datagrid? -- Jason
4
by: bordsby | last post by:
Situation: I am using an OleDbDataAdapter to fill a DataSet's DataTable with data from an Access database. The DataSet's DataTable is bound to a DataGrid. After the OleDbDataAdapter.Fill method...
10
by: Nick | last post by:
Hello, Please pardon my ignorance as I'm sure this is easy to do. I have a datagrid where I want to let the user delete columns. I added a context menu to the datagrid that has a delete option....
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.