or
ToolsFile="~/BasicTools.xml"
When used I can select from different fonts.
But I would like to set a Font (Verdana) as standard and size 13px as standard size. How do I do that?
new ajax_error('System.InvalidOperationException','Page cannot be null. Pleaseensure that this operation is being performed in the context of an ASP.NET request.',0)
Here is the code snippet
| Dim sb As New StringBuilder |
| Dim sw As New System.IO.StringWriter(sb) |
| Dim hw As New HtmlTextWriter(sw) |
| Dim ddlCountries As New Telerik.Web.UI.RadComboBox |
| ddlCountries.ID = "ddlCountries" |
| Dim loc As New Frokht.Location |
| Dim dr As Data.SqlClient.SqlDataReader |
| dr = loc.GetAllCountries() |
| ddlCountries.DataSource = dr |
| ddlCountries.DataTextField = "Name" |
| ddlCountries.DataValueField = "Code" |
| ddlCountries.DataBind() ddlCountries.RenderControl(hw) |
Please help
Thanks in advance
| [WebMethod] |
| public DataSet GetCatalogKeywords(string searchTerm) |
| { |
| //Build the SqlCilent Objects we need |
| SqlConnection conn = new SqlConnection("server=192.168.0.52; database=MyDatabase; User Id=sa; Password=MyPassword"); |
| SqlCommand cmd = new SqlCommand(); |
| //SqlDataAdapter to populate our DataSet |
| SqlDataAdapter adapter = new SqlDataAdapter(); |
| //DataSet to hold the users information |
| DataSet dsInfo = new DataSet(); |
| //String to hold our stored procedure |
| const string query = "WebserviceKeySearch"; |
| //try...catch block to handle any unhandeled exceptions |
| try |
| { |
| //set our SqlCommands Objects |
| cmd.CommandText = query; |
| cmd.CommandType = CommandType.StoredProcedure; //tell it its a Stored Procedure we're executing |
| cmd.Parameters.AddWithValue("@searchTerm", searchTerm); |
| cmd.Connection = conn; |
| adapter.SelectCommand = cmd; |
| //fill our DataSet |
| //using the Fill Method of |
| //the SqlDataAdapter |
| adapter.Fill(dsInfo); |
| //return the DataSet to the calling aspx page |
| return dsInfo; |
| } |
| catch (Exception ex) |
| { |
| System.Web.HttpContext.Current.Response.Write(ex.Message); |
| return null; |
| } |
| finally |
| { |
| } |
| } |
SELECT distinct display_term, sum(document_count) AS HitCount
FROM
sys.dm_fts_index_keywords
(DB_ID('Hezelbase'), OBJECT_ID('Regeling')) where display_term like @searchTerm + '%' group by display_term order by display_term
|
| <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %> |
| <!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> |
| <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" /> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> |
| <Scripts> |
| <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> |
| <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> |
| </Scripts> |
| </telerik:RadScriptManager> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
| </telerik:RadAjaxManager> |
| <telerik:RadScriptBlock ID="rsbc" runat="server"> |
| </telerik:RadScriptBlock> |
| <div> |
| <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1"> |
| <telerik:RadComboBox ID="RadComboBox1" runat="server" Width="330px" Height="150px" DropDownWidth="420px" |
| EmptyMessage="Zoeken..." EnableLoadOnDemand="True" ShowMoreResultsBox="false" HighlightTemplatedItems="true" ShowDropDownOnTextboxClick="false" |
| ShowToggleImage="false" ShowWhileLoading="false" AccessibilityMode="true" CloseDropDownOnBlur="true" LoadingMessage="" |
| OpenDropDownOnLoad="false" EnableVirtualScrolling="false" OnItemsRequested="RadComboBox1_ItemsRequested"> |
| <ItemTemplate> |
| <table style="width: 325px" cellspacing="0" cellpadding="0"> |
| <tr> |
| <td style="width: 200px;"> |
| <%# DataBinder.Eval(Container, "Text")%> |
| </td> |
| <td style="width: 100px; color:Green;"> |
| <%# DataBinder.Eval(Container, "Attributes['HitCount']")%> |
| </td> |
| </tr> |
| </table> |
| </ItemTemplate> |
| </telerik:RadComboBox> |
| </telerik:RadAjaxPanel> |
| </div> |
| </form> |
| </body> |
| </html> |
| using System; |
| using System.Data; |
| using HezelbaseWebService; |
| using Telerik.Web.UI; |
| public partial class Default : System.Web.UI.Page |
| { |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| } |
| private void fillCahceFromService() |
| { |
| Service1 s = new Service1(); |
| DataSet ds = s.GetCatalogKeywords("%"); |
| Cache["Webservicedata"] = ds; |
| } |
| protected void RadComboBox1_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e) |
| { |
| RadComboBox combo = (RadComboBox)o; |
| if(Cache["Webservicedata"] == null || Cache["Webservicedata"].GetType() != typeof(DataSet)) |
| { |
| fillCahceFromService(); |
| } |
| if (e.Text.Length > 1) |
| { |
| DataSet ds = (DataSet)Cache["Webservicedata"]; |
| if (ds != null && ds.Tables.Count > 0) |
| { |
| DataRow[] dataRows = ds.Tables[0].Select("display_term like '" + e.Text + "%'"); |
| foreach (DataRow dataRow in dataRows) |
| { |
| RadComboBoxItem item = new RadComboBoxItem(); |
| string HitCount = dataRow["HitCount"].ToString(); |
| item.Text = (string)dataRow["display_term"]; |
| item.Attributes.Add("HitCount", HitCount + " results"); |
| combo.Items.Add(item); |
| item.DataBind(); |
| } |
| } |
| } |
| } |
| } |
PageSize
="100" AllowPaging="true"
<
PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric" Position="Bottom" />
When i bind a datasource with more than 100 items, the pager is shown correctly.
When i downgrade to Q3 2009 it works correctly.
| Design: |
| <asp:ScriptManager ID="script1" runat="server" EnablePartialRendering="true"></asp:ScriptManager> |
| <telerik:RadGrid ID="grid1" runat="server" AllowPaging="true" PagerStyle-AlwaysVisible="true" PageSize="5"> |
| <MasterTableView AutoGenerateColumns="true"></MasterTableView> |
| </telerik:RadGrid> |
| Code: |
| Dim list As New Generic.List(Of String) |
| For i As Integer = 0 To 1 ' Change this to 5 to see the pager... |
| list.Add(i.ToString) |
| Next |
| grid1.DataSource = list |
| grid1.DataBind() |
Falk
| <body> |
| <form id="form1" runat="server"> |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server" |
| EnableTheming="True"> |
| </telerik:RadScriptManager> |
| <div> |
| <telerik:RadComboBox ID="RadComboBox1" Runat="server" |
| DataSourceID="SqlDataSource1" DataTextField="Name" DataValueField="No" |
| MarkFirstMatch="True" |
| CssClass="RadComboBoxDropDown_Default" Height="100%"> |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
| </telerik:RadComboBox> |
| <asp:SqlDataSource ID="SqlDataSource1" runat="server" |
| ConnectionString="<%$ ConnectionStrings:XXXXXConnectionString %>" |
| onselecting="SqlDataSource1_Selecting" |
| SelectCommand="sproc_XXXXX" |
| SelectCommandType="StoredProcedure"> |
| <SelectParameters> |
| <asp:Parameter DefaultValue="XXX" Name="prmXXX1" Type="String" /> |
| <asp:Parameter DefaultValue="XXX" Name="prmXXX2" |
| Type="String" /> |
| </SelectParameters> |
| </asp:SqlDataSource> |
| </div> |
| </form> |
| </body> |