how to bind sql database table to a silver light datagrid with out using linq?
how can that be done?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can not bind sql datatable to silverlight datatable directly.
I did it like :
1) I have created business object in webservice :
2) Writtern webservice method which is returning List of business object
Call objDCD_Product_Dashboard_DB_Functions.DB_Get_DCDData(strCcyPair, strTenor, dtTable)
For i As Integer = 0 To dtTable.Rows.Count - 1
Dim objDcdData As New DCDData
objDcdData.ProductDescription = dtTable.Rows(i).Item("Product_Description").ToString
objDcdData.Yield = dtTable.Rows(i).Item("Yield").ToString
objDcdData.Pair = dtTable.Rows(i).Item("Pair").ToString
objDcdData.Tenor = dtTable.Rows(i).Item("Tenor").ToString
objDcdData.StrikePoints = dtTable.Rows(i).Item("Strike Points").ToString
list.Add(objDcdData)
Next
Return list
3) In silverlight page Bind datagrid to List of object