PDA

View Full Version : RowEditor, CRUD on the server



tempacc
13 Apr 2010, 11:59 AM
Gist: need to have CRUD functionality with C#/XML/RowEditor

I've searched the forum and net unsuccessfully, so now I'm turning to you all. I'm on an intranet network with heavy technical constraints (i.e. .NET 2.0, VS 2003, SQL Server 2000), no internet, and no software installation privileges. Hence, I'm unable to post my code.

Due to my circumstances, I'm using a ExtJS 3.2 grid with a C# web service/XML output. I want to create/read/update/delete rows from the grid/server. RowEditor appears to be the best candidate, but I haven't been able to properly tap into the other methods I've referenced in the HttpProxy api. I've specified the writer as XmlWriter and reader as XmlReader. I can load/manipulate records in the grid, but can't update them on the server.

I'm assuming that when I update records on the store, it's supposed to post the changes back through the Write/Update URL in XML format. At that point, I need to parse the changes into a SQL string, connect to SQL server, and run that command. I also need to add an afteredit listener. Am I on the right track? Originally, I used an ajax request/EditorGridPanel to make changes on the server, but having to add new rows and edit multiple fields simultaneously threw me into a loop.

Any ideas? Thanks in advance.

I've been through these examples without any luck.
http://edspencer.net/2009/09/using-the-extjs-row-editor.html
http://fishersystems.blogspot.com/2010/02/implementation-of-extjs-gridpanel.html

MiamiCoder
14 Apr 2010, 11:36 AM
You need to be more specific. What do you mean when you say that you cannot update the records on the server? Are the updates being sent back to the server at least?

tempacc
16 Apr 2010, 1:14 PM
After setting up an external dev environment, I figured it out. Previously, I didn't have the IdProperty in the right place and wasn't able to see what was being posted back to the server. That all said, I can't imagine how folks debug without FireBug/something similar.