PDA

View Full Version : [CLOSED] Save ext:GridPanel.getState() in SQL Server database



supera
May 02, 2012, 5:14 PM
Hi

I'm reading this thread http://forums.ext.net/showthread.php?18388-CLOSED-GridPanel-state-for-columns&p=79369&viewfull=1#post79369 and I wish save the result of gridPanel.getState in my database.

I create a webservice and call this with Ext.net.directRequest... works fine...

But the array object returned to me is very large, with many columns and properties... there are some ext.net object to save this in database or convert this in xml?

Daniil
May 02, 2012, 9:25 PM
Hi,

Well, there is no such thing in Ext.NET.

But, seems, I don't understand the problem.

The simplest way would be saving a state as string.

Ext.encode(App.GridPanel1.getState())

When you can apply it this way.

GridPanel1.Listeners.ViewReady.Handler = string.Format("this.applyState(Ext.decode({0}));", savedStateString);

I have not tested it, but should work. Please report if you will face any problem.

supera
May 03, 2012, 11:17 AM
Hi Daniil!

Ext.encode and Ext.decode is exactly what I need...

Thanks a lot