Hi,
In my cshtml, I have this code:
<
table id="grid1"></table>
I want to use javascript to bind the grid:
script type="text/javascript">
$(
$('#DistID').change(function () {
var selectedId = $(this).val();
autoGenerateColumns:
false,
'#grid1').igGrid({
columns: [
{ headerText:
"Order Number", Key: "OrderId", dataType: "number"
}
],
width:
'500px',
dataSource: dSource
});
</script>
And this is my Json data:
[{\"OrderId\" : \"300210\"},{\"OrderId\" : \"300140\"}
I don't why the grid does not display any data. Am I missing something? Can you please help me? Thanks!
maybe you should change "Key" to "key" (lowercase). Hope it helps
Angel
Tried it but did not work? What else can it be?