Link to home
Start Free TrialLog in
Avatar of jagguy
jagguyFlag for Australia

asked on

datagrid and getting all data

i have  a datagrid in silverlight   and i fill it with data . the problem is    i want to display cell row 1 col1 in a textbox but i cant get access to individual cells?



    Public Sub methodHandler_filldatacompleted(ByVal sender As Object, ByVal e As ServiceReference1.filldataCompletedEventArgs)
        Dim a As New List(Of datagrid.ServiceReference1.subject)
        Dim data2 As New List(Of Class1)

        dg1.ItemsSource = e.Result
        '   a = CType(dg1.ItemsSource, datagrid.ServiceReference1.subject)
        'tb.Text = a.Count


    End Sub


Public Class Class1
    Dim m_id As String
    Dim m_subject As String
    Dim m_test As String
    Dim m_comment As Boolean


.Error    1    Value of type 'datagrid.ServiceReference1.subject' cannot be converted to 'System.Collections.Generic.List(Of datagrid.ServiceReference1.subject)'.    D:\silverlight\datagrid2\datagrid\Page.xaml.vb    50    13    datagrid2
ASKER CERTIFIED SOLUTION
Avatar of gangwisch
gangwisch

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jagguy

ASKER

there is no such command in silverlight?

....=datagrid1.item(1,1)

I believe in silverlight i need to parse the data into xml but i dont know how to do this, and after 3 days of asking on forums not many people know this either.

b elow is something i was told with c# but i cant get vb.net code and i cant use
..XDocument.Parse(e.Result)? error

XDocument xmlDescription = XDocument.Parse(e.Result); 'error cant convert and .tostring has no effect
 
var ProjectInfo = from desc in xmlDescription.Descendants("Table")
 
select new
 
{
 
Description =desc.Element("A0").Value
 
};
foreach (var info in ProjectInfo)
 
{
 
         txtDescription.Text = info.Description;
 
}  

Open in new window