Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / April 2005

Tip: Looking for answers? Try searching our database.

datagrid colum's nulltext property displayed in column when field not null

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TS - 31 Mar 2005 21:15 GMT
I have a record displayed in datagrid and 2 columns says the text i've
designated as the nulltext for those columns, but when i look at the data in
the db, those values are listed there.

is there some issue/bug that can be causing this?

thanks
"Jeffrey Tan[MSFT]" - 01 Apr 2005 02:47 GMT
Hi TS,

Thanks for your post!!

For this issue, do you fill the database table into .Net DataSet/DataTable
object, then bind the DataSet/DataTable to the DataGrid? If so, I suggest
you look into the underlying datasource(DataTable) to see the corresponding
DataColumn's values, are they Null reference data? Also, for these 2
nulltext DataGridColumnStyle, have you correctly set their MappingName
property to  corresponding DataColumn name?

Actually, currently with your post information, we still can not reproduce
out the problem. Can you show us some more information and some sample code
snippet for us to reproduce out this issue? Then we can understand the
issue better, and help you better. I will wait for your further feedback.
Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Signature

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

TS - 04 Apr 2005 16:39 GMT
This is a bug that happens randomly and that i've never been in debug mode
when it happened so i couldn't inspect the dataview, though i did check the
resultset that was created from the stored procedure that this dataview
uses, and there was a value for this column, so it seems its either a bug in
the datagrid or the dataview, though i cannot recreate either. I am
including the relevant code, but theres not really anything to go on, so if
you have any ideas on any possible reasons, let me know, else have a nice
day!

dsMonitorTI = monitorTests.MaintainTestInstance(sFilter);

dvMonitorTests = new DataView(dsMonitorTI.Tables[0]);

dvMonitorTests.AllowDelete = false;

dvMonitorTests.AllowEdit = false;

dvMonitorTests.AllowNew = false;

dgMonitoring.DataSource = dvMonitorTests;

dataTableCurrencyManager =
(CurrencyManager)this.dgMonitoring.BindingContext[dvMonitorTests];

dgMonitoring.Refresh();

> Hi TS,
>
[quoted text clipped - 18 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
"Jeffrey Tan[MSFT]" - 05 Apr 2005 03:28 GMT
Hi TS,

Thanks for your post!!

Based on your feedback, it seems that the problem only occurs at release
mode, yes? Also, based on your checking, there are "real" values in
DataColumn in source DataTable, but the DataGrid still displays NullText.

Currently, with your little code snippet, we still can not reproduce out
your problem(Actually, I have used DataGrid for many many times, but did
not meet this specific issue). There are severl suggestion for this issue:
#1, Create a new project, then paste your original code in this new
project, does the problem occur in new project? (So we can determine if
this issue is project specific)
#2, Move your project in your colleague's machine, does this problem occurs
either?(So we can determine if this issue is machine specific)
#3, Get rid of the database dependency, just use code to construct a valid
datatable as datasource, can this problem be reproduced out?
#4, If this issue is not machine specific or project specific, which can be
reproduced always, I suggest you create a sample project, then attach it in
the newsgroup, I will refer to it and did some for it.

Once, I can reproduce out the problem in my side, I understand the problem
better. Thanks
===============================================================
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.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Signature

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.