Question

I have used a DevExpress ASPxGridView where a column has download hyperlink buttons. When a user clicks one of those buttons the page will send the id and the code behind checks for existence of a file on that id . If a file exists it will take the user to new page where the file will be exposed. Now if a file doesn't exist in the underlying DB table the as of now it simply redirects to the original page who called the new page. What I want is to take user to the old page with grid view in its current state and display a JavaScript error message there instead of the new page. This will let the user select another record.

Thanks and Regards Ganesh.

Was it helpful?

Solution

You can use the grids JSProperties array to pass values back from server side to client side. Property names in the array must be prefixed "cp" (e.g. cpExists). You can reference these values after the grid callback in the client EndCallback event.

e.g. mygridclientinstancename.cpExists

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top