Hi,
I have a problem to reload a grid with data.
In the following example I have 2 buttons to load data into a grid. Each button works fine, if I click them first, but didn't work with the second click.
I want to delete the first result with the second button, and show the second result. A simple reloading of data.
How can I do this?
Bodo
//
var _data1 = [{ "cola1": "a1", "cola2": "a2" }, { "cola1": "a3", "cola2": "a4" }]; var _data2 = [{ "colb1": "b1", "colb2": "b2" }, { "colb1": "b3", "colb2": "b4" }];
function getData1() { $("#idGrid").empty(); $("#idGrid").igGrid({dataSource: _data1}); $("#idGrid").igGrid("dataBind"); } function getData2() { $("#idGrid").empty(); $("#idGrid").igGrid({ dataSource: _data2 }); $("#idGrid").igGrid("dataBind"); } // ]]>