or
'This is my WCF service
<
OperationContract
()> _
Public Function GetdataSelect(ByVal startRowIndex As Integer, ByVal maximumRows As Integer, ByVal sortExpression As String, ByVal filterExpression As String) As MyData
Dim data As GridBindingData = RadGrid.GetBindingData("LinqToSql.DataClassesDataContext", "TrnApproval", startRowIndex, maximumRows, sortExpression, filterExpression)
Dim result As New MyData()
Dim db As New DataClassesDataContext
result.Data = From c In db.TrnApprovals Select c.TrnID, c.ApproverID
result.Count = data.Count
Return result
End Function
public List<Person> GetPersons() { return DataProvider.GetPeople(); }
var items = RadGrid1.SelectedItems; Person p = items[0].DataItem as Person;
<
asp:SqlDataSource
ID
=
"dsLocations"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:Database_DB1 %>"
SelectCommand = "select * from GetLocations WHERE loc_User_ID = 44"
ProviderName="System.Data.SqlClient" >
</
asp:SqlDataSource
>
<
asp:SqlDataSource
ID
=
"dsLocations"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:Database_DB1 %>"
ProviderName="System.Data.SqlClient" >
</
asp:SqlDataSource
>
protected void Page_PreRender(object sender, EventArgs e)
{
dsLocations.SelectCommand = "select * from GetLocations WHERE loc_User_ID = " + user.User_ID.ToString();
if (rgLocations.SelectedIndexes.Count == 0)
{
rgLocations.SelectedIndexes.Add(0);
rgActivities.Rebind();
}
}
rgLocations.SelectedIndexes.Add(0);
// failrgActivities.Rebind();
// fail