The Situation: You have an ASP.NET page that uses an ObjectDataSource to provide data access for a GridView, FormView or list control like a DropDownList or CheckboxList. When a data access error occurs, you would like to display a message on the page to help users understand what is happening. A Solution: You could try … Continue reading How to Catch Errors when Using ObjectDataSource
Programming How-To Archive
How To Edit a Record in an ASPxGridView Bound to EntitySpaces’ esDataSource that Uses a Join
The Situation: You get an error when you try to save edits to a record in a DevExpress ASPxGridView. The grid view is bound to an EntitySpaces esDataSource, which is populated using EntitySpaces dynamic query functionality. The ES dynamic query syntax allows you to use joins between entities like this (actual code from one of … Continue reading How To Edit a Record in an ASPxGridView Bound to EntitySpaces’ esDataSource that Uses a Join
How to get the value from a GridView column on RowDeleting
The Situation: You need to get the value of one of the columns in the row you are deleting in a GridView to do some processing before the row is deleted. A Solution: When using the RowDeleting method, you cannot use e.Row.Cells[1].Controls[1] to get the control in that cell like you can in the RowCreated … Continue reading How to get the value from a GridView column on RowDeleting
How to Get the Name of the Current Folder from the URL
The Situation: You need to get the name of the current page request folder from the URL. A Solution: Use this method:
How to Find the Index of a String in a List
The Situation You are trying to find out if a string exists in a List object. A Solution You could use a Find with a predicate, or try the simple method below.