Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Obout grid with Row Template failed to save

Obout grid with Row Template failed to save

Scheduled Pinned Locked Moved ASP.NET
databasehelpcsssysadminsecurity
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alaminfad
    wrote on last edited by
    #1

    Hi All I’ve used Obout grid with Row Template,It displays the data from the database fine, when I click edit the edit template appears when I make some changes and click save this error appears *********************************************************************** 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 *********************************************************************** This property helped me stopping that message from appearing again <pages enableEventValidation="false" > But then the changes are not reflected to DB ,when I debugged the following code I found out that the Event [e] which was supposed to hold the new(changed) data is holding the old data why? How to fix that? :----------------------------------------------------------------------- Sub UpdateRecord(ByVal sender As Object, ByVal e As Obout.Grid.GridRecordEventArgs) Dim myConn As SqlConnection = New SqlConnection("Data Source=GP10;Initial Catalog=Integration;Integrated Security=True") myConn.Open() Dim m = e.Record("EmployeeID") Dim mm = e.Record("EmployeeNameA") Dim myComm As SqlCommand = New SqlCommand("UPDATE Employees SET APUsername=@APUsername, AccountNumber = @AccountNumber, EmployeeNameA=@EmployeeNameA, HasPC=@HasPC, Manager = @Manager WHERE EmployeeID = @EmployeeID", myConn) myComm.Parameters.Add("@APUsername", System.Data.SqlDbType.VarChar).Value = e.Record("APUsername") myComm.Parameters.Add("@AccountNumber", System.Data.SqlDbType.VarChar).Value = e.Record("AccountNumber") myComm.Parameters.Add("@EmployeeNameA", System.Data.SqlDbType.NVarChar).Value = e.Record("EmployeeNameA") myComm.Parameters.Add("@HasPC", System.Data.SqlDbType.Bit).Value = e.Record("HasPC") myComm.Parameters.Add("@Manager", System.Data.SqlDbType.VarChar).Value = e.Record("Manager") myComm.Parameters.Add("@EmployeeID", System.Data.SqlDbType.NVarChar).Value = e.Record("EmployeeID") myComm.ExecuteNonQuery() myComm.Dispose() myConn.Cl

    A 1 Reply Last reply
    0
    • A alaminfad

      Hi All I’ve used Obout grid with Row Template,It displays the data from the database fine, when I click edit the edit template appears when I make some changes and click save this error appears *********************************************************************** 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 *********************************************************************** This property helped me stopping that message from appearing again <pages enableEventValidation="false" > But then the changes are not reflected to DB ,when I debugged the following code I found out that the Event [e] which was supposed to hold the new(changed) data is holding the old data why? How to fix that? :----------------------------------------------------------------------- Sub UpdateRecord(ByVal sender As Object, ByVal e As Obout.Grid.GridRecordEventArgs) Dim myConn As SqlConnection = New SqlConnection("Data Source=GP10;Initial Catalog=Integration;Integrated Security=True") myConn.Open() Dim m = e.Record("EmployeeID") Dim mm = e.Record("EmployeeNameA") Dim myComm As SqlCommand = New SqlCommand("UPDATE Employees SET APUsername=@APUsername, AccountNumber = @AccountNumber, EmployeeNameA=@EmployeeNameA, HasPC=@HasPC, Manager = @Manager WHERE EmployeeID = @EmployeeID", myConn) myComm.Parameters.Add("@APUsername", System.Data.SqlDbType.VarChar).Value = e.Record("APUsername") myComm.Parameters.Add("@AccountNumber", System.Data.SqlDbType.VarChar).Value = e.Record("AccountNumber") myComm.Parameters.Add("@EmployeeNameA", System.Data.SqlDbType.NVarChar).Value = e.Record("EmployeeNameA") myComm.Parameters.Add("@HasPC", System.Data.SqlDbType.Bit).Value = e.Record("HasPC") myComm.Parameters.Add("@Manager", System.Data.SqlDbType.VarChar).Value = e.Record("Manager") myComm.Parameters.Add("@EmployeeID", System.Data.SqlDbType.NVarChar).Value = e.Record("EmployeeID") myComm.ExecuteNonQuery() myComm.Dispose() myConn.Cl

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      I guess you are talking about some ThirdParty Gird Control. It will be better if you ask there forum, so that they can give you proper solution.

      Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups