You need to add this line to wherever the exception occurs:
e.ExceptionHandled = true;
protected void edsSch_Deleted(object sender, OpenAccessLinqDataSourceStatusEventArgs e)
{
if (e.Exception != null)
{
((RadNotification)Master.FindControl("rnMain")).Show("A problem occurred while deleting this ");
e.ExceptionHandled = true;
}
Wednesday, January 22, 2014
Thursday, January 16, 2014
Chronicles on Migration From Entity Framework to Telerik OpenAccess - 3
With entity data source you can bind it to a grid and do all CRUD operations automatically even if the entity data source selects related entities via "Include" property.
With Telerik OpenAccessLinqDataSource if you "include" related entities you can not use auto CRUD .You need to write custom code for CRUD
With Telerik OpenAccessLinqDataSource if you "include" related entities you can not use auto CRUD .You need to write custom code for CRUD
Telerik OpenAccessLinqDataSource gives "Identifier expected (at index 3)" exception Chronicles on Migration From Entity Framework to Telerik OpenAccess - 2
Use default value of where parameter to prevent this
<telerik:OpenAccessLinqDataSource runat="server" ID="edsDegree"
ResourceSetName="Degrees" EntityTypeName=""
Select=" new (ID,DegreeTypeID,MajorType,MajorType2,MinorType,SectionID,College,PlannedEntryDate,EntryDate,PlannedGraduationDate,GraduationDate,GPA)"
ContextTypeName="DataModel.data"
Where="it.UserID==@UserID">
<WhereParameters>
<asp:Parameter Name="UserID" Type="Int32" DefaultValue="0" />
</WhereParameters>
</telerik:OpenAccessLinqDataSource>
Or
Remove the "[" "]" from the markup:
OrderBy="it.[Name]" --> OrdeBy="it.Name"
<telerik:OpenAccessLinqDataSource runat="server" ID="edsDegree"
ResourceSetName="Degrees" EntityTypeName=""
Select=" new (ID,DegreeTypeID,MajorType,MajorType2,MinorType,SectionID,College,PlannedEntryDate,EntryDate,PlannedGraduationDate,GraduationDate,GPA)"
ContextTypeName="DataModel.data"
Where="it.UserID==@UserID">
<WhereParameters>
<asp:Parameter Name="UserID" Type="Int32" DefaultValue="0" />
</WhereParameters>
</telerik:OpenAccessLinqDataSource>
Or
Remove the "[" "]" from the markup:
OrderBy="it.[Name]" --> OrdeBy="it.Name"
Subscribe to:
Posts (Atom)