Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
206 views
Hi,

I'm new to the Telerik controls so sorry if there's a simple answer to these questions.  I have a Grid that I populate using a stored procedure that has custom paging and filtering.  I don't want to display the filter icon so I looked at the example below:

http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/filtering/defaultcs.aspx

And I realized that the ShipName column was exactly what I needed.  It works, except that locally, when I type something into the filter textbox and press Enter, nothing happens.  I need to click the Grid itself in order for it to apply the filtering.  The online demo works great.   I copied the exact same code from the demo into my PC, just used a different datasource and the Enter key won't work anymore.  Am I missing something?   This is how I'm declaring my column:

<

 

telerik:GridBoundColumn DataField="EmailAddress" AllowFiltering="true" HeaderText="Email Address" FilterControlWidth="150px"

 

 

AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" UniqueName="EmailAddress"/>

 


Also, how do I retrieve the name of the column and the value users typed into the textbox when clicking enter when filtering?  The closest I saw was the FilterExpression property of the MasterTableView, but it doesn't give me the column and value entered as separate values, so I'd have to parse through it to figure it out, unless there is a better way.

Thank you in advance!
Todd Anglin
Top achievements
Rank 2
 answered on 01 Apr 2009
2 answers
153 views
I am using grid editing in editforms popup mode and is working well. The only issue I have is the look and feel of the popup edit form. Can I make it look like a regular radwindow? If yes, how can I do that?

Thank you,
Vithiya
Vithiya
Top achievements
Rank 1
 answered on 01 Apr 2009
4 answers
289 views

Hi Telerik Team,

    I created my RadGrid dynamically without creating its columns and its data source is datatable.
    I need to change the default GridTextBoxColumnEditor into GridDropDownListColumnEditor.
    Please Help !

Regards,
Ahmad
ahmad
Top achievements
Rank 1
 answered on 01 Apr 2009
1 answer
105 views

Hello,

I have a RadWindow defined as the following:

<telerik:RadWindow ID="radWindow360Value" runat="server"
  SkinID="Default" Behaviors="Close" NavigateUrl="~/360Value.aspx"
  OpenerElementID="btnDetailedCostCalc"
  OnClientClose="clientClose360Value"
  OnClientShow="clientShow360Value"
  Left="5px" Width="800px" Height="700px">
</telerik:RadWindow>

The 360Value.aspx page is the following:

<body id="bdy36Value" runat="server">
  <form id="frm360Value" runat="server">
    <div id="div360Viewer" runat="server">
      <iframe id="ifm360Value" runat="server" frameborder="0" scrolling="auto" src="BlankPage.aspx" width="100%" height="100%"></iframe>
    </div>
    <br />
    <asp:Button ID="btnDone" runat="server" UseSubmitBehavior="false" Text="Done" OnClientClick="return close360Value();" />
  </form>
</body>

When the window is popped up via the following:

<input type="button" id="btnDetailedCostCalc" class="btn" runat="server" onclick="Show360ValueWindow();" value="Launch Detailed Cost Calculator" />

function Show360ValueWindow() {
  var oWnd = $find(s360ValueRadWindowClientID);
  oWnd.SetSize(document.documentElement.clientWidth - 20, document.documentElement.clientHeight - 15);
  oWnd.show();
  oWnd.MoveTo(10, document.documentElement.scrollTop + 10);
}

I get an "Invalid Argument" on line 54 which is in the resize function of the telerik controls xv2scripts.js file.  Specifically, this is line 54:

contentObj.style.height = (getWindowHeight() - nonContentHeight) + "px";

The current values of those items are:

contentObj.style.height = ""
getWindowHeight() = 150
nonContentHeight = 177

What can I do to have this not throw the error.  I am working in IE8 and it happens in both normal and compatibility mode.

Thanks,
Kevin

Kevin
Top achievements
Rank 1
 answered on 01 Apr 2009
1 answer
94 views
I'm trying to have my ajax loading panel only be used on certain events and to postback on others.  For example I want my treeview to use ajax for NodeExpanded/NodeCollapsed, but not for NodeClicked.  Her is my entire HTML.  Any suggestions would be great.

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OUTreeview.ascx.cs" 
    Inherits="OUTreeview" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<div> 
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="rtvDSMOU" EventName="rtvDSMOU_NodeExpand"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="rtvDSMOU" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManagerProxy> 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" 
        Width="75px"
        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
            style="border: 0px;" /> 
    </telerik:RadAjaxLoadingPanel> 
    <telerik:RadTreeView ID="rtvDSMOU" runat="server" OnNodeExpand="rtvDSMOU_NodeExpand" 
        BorderStyle="None" BorderWidth="0px" OnNodeCollapse="rtvDSMOU_NodeCollapse" OnNodeClick="rtvDSMOU_NodeClick" 
        ShowLineImages="False"
        <CollapseAnimation Duration="100" Type="OutQuad" /> 
        <ExpandAnimation Duration="100" Type="InQuad" /> 
    </telerik:RadTreeView> 
</div> 

Daniel
Telerik team
 answered on 01 Apr 2009
2 answers
104 views
I have what seems to be a simple problem and hopefully an equally simple answer:

Currently I have a hierarchical grid, with a details table for drilling down into the data.  The drill down data is where the edit occurs (only update right now).  The problem is that when I update a detail record, the top level record does not want to refresh.

To make this a bit clearer (and trying to avoid bombarding everyone with code, which later we may find is necessary), picture the master record displaying a field "balance".  The detail records are items that total the "balance".  When I update one of the detail balances, it is reflected; however, the master balance field is not.

Thanks.
Michael
Top achievements
Rank 2
 answered on 01 Apr 2009
1 answer
130 views
Is it possible to have a combobox that drops down with custom content that doesn't bind to anything? I have two rows of option buttons that i need to show when dropping down the combo. I don't see how I could use binding to this as there would be two items side by side. I tried just putting the rows of combos in the itemtemplate but nothing shows up when expanding the combo. Is there a way to do this or perhaps a better method i should be using?

  <telerik:RadComboBox ID="RadComboBox2" Width="180px" Height="400px" AllowCustomText="true" Skin="Vista"
        EmptyMessage="Nada" runat="server">
        <ItemTemplate>
            <div style="width: 180px; height: 400px">
                <div style="width: 95px; float: left; line-height: 22px;">
                    <asp:RadioButton ID="rbtnToday" Text="Today" GroupName="DateFilter" runat="server"
                        AutoPostBack="false" CssClass="radioButton" Checked="true" /><br />
                    <asp:RadioButton ID="rbtnLast7Days" Text="Last 7 Days" GroupName="DateFilter" runat="server"
                        AutoPostBack="false" CssClass="radioButton" /><br />
                    <asp:RadioButton ID="rbtnThisMonth" Text="This Month" GroupName="DateFilter" runat="server"
                        AutoPostBack="false" CssClass="radioButton" /><br />
                    <asp:RadioButton ID="rbtnThisYear" Text="This Year" GroupName="DateFilter" runat="server"
                        AutoPostBack="false" CssClass="radioButton" /><br />
                </div>
                <div style="width: 85px; float: left; line-height: 22px;">
                    <asp:RadioButton ID="rbtnYesterday" Text="Yesterday" GroupName="DateFilter" runat="server"
                        AutoPostBack="false" CssClass="radioButton" /><br />
                    <asp:RadioButton ID="rbtnLast30Days" Text="Last 30 Days" GroupName="DateFilter" runat="server"
                        AutoPostBack="false" CssClass="radioButton" /><br />
                    <asp:RadioButton ID="rbtnLastMonth" Text="Last Month" GroupName="DateFilter" runat="server"
                        AutoPostBack="false" CssClass="radioButton" /><br />
                    <asp:RadioButton ID="rbtnAllTime" Text="All Time" GroupName="DateFilter" runat="server"
                        AutoPostBack="false" CssClass="radioButton" /><br />
                </div>
            </div>           
        </ItemTemplate>
    </telerik:RadComboBox>
Levi
Top achievements
Rank 1
 answered on 01 Apr 2009
1 answer
140 views

I have a client-bind Grid which has GridTemplateColumn to show a checkbox.

 

<

 

telerik:RadGrid ID="RadGrid1" EnableViewState="False" Skin="WebBlue" runat="server"

 

 

 

    AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True"

 

 

 

    AutoGenerateColumns="False" Width="100%"

 

 

    EnableAJAXLoadingTemplate="True" EnableAJAX="True" GridLines="None" >

 

 

 

    <MasterTableView AllowNaturalSort="false" AccessKey="x"

 

 

        AllowFilteringByColumn="True"

 

 

        ClientDataKeyNames="IsReviewed, ID, Message, Category" CellSpacing="-1" >

 

 

 

        <Columns>

 

 

 

            <telerik:GridTemplateColumn HeaderText="Review" >

 

 

                <ItemTemplate>

 

 

                    <asp:CheckBox ID="CheckBox" runat="server" />

 

 

 

                </ItemTemplate>

 

 

            </telerik:GridTemplateColumn>

 

 

            <telerik:GridDateTimeColumn DataField="TimeStamp" HeaderText="Date and Time" DataFormatString="{0:M/d/yyyy h:mm tt}" UniqueName="Time"/>

 

 

        </Columns>

 

 

 

    </MasterTableView>
    <ClientSettings AllowKeyboardNavigation="True">

 

 

         <ClientEvents OnRowDataBound="RowDataBound" ></ClientEvents>

 

 

         <DataBinding SelectMethod="GetDataAndCount" Location="~/service/Service.svc" SortParameterType="Linq" FilterParameterType="Linq" >

 

 

 

         </DataBinding>

 

 

 

    </ClientSettings>

Here is the script to handle data bind on check box:

 

 

function RowDataBound(sender, args) {

 

 

    var radTextBox1 = args.get_item().findElement("CheckBox");

 

 

    radTextBox1.checked = args.get_dataItem()["IsReviewed"];

 

}

In normal situation, everything is fine. However, when I change the page size, the client side didn't create the check box for the increased new rows. The script is failed due to can't find the radTextBox1. I did some trace, the data is succeeded binding, other columns are fine, only this GridTemplateColumn has issue to create.

How can I reslove this issue?

Nikolay Rusev
Telerik team
 answered on 01 Apr 2009
3 answers
234 views
I have a data bound RadGrid that will bring up the first page, but when I try to move forward a page, I get the following error:

Error:  Sys.WebForms.PageRequestManagerParserErrorException: The message recived from the server could not be parsed.  Common causes for this error are when the response is modified by calls to Response.Write(), response fileters, HttpModules, or server trace is enabled. 
Details:  Error parsing near '><td>$0.00</td><td>'.

I have a RadAjaxManager on the page also, and based on a different post I found when looking up this error, I have the RadGrid calling itself.  The above error is on different data each time.  I am not using response.write in my code, but when I search for it in my project, it is in this file:  Telerik.Web.UI.xml

Any idea on how to fix this?
Thanks, Amy
Pavlina
Telerik team
 answered on 01 Apr 2009
2 answers
440 views
Hi,

I have a simple page that has a Literal, a Repeater/Datalist and a DropDownList.  When there are no items in the Repeater the Literal is shown.  When an Item from the DropDownList is selected the Repeater is updated and the Literal is turned off.

This scenario is a much simplified version of what am I trying to achieve, designed as proof of the error.  The page works fine with a full postback or when using a regular AJAX UpdatePanel, but when I try to use the RadAjax Manager, the Literal updates as expected, but the Repeater does not (I have tried replacing the Repeater with a Datalist and get the same results). 

Here is some sample code...

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="DropDownList">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="Literal" /> 
                    <telerik:AjaxUpdatedControl ControlID="Repeater " /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
          
    <div>  
        <ul> 
            <asp:Literal id="Literal" runat="server">This list is empty.</asp:Literal> 
            <asp:Repeater ID="Repeater" runat="server">  
                <ItemTemplate> 
                    <li> 
                        <%#Container.DataItem("Item")%> 
                    </li> 
                </ItemTemplate> 
            </asp:Repeater> 
        </ul> 
        <br /> 
        <div> 
            <asp:DropDownList ID="DropDownList" runat="server" AutoPostBack="true">  
                <asp:ListItem Text="Item One" Value="1" /> 
                <asp:ListItem Text="Item Two" Value="2" /> 
                <asp:ListItem Text="Item Three" Value="3" /> 
                <asp:ListItem Text="Item Four" Value="4" /> 
                <asp:ListItem Text="Item Five" Value="5" /> 
            </asp:DropDownList>    
        </div> 
    </div> 

    Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load  
        If Not IsPostBack Then 
            LoadList()  
        End If 
    End Sub 
 
    Sub LoadList()  
        Repeater.DataSource = "MyDataSource" 
        Repeater.DataBind()  
        If Repeater.Items.Count > 0 Then 
            Repeater.Visible = True 
            Literal.Visible = False 
        Else 
            Repeater.Visible = False 
            Literal.Visible = True 
        End If 
    End Sub 
 
    Protected Sub DropDownList_SelectedIndexChanged(ByVal sender As ObjectByVal e As System.EventArgs) Handles DropDownList.SelectedIndexChanged  
        'Add the Item here  
        LoadList()  
    End Sub 

If I do this, it works...

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">  
        <ContentTemplate> 
            <div>  
                <ul> 
                    <li id="Literal" runat="server">This list is empty.</li> 
                    <asp:Repeater ID="Repeater" runat="server">  
                        <ItemTemplate> 
                            <li> 
                                <%#Container.DataItem("BusinessName")%> 
                            </li> 
                        </ItemTemplate> 
                    </asp:Repeater> 
                </ul> 
                <br /> 
                <div> 
                    <asp:DropDownList ID="DropDownList" runat="server" AutoPostBack="true">  
                        <asp:ListItem Text="Item One" Value="17" /> 
                        <asp:ListItem Text="Item Two" Value="19" /> 
                        <asp:ListItem Text="Item Three" Value="20" /> 
                        <asp:ListItem Text="Item Four" Value="21" /> 
                        <asp:ListItem Text="Item Five" Value="22" /> 
                    </asp:DropDownList>    
                </div> 
            </div>     
        </ContentTemplate> 
    </asp:UpdatePanel> 

Any Ideas?
Matt
Top achievements
Rank 2
 answered on 01 Apr 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?