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

Effective Displays

I have an application that reads columns of information from a database, based upon a specific key.

What I am trying to do is to create an input form for this, which is where I have a problem. I have written handlers for the different types of information to be stored in the database, so that an image will produce an image, and a string will be a string...

I would like some sort of datagrid that allows you to have a different handler for each row (similar to the property grid in VS.net) Some will be textboxes, some will be pictureboxes.

Is there a simple way around doing this?

Thanks

Martin
Nov 15 '05 #1
6 1272

Hi martin,

Thank you for posting in the community! My name is Jeffrey, and I will be
assisting you on this issue.

Is your datagrid WinForm based or Web Form based? I suppose you want to do
in Windows Form.
Based on my understanding, you want to implement different columns in the
datagrid for different data types.
================================================== ==========
In WinForm, DataGrid uses different column style to display data.
There are 2 already made concrete column styles: DataGridBoolColumn and
DataGridTextBoxColumn. These 2 column styles both inherited from
DataGridColumnStyle abstract class.

You can create your own datagrid column style for your data source. You
need to override some of the DataGridColumnStyle's class and do your
customized operations(Such as paint, etc)

Please refer to the article below to find a sample:
http://www.codeproject.com/cs/miscct...datagrid%7Ccol
umn

Also, there is a sample code in MSDN document of DataGridColumnStyle class,
please refer to:
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemwindowsformsdatagridcolumnstyleclasstop ic.asp

================================================== =========
Please apply my suggestion above and let me know if it helps resolve your
problem.

Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.
Have a nice day!!

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #2
Didn't think of doing it that way!

Would it be possible though, to rotate the datagrid around on the form, so that the columns become rows, and rows become columns? I have instances where there will be a single row with many columns, and it would make more sense to display it that way round.

Thanks

Martin
Nov 15 '05 #3

Hi Martin,

Thanks very much for your feedback.

I am glad my reply makes sense to you.

For your further concern, in windows form, there is no way for DataGrid
control to rotate display. Because its each column must be the same data
type.

If you have few rows of data, you can just use some simple controls(such as
textbox, picturebox, label) on the form(In vertical alignment), and
databind to certain field of database.

Hope this helps.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #4
Thanks - is just the solution I am working on now!
Nov 15 '05 #5

Hi Martin,

Congratulations!

If you have any further concern, please feel free to post, I will work with
you, :-)

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #6

Hi Martin,

Congratulations!

If you have any further concern, please feel free to post, I will work with
you, :-)

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #7

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

Similar topics

2
by: Evelyn Pabón | last post by:
Hi I built a database application and I have a field which is for the Close Date. But I need to create an effective date that it will come out automatically. The Effective Date should be 6...
5
by: Ross Presser | last post by:
As our customers demand that we tighten our IT security in the company, I've been asked to prepare a report quarterly showing, for each user in Active directory, what his effective permissions are...
2
by: Harry | last post by:
Hi, Quick question regarding dropdownlists. On one page I have 10 asp:dropdownlists. The user selects an option from a dropdown list and then it updates an asp:label with the relevant text....
44
by: Josh Mcfarlane | last post by:
Just out of curiosity: When would using std::list be more efficient / effective than using other containers such as vector, deque, etc? As far as I'm aware, list doesn't appear to be...
3
by: creator_bob | last post by:
I decided to post here after a little incident where I got an effective memory leak that was immune from garbage collection. I created a simple binary tree, no balancing or deleting. Only two...
8
by: Mike Meng | last post by:
Hi all, I just finished reading Learning Python 3rd ed, and am doing my first Python application, which retrieves and process text and XML documents from Web. Python helped me to write the...
1
by: akkha1234 | last post by:
When I click on the properties of a 2005 sql server database and then permissions. If I select a group and then effective permission, I got an error, saying that "cannot execute as the principal...
15
by: Peter | last post by:
I right now reading this book. And he is iterating some points I'm following since 1996, e.g. exception safety. But e.g. he is missing one of the major exception safety guidelines, which is ...
1
by: mahesh.kanakaraj | last post by:
Hi All, I have a confusion in finding the 'effective content' of a complex type definition in a XML Schema. I shall give you an example situation to clearly explain my problem. Let's have...
8
by: arnuld | last post by:
Hi all, I have come to a point where I can comprehend C++ code much better. I will finish C++ Primer 4/e within next few days. Right now I am feeling the need to have have coding standards when I...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.