Groups | Blog | Home
all groups > dotnet compact framework > june 2005 >

dotnet compact framework : datagrid with problem


Ilya Tumanov [MS]
6/7/2005 1:53:16 PM
I suspect its "Mittel" vs. "mittel". Make sure you use exact case for
mappings.

Consider using DataTable.TableName and DataColumn.ColumnName instead of hard
coded strings.

You'll be glad you did if one day you'd need to change these names.



Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

[quoted text, click to view]

Steiner Hubert
6/7/2005 10:07:16 PM
hello,
i develop with basic.net a pocket pc application

my table name is "mittel"
the fields in the table are name,id,customer,...

my code:
toGrid.DataSource = dset.Tables("Mittel")
toGrid.TableStyles.Clear()
Dim ts1 As New DataGridTableStyle
ts1.MappingName = "mittel"
Dim myDataCol As New DataGridTextBoxColumn
myDataCol.HeaderText = "id"
myDataCol.MappingName = "id"
ts1.GridColumnStyles.Add(myDataCol)
toGrid.TableStyles.Add(ts1)


-> but _all_ columns are visible!?


now i set a button at the formular
the code of the button:
Dim myGridStyle As DataGridTableStyle
Dim myColumnStyle As DataGridColumnStyle

For Each myGridStyle In Me.Grid_Mittel_Page2.TableStyles
MsgBox(myGridStyle.MappingName, MsgBoxStyle.Information, "1")
For Each myColumnStyle In myGridStyle.GridColumnStyles
MsgBox(myColumnStyle.MappingName, MsgBoxStyle.Information, "2")
Next
Next
End Sub

-> the msgbox shows "mittel", "1"
and "id" , "2"

the msgbox shows the right data
but the datagrid show _alle_ columns

where is the error??

Steiner Hubert
6/7/2005 11:04:23 PM
[quoted text, click to view]

THANK YOU !!!

AddThis Social Bookmark Button