Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
174 views

I have not been able to figure out why I am not getting the filter results I am expecting. In fact I always get no results.

When the page first loads all the data is displayed as expected.

When I enter as search query and click the Search button the RadListView control refreshes with no results. I see the spinner so I know it posted back via AJAX.

I debug the C# code and I can confirm that the search query value is passed to the BuildExpression for the filter. No errors or exceptions are thrown.

If I submit an empty query it should just Clear the Filter and all results should show, but that does not happen.

The datasource is a List<DeviceSearchResult>.

Any ideas?

Here is my markup:

<asp:Panel ID="pnlSearchView" runat="server" Visible="True">
    <h1>Search View</h1>
     
    <telerik:RadAjaxManager ID="RadAjaxManager" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="txtDeviceSearchQuerySubmit">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lvDeviceSearchResults" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
       <asp:TextBox ID="txtDeviceSearchQuery" runat="server"></asp:TextBox>
    <asp:Button ID="txtDeviceSearchQuerySubmit" runat="server" OnClick="txtDeviceSearchQuerySubmit_OnClick" Text="SEARCH"/>
    <telerik:RadListView ID="lvDeviceSearchResults" RenderMode="Lightweight" runat="server"
         OnNeedDataSource="lvDeviceSearchResults_NeedDataSource"
         ItemPlaceholderID="phDeviceSearchResult">
        <LayoutTemplate>
            <asp:PlaceHolder ID="phDeviceSearchResult" runat="server"></asp:PlaceHolder>
        </LayoutTemplate>
        <ItemTemplate>
            <%# ShowGroupRow(Eval("DeviceManufacturer").ToString())=="yes"
                    ? "<div class=\"manufacturer\"><strong>"+Eval("DeviceManufacturer")+"</strong></div>"
                    : ""  %>
            <div>- <%# Eval("DeviceName") %> | <%# Eval("DevicePackage") %> | <%# Eval("DevicePin") %></div>
            <asp:ListView ID="lvDeviceSearchResultAdapters" runat="server" ItemPlaceholderID="phDeviceSearchResultAdapters" DataSource='<%# Eval("DeviceAdapters") %>'>
                <LayoutTemplate>
                    <ul><asp:PlaceHolder ID="phDeviceSearchResultAdapters" runat="server"/></ul>
                </LayoutTemplate>
                <ItemTemplate>
                    <li><%# Container.DataItem.ToString() %></li>
                </ItemTemplate>
            </asp:ListView>
        </ItemTemplate>
    </telerik:RadListView>
</asp:Panel>

 

Here is my C#:

protected void lvDeviceSearchResults_NeedDataSource(object sender, RadListViewNeedDataSourceEventArgs e)
{
    lvDeviceSearchResults.DataSource = TempDeviceSearchResults.OrderBy(d => d.DeviceManufacturer).ThenBy(d =>d.DeviceName);
}
 
protected void txtDeviceSearchQuerySubmit_OnClick(object sender, EventArgs e)
{
    lvDeviceSearchResults.FilterExpressions.Clear();
    var query = txtDeviceSearchQuery.Text.Trim();
    if (!string.IsNullOrEmpty(query))
    {
        lvDeviceSearchResults.FilterExpressions.BuildExpression(ex => ex
            .Contains("DeviceName", query)
            );
    }
    lvDeviceSearchResults.Rebind();
}

Chris
Top achievements
Rank 2
Veteran
 answered on 22 Mar 2016
14 answers
220 views

Hi,

after the last update (2013.1.403.40) we noticed a changed behaviour on the RadDateTimePicker component. If the user does not tab out from the component or goes to another input field before he does a callback the SelectedDate is null.

I'm pasting in a test project

Best regards

Robert

ASPX

<%@ 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">
<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>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <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" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
        Instructions. Change time of the RadDateTimePicker component and press the TEST button.
    </div>
    <div>
        <telerik:RadDateTimePicker ID="rdtpTimeStamp" runat="server">
        </telerik:RadDateTimePicker>
           <hr />
         <telerik:RadTabStrip ID="tsFunctionMenu" runat="server" OnTabClick="tsFunctionMenu_TabClick"
            SkinID="FunctionMenuSkin">
        </telerik:RadTabStrip>
        <hr />
        <asp:Label ID="Label1" runat="server" Text="..."></asp:Label>
        <hr />
    </div>
    </form>
</body>
</html>

CS

using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
 
public partial class Default : System.Web.UI.Page
{
 
    protected void Page_Init(object sender, EventArgs e)
    {
        RadTab tab = new RadTab("TEST", "TEST");
        tsFunctionMenu.Tabs.Add(tab);
    }
 
    protected void Page_Load(object sender, EventArgs e)
    {
        Add("<hr>");
        Add("Page_Load");
        Add(String.Format("Date: {0}", rdtpTimeStamp.SelectedDate));
 
        if (!IsPostBack)
        {
            rdtpTimeStamp.SelectedDate = DateTime.Now;
        }
    }
 
    protected void tsFunctionMenu_TabClick(object sender, RadTabStripEventArgs e)
    {
        RadTabStrip ts = (RadTabStrip)sender;
        ts.SelectedIndex = -1;
 
        string cmd = e.Tab.Value;
 
        Add(String.Format("TabClick: {0}", cmd));
 
    }
 
    protected void Add(string text)
    {
        Label1.Text += "<br>" + text;
    }
    protected void Add(string text, object o)
    {
        Add(String.Format(text, o));
    }
 
 
}


Warnestam
Top achievements
Rank 1
 answered on 22 Mar 2016
2 answers
199 views

Hi telerik,

Strucked in getting resoluation, itemdatabound in radgrid firing twice in vb.net.

Thanks,

Lokesh

Loki
Top achievements
Rank 1
 answered on 22 Mar 2016
8 answers
498 views

Hi,
In my Pivot table i want to set the width for each column of row Filed.

I set the column width like this.

                        <telerik:PivotGridRowField DataField="Maintype"  Caption="" CellStyle-Width="60px"     >
                </telerik:PivotGridRowField>
                   <telerik:PivotGridRowField DataField="subtype"  Caption="" CellStyle-Width="60px"  >
                </telerik:PivotGridRowField               
                <telerik:PivotGridRowField DataField="Listtype"  Caption="" CellStyle-Width="110px"  >
                </telerik:PivotGridRowField>

but i found some stange result as the width for each column is in irregular form.
means first column width set to second column and last column with is not changing
Please check the attached image for details.

I dont want to use the RowHeaderCellStyle widh ,because this will set the same width for all the row field column.

I want to set the Individual column width of rowfield.



Konstantin Dikov
Telerik team
 answered on 22 Mar 2016
1 answer
206 views

Hi,

I'm interested in changing the order of the columns at runt-time for columns created in design-view. I have tried in Grid_PreRender but it doesn't work

Also, is it possible mix dynamically created columns with columns created in design?

 

Thanks,

catalin

Viktor Tachev
Telerik team
 answered on 22 Mar 2016
1 answer
155 views

Hi Telerik team,

i strucked in getting result in rad grid footer. bcoz itemdatabound firing twice in vb.net, result is getting doubled.

 

Dim total As Integer
    Protected Sub grdAddList_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles grdAddList.ItemDataBound
        Try

            If TypeOf e.Item Is GridDataItem Then
                Dim dataItem As GridDataItem = CType(e.Item, GridDataItem)
                Dim fieldValue As Integer = Integer.Parse(dataItem("Amount").Text)
                total = (total + fieldValue)
            End If

            If TypeOf e.Item Is GridFooterItem Then
                Dim footerItem As GridFooterItem = CType(e.Item, GridFooterItem)
                footerItem("Amount").Text = "Total: " + total.ToString()
            End If
          

        Catch ex As Exception
            Dim strExpMsg As String
            strExpMsg = className & "." & MethodBase.GetCurrentMethod().Name & "()" & "->" & ex.Message.ToString()
            ExceptionHandler(strExpMsg, ex, Me.strUserName)
        End Try
    End Sub

 

Thanks,

Lokesh

 

Viktor Tachev
Telerik team
 answered on 22 Mar 2016
4 answers
432 views
Hey!

I have a GridTemplateColumn where I define a TextBox and a Button in the EditItemTemplate property. How is it possible to fire the onClick event of the button.

I have tried the following:
<asp:ImageButton ID="Button" runat="server" ImageUrl="~/Resources/key.png" OnClick="Button_Click" />

... but this doesn't work I always get the following compilation error "...does not contain a definition for 'Button_Click' and no extension method ... (are you missing a using directive or an assembly reference?)".

I don't know what I made wrong - can anybody help me?

Kostadin
Telerik team
 answered on 22 Mar 2016
5 answers
398 views

Hi there;

Two questions:

1.  I'm currently rendering a radar chart inside a DIV, which has text-align set to center.  The chart continually renders on the left side of the DIV, though.  Is there a trick I'm missing?

2.  Some of the x axis labels are truncated.  Is there a way to prevent this?

Thanks,

Jason

<div class="ChartContainer">
<telerik:RadHtmlChart ID="radarRCM" runat="server" Width="400px" >
    <Legend>
        <Appearance Visible="false"></Appearance>
    </Legend>
    <PlotArea>
        <Series>
            <telerik:RadarLineSeries DataFieldY="Score" Name="RadarLineSeries1">
                <LabelsAppearance Visible="false"></LabelsAppearance>
            </telerik:RadarLineSeries>
        </Series>
        <XAxis DataLabelsField="Discipline" >
        </XAxis>
    </PlotArea>
 
    <Zoom Enabled="False"></Zoom>
</telerik:RadHtmlChart>
</div>

Stamo Gochev
Telerik team
 answered on 22 Mar 2016
18 answers
629 views
Hi guys,

I always have compilation error about Telerik.Web.UI.dll, once in a day.
It is "Metadata file '....\Telerik.Web.UI.dll' could not be opened -- Not enough storage is available to process this command

Do you have any idea about it?

FYI: I am using trial version Q1 2010 Ajax

AGT
Bruce
Top achievements
Rank 1
 answered on 21 Mar 2016
12 answers
616 views
I need to build a file download manager that will let users select multiple files and download them all at once with no other prompts than the first to determine where on their local machine to save the files. Is it possible to do this with the FileExplorer control? If it is not possible, does anyone have any recommendations about a third-party control that would enable this functionality?
Vessy
Telerik team
 answered on 21 Mar 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?