This question is locked. New answers and comments are not allowed.
Hi,
I have a Grid that works OK when I first show it. But when I try to change the Datasource with myGrid.dataSource.data(ds) it does not work.
When "ds" is a simple json object containing a simple list of objects the Grid is updated correctly, but when "ds" is a dataSource with oher config parameters defined, the grid is cleared, as the datasource had no record.
How can I solve it, will I have to destroy the Grid and create it again ???
Can you help me. ???
I have a Grid that works OK when I first show it. But when I try to change the Datasource with myGrid.dataSource.data(ds) it does not work.
When "ds" is a simple json object containing a simple list of objects the Grid is updated correctly, but when "ds" is a dataSource with oher config parameters defined, the grid is cleared, as the datasource had no record.
How can I solve it, will I have to destroy the Grid and create it again ???
Can you help me. ???
I had one ajax call that returned 4 different data sets. I would then create a DataSource for each of those data sets:
ds1 =
new
kendo.data.DataSource({
data: dataFromAjax.Summary,
... other setup here ...
});
I would then replace the grid dataSource with that and call refresh:
myGrid.dataSource = ds1;
myGrid.refresh();
That did not work. The missing step is you still need to call read on the dataSource:
myGrid.dataSource = ds1;
ds1.read();
myGrid.refresh();
That worked for me, maybe that will help you out.
Gary
if you want to manually set it.
Or you could do this:
to re-read from server...
Hi,
It really worked thanks. When I execute this:
dsAtivos.getObject().read();
dsAtivos.getObject().refresh();
The Grid is updated but another problem occured whith the pagination. When I first show the Grid the pagination works perfectly but after the update above when I try to move to a different page I receive the error:
Microsfot JScript runtime error: DOM Exception: NOT_FOUND_ERROR (8)
And an error is maked ant kendo.min.all here:
c.table[0].replaceChild(i,c.tbody[0])
Hiow can I solve this ?
Thanks in advance
$.ajaxSetup({ cache: false });
I need an urgent help.
As I told you I can refresh the grid but a problem occured whith the pagination. When I first show the Grid the pagination works perfectly but after the update when I try to move to a different page I receive the error:
Microsfot JScript runtime error: DOM Exception: NOT_FOUND_ERROR (8)
And an error is maked ant kendo.min.all here:
c.table[0].replaceChild(i,c.tbody[0])
But I have discovered that the same error occurs when I try to sort a column of the grid.
Please, you developers from Telerik, this is really urgent. I cannot use the grid like this. I need your help.
Thanks
Gary
I am having a lot of problems trying to reinitialise the datagrid when the datasource has changed.
For example, I have a component that creates the dataset on 1 tab, and the DevX grid on the other.
It works fine the first time it is used, but I want to be able to change the query and subsequent dataset and completely rejig the grid accordingly. I thought this would be simple but it is proving to be difficult. Please prove me wrong.
As an example is say I have a query that outputs 2 rows of data:
Select TEST.NAME, TEST.DESCRIPTION, TEST.OCCUPATION
From TEST
Then I go back and change the query to:
Select TEST.NAME, TEST.DESCRIPTION
From TEST
and reset the datasource, the occupation column is still present on the grid, with no data.
I am setting the grid's datasource in this way:
adapter.Fill(dataset, "QueryResult")
dvxDataGrid.DataSource = dataset.Tables("QueryResult")
I have tried everything I can think off from:
dvxDataGrid.MainView.LayoutChanged()
dvxDataGrid.MainView.BeginInit()
dvxDataGrid.MainView.PopulateColumns()
dvxDataGrid.MainView.RefreshData()
dvxDataGrid.ForceInitialize()
dvxDataGrid.DataSource = Nothing before reset
dvxDataGrid.Dispose()
.etc. etc. in a variety of configurations with no luck...
Any help would be much appreciated? Do I need to build a completely new view?
Plans for a Chicken Coop