Re: refresh gridview at postback



Hi Eliyahu,

I am seeking a solution where 'delete' and 'edit' will work.


X) without invoking databind, then 'delete' correctly removes
the row. However then 'edit' fails to refresh the gridview.

Y) when invoking databind, then 'edit' correctly refreshes
the gridview. However 'delete' results in an error
(see bottom of this mail).


I should have told in my original post;
that I invoke mygridview.DataBind(); in order to force a
refresh of the gridview. I am not sure if there is a smarter
way to force a refresh?

From the 'edit' popup one can modify my table and thus
I want to refresh the parent window so the gridview reflects
the current table data.




Summary of what I am trying to accomplish:
* The gridview extracts data from my table.

* Via the 'edit' popup, users can modify my table.

* When a user has edited my table, then the gridview
should be refreshed.

* When a user clicks 'delete' on a row in the gridview,
then it should be removed.




below is the error message for (Y):
Invalid postback or callback argument. Event validation is enabled
using <pages enableEventValidation="true"/> in configuration or <%@
Page EnableEventValidation="true" %> in a page. For security purposes,
this feature verifies that arguments to postback or callback events
originate from the server control that originally rendered them. If
the data is valid and expected, use the
ClientScriptManager.RegisterForEventValidation method in order to
register the postback or callback data for validation.



--
Simon Strandgaard - http://neoneye.dk/

.



Relevant Pages

  • Re: updating data on the same web form via 2 pcs
    ... for example, if you have a gridview on the page, and both users have the gridview on screen with the same 20 records. ... they each edit a different row and hit update or whatever. ... "Mark Rae" wrote in message ... something it would change on the other persons screen after a refresh ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Validating Data in a GridView
    ... "Cowboy (Gregory A. Beamer)" wrote: ... Add a disabled dropdown, or textbox, with the value. ... >I have a gridview that uses a sqldatasource. ... When the gridview is in edit mode, one of the columns is a ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Concurrency issue
    ... you can use an additional DetailsView/FormView control to edit ... DetailsView/FormView with the Gridview control's current Row. ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • GridView inside FormView cannot get into Edit Mode
    ... I have a GridView inside a FormView and cannot get it into editMode. ... The FormView is bound to an ObjectDataSource. ... Once I do this I can get into edit ...
    (microsoft.public.dotnet.framework.aspnet)
  • How to edit selected row of GridView in a DetailsView?
    ... DetailsView to insert and edit the selected row in a GridView. ...
    (microsoft.public.dotnet.framework.aspnet)

Loading