By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,499 Members | 1,210 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,499 IT Pros & Developers. It's quick & easy.

DataGrid & DataView questions

P: n/a
Hello,
I need to know how to format Integer and Real with the datagrid.
In fact, I want to use the right alignment.
When I use this option the header text comes with the right alignment too.
:(

Another question with datagrid, is there a way to have "blank lines".
I mean I would like to have (n) lines displayed even if they are empty (like
an excel page).
Just for the design.

And finally, what are the advantages to work with dataview controls instead
of working directly with datatable controls ?
Thks for you lights.

Stan
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Stan Sainte-Rose wrote:
And finally, what are the advantages to work with dataview controls
instead of working directly with datatable controls ?
Thks for you lights.

Stan


A dataview will allow you to filter and sort. Every dataset has a "behind
the scenes" dataview called the default dataview.
So when you bind to a dataset you are really binding to the default
dataview.
Optionally you can create other dataview objects that sort or filter the
data and then bind to that.

HTH
--
Slonocode

"I've got a fever...and the only prescripiton is more cowbell"

Nov 20 '05 #2

P: n/a
Hello Stan,
I need to know how to format Integer and Real with the datagrid.
The DataGridTextBoxColumn class has the Format property. You can set this
property value to the desired format string. If you don't know how to use
this class, please refer to the "DataGridTableStyle Class" topic in the MSDN
Library.
In fact, I want to use the right alignment.
When I use this option the header text comes with the right alignment too.
:(
You cannot set different alignments for the header and the data. You will
have to implement your own column style to achieve that. This column style
would use the standard Align property value for the header (as you cannot
customize its appearance) and will introduce a new property DataAlign that
would govern the alignment of the data displayed.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Stan Sainte-Rose" <st**@cyber972.com> wrote in message
news:uI****************@TK2MSFTNGP12.phx.gbl... Hello,
I need to know how to format Integer and Real with the datagrid.
In fact, I want to use the right alignment.
When I use this option the header text comes with the right alignment too.
:(

Another question with datagrid, is there a way to have "blank lines".
I mean I would like to have (n) lines displayed even if they are empty (like an excel page).
Just for the design.

And finally, what are the advantages to work with dataview controls instead of working directly with datatable controls ?
Thks for you lights.

Stan


Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.