datagrid and getting all data

Posted on 2008-11-11
Last Modified: 2013-11-12
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
Question by:jagguy
    LVL 10

    Accepted Solution

    'the format for this is datagrid1.item(rowindex,columnindex)

    Author Comment

    there is no such command in silverlight?


    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 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


    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now