?
Solved

datagrid and getting all data

Posted on 2008-11-11
2
Medium Priority
?
301 Views
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
0
Comment
Question by:jagguy
2 Comments
 
LVL 10

Accepted Solution

by:
gangwisch earned 1000 total points
ID: 22944289
'the format for this is datagrid1.item(rowindex,columnindex)
textbox1.text=datagrid1.item(1,1)
0
 

Author Comment

by:jagguy
ID: 22944432
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

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
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. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

850 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