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

null in datagrid

i getting only "null" in my dataGrid
can someone tell me why??
thanks
Dim DataGrid1 As New DataGrid

Dim Table1 As DataTable
Table1 = New DataTable("AllExercises")

With Table1
.Columns.Add(New DataColumn("first", GetType(System.String)))
.Columns.Add(New DataColumn("second", GetType(System.String)))
.Columns.Add(New DataColumn("res", GetType(System.String)))
End With

Dim dr As DataRow
Dim dc As DataColumn

For Each dr In dsAdd.Tables(0).Rows
Dim dr1 As DataRow = Table1.NewRow
For Each dc In dsAdd.Tables(0).Columns

dr1.Item("first") = dr(dc.ColumnName).ToString
dr1.Item("second") = dr(dc.ColumnName).ToString
dr1.Item("res") = dr(dc.ColumnName).ToString
Next
Next

Jul 21 '05 #1
1 1041
s-Gallit,

To overcome that you would have to use the column styles,
http://msdn.microsoft.com/library/de...classtopic.asp

in that is in the datagridtextboxcolumn the property
http://msdn.microsoft.com/library/de...ltexttopic.asp

I hope this helps?

Cor
Jul 21 '05 #2

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

Similar topics

0
by: Maurice Mertens | last post by:
Hi all, I'm trying to hide the value 'null' in a bound datagrid but somehow it doesn't work. I set the .Nulltext property to a certain value: ... ... TblStyle.Add(New...
1
by: J | last post by:
Situation - Using the table pubs.titleauthor in a strongly typed dataset, attached to a datagrid, using the datagrid I would like to set the royaltyper field = null (the database allows nulls in...
2
by: Chankama | last post by:
Hi. Is there a way to make a datagrid display the word "Null" (or something similar to that effect - as long as its not just a blank) in the corresponding cell whenever the data value of particular...
1
by: tota | last post by:
i'm having a dataGrid & some values in it with value null how i to be able to not display & make it empty in the dataview in the dataGrid regarding that the user may edit this data , how could i...
2
by: mdb | last post by:
I have a datagrid that is bound to a DataView, and it shows events and the times that event started ("StartTime") and stopped ("EndTime"). If the event has started but hasn't finished, then...
0
by: George Durzi | last post by:
cross posted in datagrid group. Inside <columns/> in my datagrid, I have the following template column <asp:templatecolumn HeaderText="To Be Completed By"> <itemtemplate> <asp:Label...
4
by: Agnes | last post by:
As we add a new row in datagrid, How can we make it not display (null) in that blank new record ?? I search some newsgroup talk about .allownull = false. But I am fail to use it , Any idea ? ...
3
by: travlintom | last post by:
Hi all. I have a datagrid that has several columns including the Primary Key as the first column. When I add records to the grid the Primary Key column show "Null". This would not be a...
5
by: M Skabialka | last post by:
I am creating my first Visual Studio project, an inventory database. I have created a form and used written directions to add data from a table to the form using table adapters, data sets, etc. ...
2
by: harini | last post by:
i hv a datagrid to which i hv bound a table...i hv the table columns to be editable...i.e read only = false....now i hv a problem...in the table there seems to be a row at the end having no values...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.