hi,
I have jquery ajax code returning a json serialized string like this one:
and I want to fill it in rad grid data source, so I am doing this:
((note my javascript code is in another .js file and I am embedding it in my aspx page))
and this is the rad grid:
when I click a button to load my rad grid, it takes some time (this time is calculated after returning the string from my server and I got sometimes error message from firefox says this script takes long time and it ask me if I want to stop it), and then I got all grid fields are empty, and paging is not working too !
please see the snapshot:
I have jquery ajax code returning a json serialized string like this one:
{"":[{"serviceId":"Recording","errorDesc":"Function: BeginMonitoring();Microphone has been disconnected or is not available while trying to start record in Computer: khaled-pc","DATE_in":"02/Oct/2012","Time_in":"08:17"},{"serviceId":"Recording","errorDesc":"Function: BeginMonitoring();Microphone has been disconnected or is not available while trying to start record in Computer: khaled-pc","DATE_in":"02/Oct/2012","Time_in":"08:18"},{"serviceId":"Recording","errorDesc":"waveIn_RecordingStopped;USB microphone has been unpluged by force while microphone is recording.","DATE_in":"02/Oct/2012","Time_in":"08:20"},{"serviceId":"Recording","errorDesc":"Function: BeginMonitoring();Microphone has been disconnected or is not available while trying to start record in Computer: khaled-pc","DATE_in":"02/Oct/2012","Time_in":"08:21"},{"serviceId":"Recording","errorDesc":"Function: BeginMonitoring();Microphone has been disconnected or is not available while trying to start record in Computer: khaled-pc","DATE_in":"02/Oct/2012","Time_in":"08:21"},{"serviceId":"Recording","errorDesc":"waveIn_RecordingStopped;USB microphone has been unpluged by force while microphone is recording.","DATE_in":"02/Oct/2012","Time_in":"08:30"},{"serviceId":"Recording","errorDesc":"Function: BeginMonitoring();Microphone has been disconnected or is not available while trying to start record in Computer: khaled-pc","DATE_in":"02/Oct/2012","Time_in":"08:35"},{"serviceId":"Recording","errorDesc":"Function: BeginMonitoring();Microphone has been disconnected or is not available while trying to start record in Computer: khaled-pc","DATE_in":"02/Oct/2012","Time_in":"08:46"},{"serviceId":"Recording","errorDesc":"waveIn_RecordingStopped;USB microphone has been unpluged by force while microphone is recording.","DATE_in":"02/Oct/2012","Time_in":"09:30"},{"serviceId":"Transferring","errorDesc":"IsFileLocked Function;The file recorded in: 02/Oct/2012 at: 12:27 has been deleted or renamed from machine: khaled-pc","DATE_in":"02/Oct/2012","Time_in":"13:44"},{"serviceId":"Transferring","errorDesc":"IsFileLocked Function;The file recorded in: 02/Oct/2012 at: 13:27 has been deleted or renamed from machine: khaled-pc","DATE_in":"02/Oct/2012","Time_in":"14:44"},{"serviceId":"Transferring","errorDesc":"IsFileLocked Function;The file recorded in: 02/Oct/2012 at: 13:27 has been deleted or renamed from machine: khaled-pc","DATE_in":"02/Oct/2012","Time_in":"14:46"},{"serviceId":"Recording","errorDesc":"waveIn_RecordingStopped;USB microphone has been unpluged by force while microphone is recording.","DATE_in":"02/Oct/2012","Time_in":"16:34"},{"serviceId":"Recording","errorDesc":"waveIn_RecordingStopped;USB microphone has been unpluged by force while microphone is recording.","DATE_in":"03/Oct/2012","Time_in":"09:04"},{"serviceId":"Recording","errorDesc":"waveIn_RecordingStopped;USB microphone has been unpluged by force while microphone is recording.","DATE_in":"03/Oct/2012","Time_in":"14:15"},{"serviceId":"Recording","errorDesc":"waveIn_RecordingStopped;USB microphone has been unpluged by force while microphone is recording.","DATE_in":"03/Oct/2012","Time_in":"14:33"},{"serviceId":"Recording","errorDesc":"waveIn_RecordingStopped;USB microphone has been unpluged by force while microphone is recording.","DATE_in":"03/Oct/2012","Time_in":"14:40"},{"serviceId":"Recording","errorDesc":"waveIn_RecordingStopped;USB microphone has been unpluged by force while microphone is recording.","DATE_in":"03/Oct/2012","Time_in":"17:06"},{"serviceId":"Transferring","errorDesc":"The recorded file on: 02/Oct2012 at: 13:/O has been deleted by force, the deleted file is:LARC_1_20121002_1441.mp3","DATE_in":"03/Oct/2012","Time_in":"09:29"}]}and I want to fill it in rad grid data source, so I am doing this:
((note my javascript code is in another .js file and I am embedding it in my aspx page))
var rdScreenings = $telerik.$("[id$='rdScreenings']").attr("id");var rdScreenings111 = $find(rdScreenings);var tableView1 = rdScreenings111.get_masterTableView();tableView1.set_dataSource(res);//res is the serialized string...
tableView1.dataBind();and this is the rad grid:
<telerik:RadGrid ID="rdScreenings" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CssClass="ScreeningListControl" GridLines="None"> <PagerStyle NextPageText="View more locations" /> <MasterTableView> <RowIndicatorColumn> <HeaderStyle Width="20px" /> </RowIndicatorColumn> <ExpandCollapseColumn> <HeaderStyle Width="20px" /> </ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="serviceId" HeaderText="Service Name" /> <telerik:GridBoundColumn DataField="errorDesc" HeaderText="Error Description" /> <telerik:GridBoundColumn DataField="DATE_in" HeaderText="Checking Date" /> <telerik:GridBoundColumn DataField="Time_in" HeaderText="Checking Time" /> </Columns> </MasterTableView> <ClientSettings> <ClientEvents OnCommand="RadGrid_OnCommand" /> </ClientSettings></telerik:RadGrid>when I click a button to load my rad grid, it takes some time (this time is calculated after returning the string from my server and I got sometimes error message from firefox says this script takes long time and it ask me if I want to stop it), and then I got all grid fields are empty, and paging is not working too !
please see the snapshot: