Am am using this example for my learning tool. The example is using a SQL connection string for data access but I am using Data Entity so I am having to do some code translation. So far I have been able to get the Parent RadGrid configured and can access the USerControl to display the record data when I click the edit link. However Since I am very new to the RadGrid world and am still working on my C# skills I am having some difficulty with the code translation to perform the update.
In the Telerik example this code is used to start to process:
//Prepare new row to add it in the DataSource
DataRow[] changedRows =
this
.Employees
.Select
(
"EmployeeID = "
+ editedItem
.OwnerTableView
.DataKeyValues
[editedItem
.ItemIndex
][
"EmployeeID"
]);
This does not work for me and I get this error message:
LinkAnalysis3.Subjects' does not contain a definition for 'Subjects' and no extension method 'Subjects' accepting a first argument of type 'LinkAnalysis3.Subjects' could be found (are you missing a using directive or an assembly reference?)
Okay I understand the error the Subjects table from the database is not identified, so I have no record or row selected. So I tried this C# code:
DataRow[] changedRows = (results.Where(r => r.SubjectId = (editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex][
"SubjectId"
])));
But it does not work and I get an error message stating :
"Cannot implicitly convert type 'object' to 'int'. An explicit conversion exists (are you missing a cast?)"
Can someone please explain what I am doing wrong and how I can get this fixed.
Thank You for your assistance.
Perry