Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / October 2004

Tip: Looking for answers? Try searching our database.

datagridtablestyle mappingname problem in vc++.net

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
apz - 21 Oct 2004 15:43 GMT
hi

i am creating a datatable during run-time and want to associate a table
style to the datagrid that displays the datatable. i have included a breif
illustration

private:DataSet __gc *datasetPpl;

public:DataTable __gc *datatablePpl;   //data table that i want to display
in the datagrid

public:DataColumn __gc *datacolumnPpl;

public:DataRow __gc *datarowPpl;

{

//initializations for the above and the datagrid(dataGrid1)

}

this->dataCategory = new DataColumn(S"FullName");   //adding column to data
table

this->dataCategory->DataType = System::Type::GetType(S"System.String");

this->datatablePpl->Columns->Add(dataCategory);

//add new rows (static association), String type

this->dataGrid1->DataSource = datasetPpl;

this->dataGrid1->DataMember = S"tablePpl";

DataGridTableStyle* ts = new DataGridTableStyle();

ts->MappingName=S"datatablePpl"; // DO-NOT KNOW IF THIS IS THE PROPER WAY TO
ASSOCIATE MAPPING NAME

//and further down for the columnstyle,

DataGridColumnStyle* name = new DataGridTextBoxColumn();

name->MappingName = S"FullName"; //DO-NOT KNOW IF THIS IS THE PROPER WAY TO
ASSOCIATE MAPPING NAME

name->HeaderText = S"Full Name of Person";

name->Width = 300;

ts->GridColumnStyles->Add(name);

I am not able to get the table style to work when the datagrid is displayed.
(the data is displayed in the datagrid)

Please let me know if there are any errors and if there is a better way of
going abt it.

cheers!
apz - 22 Oct 2004 09:39 GMT
i got that one, wrong table name, didnt figure out that u need to refer to
the "table name" rather than the table definition object

> hi
>
[quoted text clipped - 55 lines]
>
> cheers!

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.