.NETGURU
Custom formatting of data in a DataGrid
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngcontrolsvb' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Anders.Vikstrom@banqit.com
Once again I cry out for help: Does anybody know if it is possible to =
format
data read from a bound dataset before it is displayed in a DataGrid. =
For
example, I would like a Boolean value to be displayed as "Open" or =
"Closed".
I could of course create a special "display DataSet" from the values of =
the
original DataSet, but with all the extensibilities in .NET I suspect =
that a
more elegant solution exist. Am I right?

Thanks for all the help so far,

Anders Vikstr=F6m
SW Engineering, BANQIT AB
http://www.banqit.com
mailto:Click here to reveal e-mail address
Phone: +46 8 7594737

Reply to this message...
 
    
Bob Levittan (VIP)
Try the BoundColumn.DataFormatString property in the help docs at:
ms-help://MS.NETFrameworkSDK/cpref/html/frlrfsystemwebuiwebcontrolsboundcolumnclassdataformatstringtopic.htm

............................

Once again I cry out for help: Does anybody know if it is possible to format
data read from a bound dataset before it is displayed in a DataGrid. For
example, I would like a Boolean value to be displayed as "Open" or "Closed".
I could of course create a special "display DataSet" from the values of the
original DataSet, but with all the extensibilities in .NET I suspect that a
more elegant solution exist. Am I right?

Thanks for all the help so far,

Anders Vikström
SW Engineering, BANQIT AB
http://www.banqit.com
mailto:Click here to reveal e-mail address
Phone: +46 8 7594737

| [aspngcontrolsvb] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngcontrolsvb.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

Reply to this message...
 
    
Anders.Vikstrom@banqit.com
Thanks for the tip Bob, but it doesn't seem to be what I want. I =
thought
that maybe I could create a custom formatter by implementing =
IFormatProvider
and ICustomFormatter. However, I don't know how to tell the datagrid to =
use
it.

/Anders

-----Original Message-----
From: Bob Levittan [mailto:Click here to reveal e-mail address]
Sent: den 28 september 2001 16:14
To: aspngcontrolsvb
Subject: [aspngcontrolsvb] Re: Custom formatting of data in a DataGrid

Try the BoundColumn.DataFormatString property in the help docs at:
ms-help://MS.NETFrameworkSDK/cpref/html/frlrfsystemwebuiwebcontrolsbound=
colu
mnclassdataformatstringtopic.htm

............................

Once again I cry out for help: Does anybody know if it is possible to =
format
data read from a bound dataset before it is displayed in a DataGrid. =
For
example, I would like a Boolean value to be displayed as "Open" or =
"Closed".
I could of course create a special "display DataSet" from the values of =
the
original DataSet, but with all the extensibilities in .NET I suspect =
that a
more elegant solution exist. Am I right?

Thanks for all the help so far,

Anders Vikstr=F6m
SW Engineering, BANQIT AB
http://www.banqit.com
mailto:Click here to reveal e-mail address
Phone: +46 8 7594737

| [aspngcontrolsvb] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngcontrolsvb.asp =3D JOIN/QUIT
| http://www.asplists.com/search =3D SEARCH Archives

_________________________________________________________________
Get your FREE download of MSN Explorer at =
http://explorer.msn.com/intl.asp

| [aspngcontrolsvb] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngcontrolsvb.asp =3D JOIN/QUIT
| http://www.asplists.com/search =3D SEARCH Archives

Reply to this message...
 
 
System.Data.DataSet
System.ICustomFormatter
System.IFormatProvider
System.Web.UI.WebControls.BoundColumn
System.Web.UI.WebControls.DataGrid
System.Windows.Forms.DataGrid




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification