Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
79 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
113 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
76 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
203 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
76 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
179 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
2 answers
149 views
WTF!!
Raya
Telerik team
 answered on 17 Nov 2010
1 answer
88 views
Hello Telerik,

We have followed the example to Replace the Edit Form and have had decent success so far. We now have a customized Advanced Form appearing in a RadWindow.

We would next like to group the appointments by a resource on the scheduler, but I'm not sure how this can be achieved - we are aware of the example provided for grouping by resource, but it assumes the developer is using the default templates.

What happens in the case that a custom advanced form is being used?

Regards
ADS Development Team
Top achievements
Rank 1
 answered on 17 Nov 2010
1 answer
35 views
Hi All,

    I want to hide a column in RadGrid when Autogenerated column is true.
I am using DataRelation in RadGrid

Thanx in Advance


Bharat Rathore


Hi All,

I got the Solution.

 

 

protected void RadGrid1_ColumnCreated1(object sender, GridColumnCreatedEventArgs e)

 

{

 

 

if (e.Column.UniqueName == "column name")

 

{

e.Column.Visible =

 

false;

 

}

}

Pavlina
Telerik team
 answered on 17 Nov 2010
3 answers
85 views
I am having problem with IFrame.I am having three TAB. Each Tab is having IFrame and src of the IFrame is opening a url of the different server.
Me.IFrame.Attributes("src") = strWebApplLink.Trim()

Now wat is happening, when i click TAB1,it works properly. Clicking the TAB2 also work fine. But When i repeat this work(moving to another TAB), I am getting the JavaScript Error(ext-all.js) with height error incorrect. Error comes in form of JavaScript popup."Do You want to debug".when i click NO. It properly open the requested URL .I have no idea to fix this problem.

Your help will be appritiated.Thanks in Advance
Yana
Telerik team
 answered on 17 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?