473,323 Members | 1,560 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,323 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 1040
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.