private void OnDataSourceLoadedData(object sender, Telerik.Windows.Controls.DataServices.LoadedDataEventArgs e)
        {
            if (e.HasError)
            {
                e.MarkErrorAsHandled();
                this.txtDebug.Text = string.Format("<-- Server returned the following error: {0}\r\n"
                                                   , e.Error);
            }
            else if (e.Cancelled)
            {
                this.txtDebug.Text = string.Format("<-- Load operation was cancelled\r\n");
            }
            else
            {
                this.txtDebug.Text += "<-- Server replied in {0} ms\r\n";
            }

            // this value set at whatever value is specified in 'PageSize' xml element
            // if less than the total number of rows
            // i believe this is wrong!
            // Fixed in the service side. Thanks Diego.
            // http://www.telerik.com/forums/raddatapager-not-loading-all-records-when-loading
            // http://www.telerik.com/forums/raddatapager-displays-just-one-page
            var totalCount = e.TotalEntityCount;
        }
示例#2
0
        private void paisesDataSource_LoadedData(object sender, Telerik.Windows.Controls.DataServices.LoadedDataEventArgs e)
        {
            if (e.HasError)
            {
                e.MarkErrorAsHandled();
                this.statusInfo.Text = string.Format("Error: {0}", e.Error.Message);
            }
            else if (e.Cancelled)
            {
                this.statusInfo.Text = string.Format("Load operation was cancelled.");
            }
            else
            {
                this.statusInfo.Text = "Server is content!";

                //this.paisesDataPager.IsEnabled = true;
            }
        }
 private void OnItemsLoaded(object sender, Telerik.Windows.Controls.DataServices.LoadedDataEventArgs e)
 {
     this.Items.LoadedData      -= this.OnItemsLoaded;
     this.Items.PropertyChanged += this.OnItemsPropertyChanged;
     this.IsBusy = false;
 }