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

Problem on client function get__dataItems()

1 Answer 46 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Maurizio
Top achievements
Rank 1
Maurizio asked on 04 Feb 2013, 09:50 AM
Hi, 
I've tried to bind a radgrid using jquery. On the first databind of the grid the desired rows have been shown without problems, from the second databind the grid has correcly set the datasource but it always displays "No records to display" message.
Debuggin the code I've found this function:
get_dataItems:function(){if(this._dataItems.length>0||(this._cachedItems&&this._cachedItems.length>0)){return this._dataItems; ....

The function is not correct because returns always the dataitems and It not considers the cachedItems. In my case the dataItmes is always empty from the second databind on the other hand the cachedItems is set.

this is my code to bind the grid:

function bindGridView(result) {
            var masterTable = $find("<%= Grid.ClientID %>").get_masterTableView();
            masterTable.set_dataSource(result.Dia);
            try {
                masterTable.dataBind();
            }
            catch (e) {
                alert(e);
            }
        }

There is a workaround to fix this behaviour?

Thanks,

Maurizio

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 07 Feb 2013, 06:59 AM
Hi Maurizio,

I tried to reproduce the described issue but to no avail. On this link you could find an online example which demonstrates the described approach, however everything works as expected. Please check the example and let me know what differs in your case. Also it will be helpful if you could post your aspx page markup code with the related code behind file. Thus we will be able to gather more details about your scenario and provide you with more to-the-point answer.

Looking forward for your reply.

All the best,
Radoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Maurizio
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or