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 / Windows Forms / WinForm General / July 2006

Tip: Looking for answers? Try searching our database.

Change Display pattern of Datagrid

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
shreelu - 11 Jul 2006 13:41 GMT
Hi
  I am trying to change the way the datagrid looks like
ie, i want to have only two columns one for the column names and the
other for the values of the columns,instead of displaying  in a single
row
For Example:
               Suppose in Employee table , Iam displaying a single
record from the database  in a datagrid , I want to display Employee
name , Employee id , Address, phone No, in a single column and
corresponding values in another column.

Is it possible to change the display pattern as i wanted ,If so pls
help me out

Thanks
Shreelu
rhaazy - 11 Jul 2006 16:18 GMT
There isn't enough details to give you a solid answer but I would
suggest looking into tablestyles and columnstyles

> Hi
>    I am trying to change the way the datagrid looks like
[quoted text clipped - 12 lines]
> Thanks
> Shreelu
shreelu - 12 Jul 2006 05:31 GMT
Hi
By Default Datagrid displays a table  in this manner

Employee Name   EmployeeID     Address        phNo
Madhu              124           dsfdsf        4521255
It has 2 rows

I want to display it as

Employee Name   Madhu
EmployeeID      124
Address        dsfdsf
Phno            4521255

It should have Only 2 columns

Hope u can understand it now
Thanks
Shreelu

> There isn't enough details to give you a solid answer but I would
> suggest looking into tablestyles and columnstyles
[quoted text clipped - 15 lines]
> > Thanks
> > Shreelu
Joris Zwaenepoel - 12 Jul 2006 07:20 GMT
Maybe the "PropertyGrid" control can be useful for you?

Joris

> Hi
>    I am trying to change the way the datagrid looks like
[quoted text clipped - 12 lines]
> Thanks
> Shreelu
barranr - 12 Jul 2006 12:43 GMT
If you are using sqlserver look at creating a pivot table

> Maybe the "PropertyGrid" control can be useful for you?
>
[quoted text clipped - 16 lines]
> > Thanks
> > Shreelu
shreelu - 12 Jul 2006 13:11 GMT
hi
No i am using MySQL ,VB.NET
shreelu

> If you are using sqlserver look at creating a pivot table
>
[quoted text clipped - 18 lines]
> > > Thanks
> > > Shreelu
barranr - 12 Jul 2006 15:14 GMT
mysql should have something similar, create an sp, you query
information_schema for table columns, populate a temp table with col
names(as data) and data and fill your dataset and grid.
That will give you the format you need

> hi
> No i am using MySQL ,VB.NET
[quoted text clipped - 22 lines]
> > > > Thanks
> > > > Shreelu

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.