Accessing a "detailsview"

pettrer

Well-known member
Joined
Sep 5, 2008
Messages
92
Programming Experience
10+
Hi,

Am still struggling with Windows forms basics. I wonder, if I create a datagridview in designer mode I can access its properties pane. If I make it a detailsview (as we say in the Asp.Net world) however, I only get a bunch of textboxes and labels that don't have any properties in common. So how do I access the properties of a "detailsview"?

Is it at all possible?!

Pettrer
 
The datagridview is itself a control and so it has properties. Likewise, each of the textboxes and labels have properties as well. However, the labels and the textboxes don't have all of the same properties in common. However, if you selected just the textboxes you'd see more properties are the same. In other words, a datagridview is one control, but the multiple textboxes in a detailsview are many. You can edit the properties for the textboxes separately or together by selecting multiple textboxes at the same time. Sorry if I am misunderstanding. What property do you want to change/update specifically?
 
Hi,
Thanks for your reply! Well, there is nothing surrounding the textbox and labels, hence there is no detailsview (ie no panel that has a border, a background color, edit mode etc) from what I can understand.

Anyway, one thing that I would like to do is to set a datagridview of a popup window in "insert mode" when a user clicks the New record button in a parent window.

Pettrer
 
Given that "detailsview" doesnt make much sense to me, as a windows forms guru, can you describe what you mean?
 
Hi,
Thanks for your reply! Well, there is nothing surrounding the textbox and labels, hence there is no detailsview (ie no panel that has a border, a background color, edit mode etc) from what I can understand.

Anyway, one thing that I would like to do is to set a datagridview of a popup window in "insert mode" when a user clicks the New record button in a parent window.

Pettrer

pettrer here's an example of what you're looking for.

DOTNET TUTORIALS: DataGridView with Detail Edit Form - VS 2005
 
If I make it a detailsview (as we say in the Asp.Net world) however, I only get a bunch of textboxes and labels that don't have any properties in common.
I know what you mean by "detailsview", what these controls have in common is the data binding to same data source, ie you can see in DataBindings property of the TextBox that the Text property is bound to a dataset table column via the strongly typed bindingsource. The navigator is bound to same bindingsource, so when you navigate all the "details" controls show each their detail of current table row.
 
I know what you mean by "detailsview", what these controls have in common is the data binding to same data source, ie you can see in DataBindings property of the TextBox that the Text property is bound to a dataset table column via the strongly typed bindingsource. The navigator is bound to same bindingsource, so when you navigate all the "details" controls show each their detail of current table row.

Great, thanks for the clarification (they should put it somewhere in the tutorials to make things easier for us asp.net developers)!

pettrer
 
Back
Top