I have a web grid with Hierarchical data.
This data is represented as a list of cutomers that is expanded out to show each order each customer has made.
I have a grid click event which is the last cell in the expanded orders grid. When this sell is click it displays a pdf of the actual order in a seperate pop out window. The user is not allowed to edit, add or delete any of the columns. <~~ This all works fine and dandy...
Whenever a user clicks on one of the other cells the grid does a post back and closes the current location of what was expanded.
I want to stop the post back on the click event so that the page doesn't reload or refresh on each click closing the current location of where the user was at. Is this possible and how can this be accomplished?
Rather then using the server side click event, could you use either a link or use the client side event to open up the pdf in a second window?
I should of also mentioned that the documents are created on the fly by the server doing a query to the database for the clicked information based on id. This limits the need of wasting disk space to store pdf documents.
Using the generic Click event isn't really the best event to use, clicking anywhere could cause a postback. You could use an embedded button and respond to the the button click event, that would restrict when it would post back.
Thats an interesting thought, as I was restricting the click event to a defined column but clicking anywere does cause a post back.
The only issue I have to solve is how to embed the button into the child grid of a relational dataset that is being bound to the webgrid.... I'm not really sure I know enough about the product yet on how to accomplish this. I'll have to continue to go through the online examples to see how I can go about to accomplish this.
This post has the code to make a column a button column.
Would you please share the solution with us? I have the same issue.
Thanks!
Alea
Thanks for you're help Darrell I got it working now!