Solved

adding panels to a datagrid column.

Posted on 2003-11-16
9
275 Views
Last Modified: 2010-04-16
does anyone know how i can add panels on a datagrid column. typically, the panels would contain a bunch of controls... i have tried to implement one by adding the DataGridColumnStyle but, the best i can do is to get it to display, only during edit mode. if i put the displaying part on the paint method, it will flicker..

does anyone have a solution to get a panel (containing a few controls on the panel) to be displayed on a datagrid column, all the time, and can be access during normal or edit mode.

thanks.
0
Comment
Question by:heboh
  • 5
  • 2
9 Comments
 
LVL 1

Author Comment

by:heboh
ID: 9758269
one thing that i forgot to mention. i wanted to have separate instances of the panels (but this is optional) since the components that are inside the controls are likely to be different.
0
 
LVL 1

Author Comment

by:heboh
ID: 9761410
TheAvenger? is this possible?
0
 
LVL 20

Expert Comment

by:TheAvenger
ID: 9762253
The only think I can think of is to inherit from DataGridColumnStyle but I think you already tried this (based on your explanation). As a matter of fact I never dealt with showing the contents in a different way in a data grid.

Have a look at this example:

http://www.codeproject.com/cs/miscctrl/csharpgridcontrol.asp

They have buttons in the data grid that are shown all the time. Also some other controls. So what you have to do is change this with your control. However I think they wrote a lot of code, so you will have to go through it and get the idea. Maybe you will also have to fix a couple of things... I hope it helps at least a little bit.
0
 
LVL 1

Author Comment

by:heboh
ID: 9769422
hi TheAvenger,

thanks for your help..  but the grid control available at the code project, does not inherit from datagrid. it is itself an indepedent component.

but, i just have a couple of question that might help me.. if i extend the datagrid component itself, do you know how I can force the data grid to create separate control instances that resides in each column row.  

currently, i think the datagrid, creates an instance of for example a textbox control only once for each column, and share it among all rows of that column. but what i want is to possibly create a separate instance of that textbox, for each row in the column.

and another thing is, my current implementation of the component, is that it extends the DataGridColumnStyle, and placed a panel in a similar way to a number of samples on the code project which inserts combo boxes. The problem is that, the panel only appears when the state of the cell is in edit mode. do you know how I can force the panel or what ever control on the column to always appear.. ?

thanks kindly for your help...
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Author Comment

by:heboh
ID: 9777614
moderator can i delete this question? i have found the solution..
0
 
LVL 20

Expert Comment

by:TheAvenger
ID: 9802333
Can you post your solution? I was trying to find one and I could not so it would be nice if you show it.

Also you should ask the moderators to delete the question in the support rubric, not here because moderators don't read all questions here...
0
 
LVL 1

Author Comment

by:heboh
ID: 9802400
Hi TheAvenger,

my solution is probably not such a good one, but it works.. Until i have time to create a totally new datagrid..

basically, what i did is inherit the datagrid class, and attach a container panel besides the last column on the datagrid. It just creates the illusion that the container panel and its sub-panels (containing whatever control is required) is part of the datagrid column.. but it is just an attachment.
0
 

Accepted Solution

by:
ee_ai_construct earned 0 total points
ID: 11747197
PAQed, with points refunded (500)
ee_ai_construct - CS Mod
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now