or
I am using RadScheduler, but I have a little bit unusual requirements. Couple things I need to do:
Thank you
Dim dbConn As String = [get conn string] Dim query As String = "" Dim selectClause As String = "SELECT ID, AccountType " Dim fromClause As String = "FROM tbl_WIP_DATA_AccountTypes WITH (NOLOCK) " Dim whereClause As String = "WHERE Active=1 AND Deleted=0" If FilterExpression <> "" Then FilterExpression = " AND AccountType LIKE '%" & CleanForSQL(FilterExpression) & "%'" whereClause &= " " & filterExpression query = selectClause & " " & fromClause & " " & whereClause & " ORDER BY AccountType ASC" Return WIP.Data.SqlHelper.ExecuteDataset(dbConn, CommandType.Text, query).Tables(0).DefaultView
Now this works fine! Paging etc works as it should. As you can see, it's dynamic t-sql.
BUT, if the getSizes() functions calls a second function get build a generic sql statement (based on a metadata system),
Radgrid displays the records correctly, but refuses to page.
I've tested the resulting queries and they are identical.
Does anyone have any suggestions why this would not work?!
Cheers in advance,
Rich

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="WebApplication4.WebForm1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title> <script runat="server"> Sub rg_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles rg.NeedDataSource Dim dt As New System.Data.DataTable() dt.Columns.Add("Col1", GetType(String)) dt.Columns.Add("Col2", GetType(String)) For i As Integer = 0 To 10 dt.Rows.Add({"Row" & i, "Data"}) Next rg.DataSource = dt End Sub </script> <script type="text/javascript"> function callWebService() { $telerik.$.ajax({ type: 'POST', url: 'WebService1.asmx/HelloWorld', contentType: 'application/json; charset=utf-8', dataType: 'json' }); } </script></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager" runat="server"> </asp:ScriptManager> <div> <telerik:RadGrid ID="rg" runat="server" AutoGenerateColumns="true" Width="100%"> <ClientSettings> <Scrolling AllowScroll="true" ScrollHeight="281px" UseStaticHeaders="true" /> </ClientSettings> </telerik:RadGrid> <asp:Button ID="aaa" runat="server" Text="callWebService" OnClientClick="callWebService(); return false;" /> </div> </form></body></html>Imports System.Web.ServicesImports System.Web.Services.ProtocolsImports System.ComponentModel<System.Web.Script.Services.ScriptService()>Public Class WebService1 Inherits System.Web.Services.WebService <WebMethod()> _ Public Function HelloWorld() As String Return "Hello World" End FunctionEnd Class<system.webServer> <modules runAllManagedModulesForAllRequests="true"> <remove name="RadCompression" /> <add name="RadCompression" preCondition="managedHandler" type="Telerik.Web.UI.RadCompression" /> </modules> </system.webServer><telerik:GridBoundColumn SortExpression="ClientName" DataField="ClientName" HeaderText="Client Name"> <FilterTemplate> <telerik:RadComboBox ID="RadComboBoxClientName" DataTextField="ClientName" DataValueField="ClientName" AppendDataBoundItems="true" Width="150px" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("ClientName").CurrentFilterValue %>' runat="server" OnClientSelectedIndexChanged="ClientNameIndexChanged" Skin="Office2007"> </telerik:RadComboBox> <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> <script type="text/javascript"> function ClientNameIndexChanged(sender, args) { var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>"); if (args.get_item().get_value() == "0") { tableView.filter("ClientName", args.get_item().get_value(), "NoFilter"); } else { tableView.filter("ClientName", args.get_item().get_value(), "EqualTo"); } } </script> </telerik:RadScriptBlock> </FilterTemplate> <ItemStyle VerticalAlign="Top" /> </telerik:GridBoundColumn>if (inputs[0].value.length == 0) { oWindow.BrowserWindow.radalert('Please select a dashboard to upload.', 200, 100, 'Error Uploading'); return;}