Showing posts with label type. Show all posts
Showing posts with label type. Show all posts

Wednesday, March 21, 2012

Ask about network programming tech?

hi all

i have a problem about networking programming technical like that:

in my datagrid have a checkbox column has be bound column by a boolean type data field.

the function of this checkbox column is remember record for delete or do something.

so when more one user at one-time access to this page and processing it? everything seem not synchronized.

any idea for this problem.

Thank you very much

Hi,

Based on my understanding, I think the issue is something about "Locking Architecture & SQL TRANSACTION".

For more information about SQL TRANSACTION, see:

http://msdn2.microsoft.com/en-us/library/aa224738(SQL.80).aspx(Locking Architecture)

http://www.google.com/search?hl=en&rls=com.microsoft%3Aen-us&q=SQL+TRANSACTION&btnG=Search

Best Regards,


thankJin Yu Jin

i found out other way to resolved this problem like that:

checkbox column have not bound any data field instead by javascript function to check all and checkbox item is checked by autopostback = false.

thank your idea.


Oh,Sorry, I misunderstood you by "everything seem not synchronized.", It should be "everything seem synchronized".

Best Regards,

Array property on a complex return type not deserializing to Array

HI,

I have a WS that returns a complex type let's call itJSONResultWrapper-one of the properties ofJSONResultWrappersay,Result, is an Array of another complex type say,JSONResult.

When this serializes down the wire, it looks like it has serialized correctly, but when it is deserialized back into an object at the client, instead ofResult being an Array orJSONResult,it is an object.

Sure, I can iterate through this and add each element into my array - but should I have to ?

c# code

public class JSONResultWrapper
{
...other props here...
public JSONResult[] Results;
...
}

--8<-----8<-------

[WebMethod]
public JSONResultWrapper GetResults(string SearchKey, string type)
{
JSONResultWrapper Jrw = new JSONResultWrapper();
.....
return Jrw;
}


--8<-----8<-------

JSON (from firebug)

{"AccommodationType":["Hotel","Apartment"],"Allocation":["Named"],"Results":[{"id":"694999631","ds":28,"dp":74,"tn" :4034,"b":3,"c":280460,"s":0,"u":0,"dd":0,"at":0,"al":0,"du":6,"ap":2,"cp":0,"r":"3*","p":"74","ip":1
,"an":"Tophotels Casino Royal","q":"s17056","dl":null,"e":1,"mo":0},{"id":"692909484","ds":28,"dp":74
,"tn":388,"b":2,"c":1701,"s":0,"u":1,"dd":1,"at":1,"al":0,"du":7,"ap":2,"cp":0,"r":"","p":"88","ip":1
,"an":"","q":"6HR1357","dl":"","e":1,"mo":0}]
}

Javascript.

--8<-----8<-------

TT.ResultCollection = function(InitValues) {

TT.ResultCollection.initializeBase(this);
......
this.Results = new Array();
.....
}


--8<-----8<-------

_onMethodComplete : function(result, userContext, methodName) {

try{
this.Results = $create(TT.ResultCollection,result);
}

--8<-----8<-------

I end up with this.Results.Results being an Object with properties, rather than an Array.

So far I have tried all sorts of types for Results ion the server but I realised that they were all serializing OK - it is the deserializing that is causing me problems.

What gives?

Cheers, all.

Have a look at http://www.microsoft.com/belux/msdn/nl/community/columns/jdruyts/wsproxy.mspx

You may need to use Jelle Druyts WSDL import modifier to fix the issue/


alternatively, have a look at the ajax-extensions converter class: http://ajax.asp.net/docs/mref/T_System_Web_Script_Serialization_JavaScriptConverter.aspx

Are there any (premade) ajax tools I can use to make a panel slide in from off screen?

I've seen a couple of tools based on animated panels, mainly acordian and other "folding" type effects.

But what I'm after is to have pannels appear from off the side of the screen.


Is there anything outhere that fits the bill or do i need to code my own?

Cheers. :)

Try the Animation extender: http://ajax.asp.net/ajaxtoolkit/Animation/Animation.aspx