Hi everyone,
I am trying to create a kendo dropdownlist that binds to a datasource from a web service.
Since I want to reduce the size of the sent data, I decide to use dictionary<string, string> instead of a class that has properties for the select name and value.
However, I got a bit stuck on the mapping part since the dictionary<string, string> will convert to Json string as { "value1" : "name1", "value2" : "name2", ...}, hence javascript will see value{n} as properties and name{n} as their values instead of pairs of two separate value.
Bottom line is that I would like to convert these pairs of values into datasource fields "name", and "value". What would be the best way to tackle this?
Thank you,
Patt
I am trying to create a kendo dropdownlist that binds to a datasource from a web service.
Since I want to reduce the size of the sent data, I decide to use dictionary<string, string> instead of a class that has properties for the select name and value.
However, I got a bit stuck on the mapping part since the dictionary<string, string> will convert to Json string as { "value1" : "name1", "value2" : "name2", ...}, hence javascript will see value{n} as properties and name{n} as their values instead of pairs of two separate value.
Bottom line is that I would like to convert these pairs of values into datasource fields "name", and "value". What would be the best way to tackle this?
Thank you,
Patt