Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
96 views
I am trying to use the demo code from this page:
http://demos.telerik.com/aspnet-ajax/spell/examples/googlespell/defaultvb.aspx

I have created a new project in VS2010 and added a new item (DefaultVB.aspx).

I then copied the entire aspx code and vb code into the respective files.  I did remove the code not needed:
<%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %>
<%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
<%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %>
 
<qsf:HeadTag runat="server" ID="Headtag1"></qsf:HeadTag>
 
<qsf:Header ID="Header1" runat="server" NavigationLanguage="VB"></qsf:Header>
 
<qsf:Footer ID="Footer1" runat="server"></qsf:Footer>

I am getting an error message from VS (and the project won't build).  The error is:
'RadSpell1' is not declared.  It may be inaccessible due to its protection level. on Line 22

This is that code block (which includes the line causing the error:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
        RadSpell1.SpellCheckProviderTypeName = _
       GetType(GoogleSpellCheckProvider).AssemblyQualifiedName
End Sub

Any advice on what I am doing wrong?

Thanks,

LJ
Rumen
Telerik team
 answered on 17 Nov 2010
2 answers
294 views
I'd like to access the word count from RadEditor programmatically; preferably from the server-side. I've searched the Telerik website and saw refernences to "RadEditorStatistics word count", but as far as I could see, this only makes a word count visible to the user. Can someone direct me how to access this count from within the API?

Thanks
jeff bowder
Top achievements
Rank 1
 answered on 17 Nov 2010
0 answers
63 views
Hi,

I am unable to centralize the text in all of my RadNumericTextBoxes found in my RadGrid. Only the text in the first column is centralized. Attached is an image that could help explain what I am referring to. Please, can someone help! Unfortunately, I can't attach a word document.

I dynamically create RadGrid that includes a couple of columns that have RadNumericTextBox. All the columns are templateColumn sand below is some of the code I used.

 I followed hints provided in this link http://www.telerik.com/help/aspnet/grid/grdprogrammaticcreation.html  under

(Creating ItemTemplate/EditItemTemplate of GridTemplateColumn programmatically)


Never mind folks I resolved my issue by critically looking at the code in the above link and making necessary changes.

Jeffrey
Top achievements
Rank 1
 asked on 17 Nov 2010
24 answers
864 views
Where do I download the SharePoint 2010 RadEditor WSP files? I can't find any download link on the download pages nor can I find the WSPs after installing the latest RadControls.

This article describes the installation:

Installing RadEditor & RadGrid Web Parts on SharePoint 2010
http://www.telerik.com/help/aspnet-ajax/installing_radeditor__radgrid_web_parts_on_sharepoint_2010.html
Cyrus
Top achievements
Rank 1
 answered on 17 Nov 2010
2 answers
99 views
Hi,

I got another problem when using Telerik RadFilter control. On the Web page, I added a button under the filter. When the button is clicked, I display the expressions in a string (similar to the Preview function, but I disabled the preview function in order to allow the user to edit the string). I tested and my function works fine, but got some problem with the value of the filter expressions.

From UI, I added an Contains expression, selected "PersonName" as the field, entered the value "test", and then clicked my button, it showed "(PersonName Contains '')"  without the string "test". I ran the code in DEBUG mode and found that the Value of the RadFilterContainsFilterExpression is NULL, the string "test" is not posted back to the server.

If I set the AllowFilterOnBlur property to false, all the values I entered are not posted back to the server. If I set the AllowFilterOnBlur property to true, only the last value I enterred is not posted back to the server.

How can I make the value posted to the server? Please help.

Many thanks

Bruce
Bruce
Top achievements
Rank 1
 answered on 17 Nov 2010
3 answers
145 views
Hi,

I am replacing an old control suite with Telerik and the intention initially is to replace like for like with the functionality.

I have a RadGrid that is using a RadAjaxManager to control the ajax postback to display and hide hierarchy data.

In the DetailTable (inner part of hierarchy) I have a command that will postback to check what security the user has and if they have appropriate authorisation the page will fire Javascript to open a window, passing some query string variables set during the postback processing.

The problem I have is that with the AJAX enabled, when I click the command the loading panel fires and then a Javascript error appears, but no popup window.  Below is a simplified attempt at registering javascript which does not work.  This approach seemed to have been recommended elsewhere on the net.

RadScriptManager.RegisterStartupScript(Page, GetType(), "test", "alert('test');", true);

Error message from IE:
Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object.

Could anyone advise how I can fire Javascript during an ajax enabled partial page postback?

Thanks for your help,

Matt
MPatt
Top achievements
Rank 1
 answered on 17 Nov 2010
1 answer
89 views
In IE, the FormatBlock displays selected headings correctly by showing Heading 1, Heading 2, etc. if an h1 or h2 are selected.  In Firefox and Chrome, when you select an h1 or h2 it displays "h1" or "h2" as the FormatBlock selected valued.  Shouldn't the FormatBlock show the predefined options if their element is selected?
Rumen
Telerik team
 answered on 17 Nov 2010
5 answers
219 views
Hello.
I've created my own CommandItemTemplate and put some custom buttons there, but I still want the caption of mastertableview to be placed in the same TD as buttons, with custom CSS style. How to manage this? Right only I indicate Caption property - radgrid adds additional TR above my command item template with caption centered :(

p.s. How to add custom attribute to MasterTableView? I've inherited from GridTableView. But seems like the same approach with public properties and saving in ControlState that worked out for RadGrid does not work here - setter for new property is not called :(

[ToolboxData("<{0}:DSGridTableView runat=server></{0}:DSGridTableView>")]
public class DSGridTableView : GridTableView
{
    public DSGridTableView()
    {
    }
    public DSGridTableView(RadGrid owner)
        : base(owner)
    {
    }
    //public new string Caption
    //{
    //    get
    //    {
    //        return string.Empty;
    //    }
    //}
    [DefaultValueAttribute("")]
    [PersistenceMode(PersistenceMode.Attribute)]
    public string Title
    {
        get
        {
            return (ControlState["Title"] == null ? string.Empty : (string)ControlState["Title"]);
        }
        set
        {
            ControlState["Title"] = value;
        }
    }
    [DefaultValueAttribute("")]
    [PersistenceMode(PersistenceMode.Attribute)]
    public string TitleCssClass
    {
        get
        {
            return (ControlState["TitleCssClass"] == null ? string.Empty : (string)ControlState["TitleCssClass"]);
        }
        set
        {
            ControlState["TitleCssClass"] = value;
        }
    }
}
Dimo
Telerik team
 answered on 17 Nov 2010
3 answers
91 views

My radgrid editors are not working when Radgrid is on a user control that's loaded dynamically. I tested the code on a Radgrid that's loaded from a normal page it works without any problem but would not would when loaded from user control. here is the code:

 

<%

@ Control Language="VB" AutoEventWireup="false" CodeFile="Licenses.ascx.vb" Inherits="Prospects_Content_Licenses" %>

 

<%

@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" AllowMultiRowSelection="True"

 

 

 

 

 

Skin="Vista" AllowAutomaticDeletes="True"

 

 

AllowAutomaticInserts="True" Width="800px" PageSize="100" AllowAutomaticUpdates="True"

 

 

 

 

 

AllowPaging="True" OnItemUpdated="Radgrid1_ItemUpdated" OnItemDeleted="Radgrid1_ItemDeleted"

 

 

 

 

 

OnItemInserted="Radgrid1_ItemInserted"

 

 

 

 

 

DataSourceID="EmployeeLicensesListDS" GridLines="None">

 

 

 

 

 

<MasterTableView autogeneratecolumns="False" datakeynames="EmployeeID,LicenseListID" CommandItemDisplay="Top"

 

 

datasourceid="EmployeeLicensesListDS">

 

 

 

 

 

<RowIndicatorColumn>

 

 

 

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

 

 

 

</RowIndicatorColumn>

 

 

 

 

 

<ExpandCollapseColumn>

 

 

 

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

 

 

 

</ExpandCollapseColumn>

 

 

 

 

 

<Columns>

 

 

 

 

 

<telerik:GridEditCommandColumn ButtonType="ImageButton"

 

 

CancelImageUrl="../../Img/Cancel.gif" EditImageUrl="../../Img/Edit.gif"

 

 

InsertImageUrl="../../Img/Insert.gif" UpdateImageUrl="../../Img/Update.gif">

 

 

 

 

 

<HeaderStyle Width="20px" />

 

 

 

 

 

</telerik:GridEditCommandColumn>

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="EmployeeID" DataType="System.Int32" visible="false"

 

 

HeaderText="EmployeeID" SortExpression="EmployeeID" UniqueName="EmployeeID" ReadOnly="True" >

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="LicenseListID" DataType="System.Int32" visible="false"

 

 

 

 

 

HeaderText="LicenseListID" ReadOnly="True" SortExpression="LicenseListID"

 

 

UniqueName="LicenseListID">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="Description"

 

 

HeaderText="License Description" SortExpression="Description" UniqueName="Description">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

<telerik:GridDropDownColumn DataField="LicenseState"

 

 

HeaderText="License State" SortExpression="LicenseState" DropDownControlType="RadComboBox"

 

 

 

 

 

DataSourceID="tblStateDS" ListValueField="StateCode" ListTextField="StateName"

 

 

 

 

 

UniqueName="LicenseState">

 

 

 

 

 

</telerik:GridDropDownColumn>

 

 

<telerik:GridBoundColumn DataField="LicenseCategoryIDDescription"

 

 

HeaderText="License Category Description" SortExpression="LicenseCategoryIDDescription" UniqueName="LicenseCategoryIDDescription">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="LicenseID"

 

 

HeaderText="License ID" SortExpression="LicenseID" UniqueName="LicenseID">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

<telerik:GridDropDownColumn DataField="LicenseStatus"

 

 

HeaderText="License Status" SortExpression="LicenseStatus" DropDownControlType="RadComboBox"

 

 

 

 

 

DataSourceID="tblStatusDS" ListValueField="StatusID" ListTextField="Description"

 

 

 

 

 

UniqueName="LicenseStatus">

 

 

 

 

 

</telerik:GridDropDownColumn>

 

 

<telerik:GridDateTimeColumn DataField="ExpirationDate" DataType="System.DateTime" PickerType="DatePicker"

 

 

 

 

 

HeaderText="License Expiration Date" ReadOnly="False" SortExpression="ExpirationDate"

 

 

UniqueName="ExpirationDate" DataFormatString="{0:d}">

 

 

</telerik:GridDateTimeColumn>

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="AddedBy" HeaderText="Added By"

 

 

ReadOnly="True" SortExpression="AddedBy" UniqueName="AddedBy">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="DateAdded" DataType="System.DateTime"

 

 

HeaderText="Date Added" ReadOnly="True" SortExpression="DateAdded"

 

 

UniqueName="DateAdded" DataFormatString="{0:d}">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="LastUpdatedBy" HeaderText="Last Updated By"

 

 

ReadOnly="True" SortExpression="LastUpdatedBy" UniqueName="LastUpdatedBy">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="LastUpdatedDate" DataType="System.DateTime"

 

 

HeaderText="Last Updated Date" ReadOnly="True" SortExpression="LastUpdatedDate"

 

 

UniqueName="LastUpdatedDate" DataFormatString="{0:d}">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

</Columns>

 

 

 

 

 

<CommandItemSettings AddNewRecordText="Add License" />

 

 

 

 

 

<EditFormSettings CaptionDataField="LicenseListID"

 

 

CaptionFormatString="Edit Properties of License ID: {0}" ColumnNumber="3">

 

 

 

 

 

<FormTableItemStyle Wrap="False" />

 

 

 

 

 

<FormMainTableStyle BackColor="White" CellPadding="3" CellSpacing="0" BorderColor="Aquamarine" BorderWidth="2px"

 

 

 

 

 

GridLines="Horizontal" />

 

 

 

 

 

<FormCaptionStyle Font-Bold="True" Font-Size="Small" HorizontalAlign="Center" />

 

 

 

 

 

<FormTableStyle BackColor="White" CellPadding="2" CellSpacing="0"

 

 

Height="110px" Width="210px" />

 

 

 

 

 

<FormTableAlternatingItemStyle Wrap="False" />

 

 

 

 

 

<FormStyle Width="1%" />

 

 

 

 

 

<EditColumn ButtonType="ImageButton" CancelImageUrl="../../Img/Cancel.gif"

 

 

CancelText="Cancel edit" EditImageUrl="../../Img/Edit.gif"

 

 

InsertImageUrl="../../Img/Insert.gif" InsertText="Insert License"

 

 

UniqueName="EditCommandColumn1" UpdateImageUrl="../../Img/Update.gif"

 

 

UpdateText="Update License">

 

 

 

 

 

</EditColumn>

 

 

 

 

 

<FormTableButtonRowStyle HorizontalAlign="Right" />

 

 

 

 

 

<PopUpSettings ScrollBars="None" />

 

 

 

 

 

</EditFormSettings>

 

 

 

 

 

</MasterTableView>

 

 

 

 

 

<FilterMenu EnableTheming="True">

 

 

 

 

 

<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

 

 

 

 

</FilterMenu>

 

 

 

 

 

</telerik:RadGrid>

 

 

 

 

 

<asp:SqlDataSource ID="EmployeeLicensesListDS" runat="server" OnInserting="setDefaultColumns" OnUpdating="setDefaultColumns"

 

 

ConnectionString="<%$ ConnectionStrings:HRSOCSSQLConnectionString %>"

 

 

InsertCommand="INSERT INTO EmployeeLicensesList([CompanyID], [EmployeeID], [SSN], [LicenseStatus], [AddedBy], [LastUpdatedBy]) VALUES (@CompanyID, @EmployeeID, @SSN, @LicenseStatus, @AddedBy, @LastUpdatedBy)"

 

 

SelectCommand="SELECT a.CompanyID, a.SSN, a.EmployeeID, a.LicenseStatus, a.ExpirationDate, a.LicenseState, a.LicenseID, a.AddedBy, a.DateAdded, a.LastUpdatedBy,

 

a.LastUpdatedDate, b.LicenseCategoryID, b.Description, b.LicenseListID FROM EmployeeLicensesList AS a RIGHT OUTER JOIN LicensesList AS b ON a.LicenseListID = b.LicenseListID WHERE (a.employeeid=@employeeid) OR (a.employeeid is null)"

 

 

 

UpdateCommand="UPDATE EmployeeLicensesList SET EmployeeID = @EmployeeID, LicenseStatus = @LicenseStatus, LastUpdatedBy = @LastUpdatedBy, LastUpdatedDate = getdate() WHERE (EmployeeID = @EmployeeID) AND (LicenseListID = @LicenseListID)">

 

 

 

 

 

<SelectParameters>

 

 

 

 

 

<asp:Parameter Name="EmployeeID" Type="Int64" />

 

 

 

 

 

<asp:Parameter Name="SSN" Type="String" />

 

 

 

 

 

</SelectParameters>

 

 

 

 

 

<UpdateParameters>

 

 

 

 

 

<asp:Parameter Name="CompanyID" Type="Int32" />

 

 

 

 

 

<asp:Parameter Name="EmployeeID" Type="Int32" />

 

 

 

 

 

<asp:Parameter Name="SSN" Type="String" />

 

 

<asp:Parameter Name="LicenseListID" Type="Int32" />

 

 

<asp:Parameter Name="LicenseStatus" Type="String" />

 

 

<asp:SessionParameter Name="AddedBy" SessionField="UserID" type="String" />

 

 

 

 

 

<asp:SessionParameter Name="LastUpdatedBy" SessionField="UserID" type="String" />

 

 

 

 

 

</UpdateParameters>

 

 

 

 

 

<InsertParameters>

 

 

 

 

 

<asp:Parameter Name="CompanyID" Type="Int32" />

 

 

 

 

 

<asp:Parameter Name="EmployeeID" Type="Int32" />

 

 

 

 

 

<asp:Parameter Name="SSN" Type="String" />

 

 

<asp:Parameter Name="LicenseListID" Type="Int32" />

 

 

<asp:Parameter Name="LicenseStatus" Type="String" />

 

 

<asp:SessionParameter Name="AddedBy" SessionField="UserID" type="String" />

 

 

 

 

 

<asp:SessionParameter Name="LastUpdatedBy" SessionField="UserID" type="String" />

 

 

 

 

 

</InsertParameters>

 

 

 

 

 

</asp:SqlDataSource>

 

 

 

 

 

<asp:SqlDataSource ID="tblStateDS" runat="server" ConnectionString="<%$ ConnectionStrings:HRSOSYS01ConnectionString %>"

 

 

SelectCommand="SELECT [StateCode], [StateName] FROM [tblState]">

 

</

 

asp:SqlDataSource>

 

 

 

 

 

<asp:SqlDataSource ID="tblStateDS0" runat="server" ConnectionString="<%$ ConnectionStrings:HRSOSYS01ConnectionString %>"

 

 

 

SelectCommand="SELECT [StatusID],[Description] FROM [dbo].[tblStatus]">

 

</

 

asp:SqlDataSource>

 

Tsvetina
Telerik team
 answered on 17 Nov 2010
1 answer
191 views
Hai All,

I'm using radgrid inside  (NestedviewTemplate Radgrid).
How can I find the radgrid which is inside the (NestedviewTemplate Radgrid) and also to
add datasource for that grid...
Pls help me..
Marin
Telerik team
 answered on 17 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?