This is a migrated thread and some comments may be shown as answers.

Same Grid With different datasource on event

3 Answers 239 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Engifaar
Top achievements
Rank 1
Engifaar asked on 02 Jun 2012, 09:26 AM
Hello Friends,
I have single kendoGrid on my webpage(HTML)  where i have assign remote datasource.It is working fine. Now i want to change that datasource on every onkeydown event of input tag... But the problem is.. when i assign different datasource to same kendoGrid.. it show me old datasource data with new one..... 

Thank You in advance... please help me out

3 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 05 Jun 2012, 02:23 PM
Hello Deepak,

I am not sure if I understand you correctly, because by design it is not possible to change the dataSource of the Kendo UI Grid. You could only change the dataSource records via its data() method, but not the other configuration options such as model of the schema. In case I missed something, please provide more details about scenario you are trying to implement.

 

Regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Engifaar
Top achievements
Rank 1
answered on 08 Jun 2012, 05:43 AM
Sorry lliana, for late reply. My idea was to reassign same kendo-grid with different datasource on user select event. The issue i was facing was to remove all the column from kendo-grid before reassigning new datasource.

I was able to resolve it by adding..

<HTML>....<div id="test"></div>....<HTML>

<script>
    $("#test").empty();
    $("#test").kendoGrid({});
</script>


But now i want to get only unique value (distinct value) from datasource on filter 

For example, we can return record of match row using this,
 var dataSourceNew: dataSourceold.filter([{
        field: "StudentID",
        operator: "eq",
        value: StudentID
    }]),


But if want to see all Student with same name?

Thank You for reply..
Deepak Kumar Singh

0
Iliana Dyankova
Telerik team
answered on 12 Jun 2012, 01:48 PM
Hi Deepak,

I am not sure if I understand your scenario correctly. Could you please provide some more details or better yet send a small but runnable project that could be examined in details? This way I will be able to advice you further. Thank you in advance.

 

Kind regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Data Source
Asked by
Engifaar
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Engifaar
Top achievements
Rank 1
Share this question
or