PC Review


Reply
Thread Tools Rate Thread

DataGrid.DataMember property in CF

 
 
Shanti
Guest
Posts: n/a
 
      4th Sep 2003
I was posting this at developer newsgroup with not much of response:

Does CF version of DataGrid have the 'DataMember' property?

There is a sample code in .NET Framework Class Library topic
"DataGrid.DataSource Property", which is given below:
Private Sub BindToDataSet(myGrid As DataGrid)
' Create a DataSet.
Dim myDataSet As New DataSet("myDataSet")
' Insert code to populate DataSet with several tables.
myGrid.DataSource = myDataSet
' Use the DataMember property to specify the DataTable.
myGrid.DataMember = "Suppliers"
End Sub 'BindToDataSet

When I try to enter last line in a SmartDeviceApplication, I get error
"DataMember is not a member of System.Windows.Forms.DataGrid". Why?


 
Reply With Quote
 
 
 
 
Alex Feinman [MVP]
Guest
Posts: n/a
 
      4th Sep 2003
DataGrid in CF is an entirely separate control - not a downsized desktop
datagrid. It was rewritten with mobile device resources in mind. For samples
of binding datagrid to data see:
http://www.inthehand.com/forums/viewtopic.php?t=96
http://www.opennetcf.org/forums/topic.asp?TOPIC_ID=245


"Shanti" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I was posting this at developer newsgroup with not much of response:
>
> Does CF version of DataGrid have the 'DataMember' property?
>
> There is a sample code in .NET Framework Class Library topic
> "DataGrid.DataSource Property", which is given below:
> Private Sub BindToDataSet(myGrid As DataGrid)
> ' Create a DataSet.
> Dim myDataSet As New DataSet("myDataSet")
> ' Insert code to populate DataSet with several tables.
> myGrid.DataSource = myDataSet
> ' Use the DataMember property to specify the DataTable.
> myGrid.DataMember = "Suppliers"
> End Sub 'BindToDataSet
>
> When I try to enter last line in a SmartDeviceApplication, I get error
> "DataMember is not a member of System.Windows.Forms.DataGrid". Why?
>
>



 
Reply With Quote
 
Shanti
Guest
Posts: n/a
 
      5th Sep 2003
Your GridDemo example was quite helpful and finally I could display the grid
with contents. This I was trying for the past one week but in vain.
ThanQ...
"Alex Feinman [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> DataGrid in CF is an entirely separate control - not a downsized desktop
> datagrid. It was rewritten with mobile device resources in mind. For

samples
> of binding datagrid to data see:
> http://www.inthehand.com/forums/viewtopic.php?t=96
> http://www.opennetcf.org/forums/topic.asp?TOPIC_ID=245
>
>
> "Shanti" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I was posting this at developer newsgroup with not much of response:
> >
> > Does CF version of DataGrid have the 'DataMember' property?
> >
> > There is a sample code in .NET Framework Class Library topic
> > "DataGrid.DataSource Property", which is given below:
> > Private Sub BindToDataSet(myGrid As DataGrid)
> > ' Create a DataSet.
> > Dim myDataSet As New DataSet("myDataSet")
> > ' Insert code to populate DataSet with several tables.
> > myGrid.DataSource = myDataSet
> > ' Use the DataMember property to specify the DataTable.
> > myGrid.DataMember = "Suppliers"
> > End Sub 'BindToDataSet
> >
> > When I try to enter last line in a SmartDeviceApplication, I get error
> > "DataMember is not a member of System.Windows.Forms.DataGrid". Why?
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataMember property 'stored proce name' cannot be found on theDataSource rlm Microsoft C# .NET 0 24th Feb 2009 09:10 AM
DataMember property 'ContractID' cannot be found on the DataSource =?Utf-8?B?QmFydA==?= Microsoft ADO .NET 6 4th Sep 2006 03:33 PM
DataSource & DataMember property at custom control. Alvaro E. Gonzalez V. Microsoft C# .NET 3 4th Oct 2005 11:15 PM
Using DataGrid in a form makes the TopMost property invalid -- DataGrid bug? Sajjadul Hakim Microsoft C# .NET 0 5th Apr 2004 03:26 PM
DataGrid DataMember changes Fred Noltie Microsoft Dot NET Framework Forms 0 7th Jan 2004 10:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:00 AM.