user1671219
user1671219

Reputation: 413

Jqgrid not displaying single row

The below given string is not getting displayed on my jqgrid

    {"assignfix":{"sno":"1","fix":"Se2","templateName":"Restroom","profile":{"id":"11","name":"Restroom"}}}

But when I insert this

 {"assignfix":[{"sno":"1","fix":"Sef2","templateName":"Restroom","profile":{"id":"11","name":"Restroom"}}]}

It gets displayed properly , it is the problem with single row only.

Upvotes: 0

Views: 187

Answers (1)

Oleg
Oleg

Reputation: 221997

You don't posted the definition of jqGrid which you use where the jsonReader or xmlReader are important to know. In general I think you answered yourself indirectly on your question. If the value of assignfix property should be array you should post the data as an array event if the array has one element or if it has no elements. It should be still array.

Upvotes: 1

Related Questions