Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
83 views
Hi,
The Telerik Team,

I have been facing a tiffy issue of Telerik Search Results under Repeater Control. We have been using Telerik Controls in a web form and  I have been using simple TextBox and Search Button for displaying the Results under Repeater. When I input a name under TextBox and click Search Button, my results are getting fetched from Web Service Directory based on the Surname input and binded to Repeater Control.

Suppose, if a Surname contains 200 Records from WebService Directory, the loading of time under Repeater is very slow and I have to wait for atleast 2 mins to load the complete Records.

Could you please recommend which Telerik controls can I use for Displaying the Results on Repeater for Ex, Combobox or AutoSearchBox based on the Surname?

Could you please provide us the better and fast solution in order to display the Records in very less time?

Please do the needful solution and waiting for your answer.

Thanks
Sunil
Bozhidar
Telerik team
 answered on 17 Jun 2013
2 answers
112 views
Hi,
We are using telerik controls since a long time in our production environment in our organization.
We are now upgrading to ASP.Net 4.5 version. ASP.Net controls in 4.5 version supports model databinding along with value providers.
I see that Telerik controls support model databinding since long time. But i don't see the support to valueproviders which is described in below link. 
http://msdn.microsoft.com/en-us/vs11trainingcourse_aspnetwebforms45_topic2.aspx
Is this being supported in 2013 Q1 version? If yes, please demonstrate an example. We tried this using 2013 Q1 version with no luck.

Please help us.
Vallamreddy
Top achievements
Rank 1
 answered on 17 Jun 2013
0 answers
166 views
Hello Telerik Team,

There is a problem with RadFileUpload Control select Button. When we click Select Button of RadFileUpload Control, the Select Button is not responding and not opening File Dialog Window for browsing/selecting the file. This issue is happening in IE 8.

I have done research on the above but we could not find any solution. My client is really complaining about this and I do not have any regrets on this.

Could you please provide the solution and do the needful help.

Regards
M Sunil Kumar
Sunil
Top achievements
Rank 1
 asked on 17 Jun 2013
3 answers
145 views
Hi,
In my page I have 6 rad tooltips, I have added below class to set the border for these tooltips.

.RadToolTip
        {
            border: 6px solid Gray !important;
        }


when rendering in ie8 and ie9, one tooltip does not show the border style, all other tooltip shows the style correctly.
it render perfectly in all other browsers including ie10.
how can I solve this issue?

thanks in advance
Jiju
Jiju
Top achievements
Rank 1
 answered on 17 Jun 2013
1 answer
52 views
I'm using entity framework btw.  I'm just trying to get the itemcommand method to fire at this point. 

CS code:

 

protected void grdFiles_ItemCommand(object source, GridCommandEventArgs e)
{
    if (e.CommandName == RadGrid.DownloadAttachmentCommandName)
    {
        using (var db = new isoAuditModelContainer())
        
        RadAjaxManager Manager = new RadAjaxManager();
        Manager.EnableAJAX = false;
        GridDownloadAttachmentCommandEventArgs args = e as GridDownloadAttachmentCommandEventArgs;
        string fileName = args.FileName;
        int attachmentId = (int)args.AttachmentKeyValues["procedure_document"];
        var query = (from x in db.procedures where x.Id == 1 select x).First();
        byte[] binaryData = (byte[])query.procedure_document;
        Response.Clear();
        Response.ContentType = "application/octet-stream";
        Response.AddHeader("content-disposition", "attachment; filename=" + fileName);
        Response.BinaryWrite(binaryData);
        //Response.OutputStream.Write(binaryData, 0, binaryData.Length);
        Response.Flush();
        Response.Close();
        Response.End();
          
        }
    }
}


ASPX Code:


         <telerik:RadGrid ID="grdStandards" runat="server" Width="730px" AutoGenerateColumns="False"
            OnNeedDataSource="grdStandards_NeedDataSource" CellSpacing="0" 
                GridLines="None" OnItemComand="grdFiles_ItemCommand">
  
            <MasterTableView AllowMultiColumnSorting="True" DataKeyNames="">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
  
<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
  
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
                <Columns>
  
                    <telerik:GridBoundColumn DataField="name" 
                        FilterControlAltText="Filter column column" HeaderText="Name" 
                        UniqueName="column">
                    </telerik:GridBoundColumn>
                    <telerik:GridAttachmentColumn FileName="attachment" 
                        FilterControlAltText="Filter procedure_document column" HeaderText="Procedures" 
                        UniqueName="procedure_document" 
                        AttachmentDataField="procedure_document" 
                        AttachmentKeyFields="procedure_document,Id,name,comments" 
                        Text="View Procedure">
                    </telerik:GridAttachmentColumn>
  
                </Columns>
  
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
            </MasterTableView>
  
<FilterMenu EnableImageSprites="False"></FilterMenu>
            </telerik:RadGrid>
Princy
Top achievements
Rank 2
 answered on 17 Jun 2013
4 answers
268 views

(I am posting this thread here because I didn't get any reply in GRID setion of forum yet)

Hi,

I need to create hierarchical rad grid programatically using DataTable, but I'm having a problem in settng the data source for level 1 hierarchy. When I try to expand the child table, an exception is thrown as
 
"Exception Details: System.Data.SyntaxErrorException: Syntax error: Missing operand before 'Is' operator."

Kindly help me out regarding this issue. I have attached my code and exception trace. Thanks

Regards
Muhammad Farjad

---------------------------------------------------------------------------------------------------------------------------------------------------------------------- 

<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>

 

     
        <div>

             <telerik:RadGrid ID="RadGrid1" runat="server" ondetailtabledatabind="RadGrid1_DetailTableDataBind">

              </telerik:RadGrid>

         </div>

             

  

 

 

    </form>

 </body>

---------------------------------------------------- Code Behind File ----------------------------------------------------------------------------

using
System;

---------------------------------------------------- Code Behind File ----------------------------------------------------------------------------

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_Load(object sender, EventArgs e) 
    {

         if (!IsPostBack)

         {

             //Add grand father table

             DataTable grandFatherTable = CreateDataTable("GrandFather");

             AddDataToTable("usman", "Usman", "Mansur", grandFatherTable);

             AddDataToTable("adnan", "Adnan", "Ahmad", grandFatherTable);

             AddDataToTable("nabeel", "Nabeel", "Ahmed", grandFatherTable);

 

              RadGrid1.DataSource = grandFatherTable;

              RadGrid1.MasterTableView.DataKeyNames = new string[] { "username" };

              RadGrid1.Width = Unit.Percentage(98);

              RadGrid1.PageSize = 5;

              RadGrid1.AllowPaging = true;

 

               //RadGrid1.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;

               RadGrid1.AutoGenerateColumns = false;

               RadGrid1.Skin = "Web20";

 

                RadGrid1.MasterTableView.PageSize = 15;

                RadGrid1.MasterTableView.Width = Unit.Percentage(100);

                GridBoundColumn boundColumn;

                boundColumn = new GridBoundColumn();

 

                RadGrid1.MasterTableView.Columns.Add(boundColumn);

                boundColumn.DataField = "username";

                 boundColumn.HeaderText = "User Name";

                 boundColumn = new GridBoundColumn();

 

                    RadGrid1.MasterTableView.Columns.Add(boundColumn);

                    boundColumn.DataField = "firstname";

                    boundColumn.HeaderText = "First Name";

                     boundColumn = new GridBoundColumn();

 

                    RadGrid1.MasterTableView.Columns.Add(boundColumn);

                    boundColumn.DataField = "lastname";

                    boundColumn.HeaderText = "Last Name";

 

                     //Add Father table

                     DataTable fatherTable = CreateDataTable("Father");

                     AddDataToTable("usman", "u1", "u2", fatherTable);

                     AddDataToTable("adnan", "a1", "a2", fatherTable);

                     AddDataToTable("nabeel", "n1", "n2", fatherTable);

 

                    GridTableView tableViewFather = new GridTableView(RadGrid1);

                     tableViewFather.Width = Unit.Percentage(100);

                    tableViewFather.DataSource = fatherTable;

                    tableViewFather.DataKeyNames = new string[] { "username" };

 

                    GridRelationFields relationFields = new GridRelationFields();

                     relationFields.MasterKeyField = "username";

                     relationFields.DetailKeyField = "username";

 

                        tableViewFather.ParentTableRelation.Add(relationFields);

                        RadGrid1.MasterTableView.DetailTables.Add(tableViewFather);

                        boundColumn = new GridBoundColumn();

                        tableViewFather.Columns.Add(boundColumn);

                        boundColumn.DataField = "username";

                         boundColumn.HeaderText = "User Name";

 

                            boundColumn = new GridBoundColumn();

                             tableViewFather.Columns.Add(boundColumn);

                            boundColumn.DataField = "firstname";

                            boundColumn.HeaderText = "First Name";

                             
                            boundColumn = new GridBoundColumn();

                             tableViewFather.Columns.Add(boundColumn);

                            boundColumn.DataField = "lastname";

                             boundColumn.HeaderText ="Last Name";

        }
    }

 

 

    private DataTable CreateDataTable(string tableName)

     {   

            DataTable myDataTable = new DataTable(tableName);

             DataColumn myDataColumn;

             myDataColumn = new DataColumn();

             myDataColumn.DataType = Type.GetType("System.String");

 

            myDataColumn.ColumnName = "username";

 

            myDataTable.Columns.Add(myDataColumn);

            myDataColumn = new DataColumn();

            myDataColumn.DataType = Type.GetType("System.String");

             myDataColumn.ColumnName = "firstname";

             myDataTable.Columns.Add(myDataColumn);

            myDataColumn = new DataColumn();

             myDataColumn.DataType = Type.GetType("System.String");

             myDataColumn.ColumnName = "lastname";

             myDataTable.Columns.Add(myDataColumn);

             return myDataTable;

     }

 

 

    private void AddDataToTable(string username, string firstname, string lastname, DataTable myTable)

     {

        DataRow row;

        row = myTable.NewRow();

         //row["id"] = Guid.NewGuid().ToString();

         row["username"] = username;

         row["firstname"] = firstname;

         row["lastname"] = lastname;

         myTable.Rows.Add(row);

    }

 

 

    protected void RadGrid1_DetailTableDataBind(object source, GridDetailTableDataBindEventArgs e)

     {

        DataTable fatherTable = CreateDataTable("Father");

         AddDataToTable("usman", "u1", "u2", fatherTable);

         AddDataToTable("adnan", "a1", "a2", fatherTable);

         AddDataToTable("nabeel", "n1", "n2", fatherTable);

         e.DetailTableView.DataSource = fatherTable;

    }

}

 

 

---------------------------------------------------------- exception ------------------------------------------------------------------------

Server Error in '/RadHierarchicalGrid' Application.
--------------------------------------------------------------------------------

Syntax error: Missing operand before 'Is' operator.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SyntaxErrorException: Syntax error: Missing operand before 'Is' operator.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace:

[SyntaxErrorException: Syntax error: Missing operand before 'Is' operator.]
   System.Data.ExpressionParser.Parse() +4824040
   System.Data.DataExpression..ctor(DataTable table, String expression, Type type) +121
   System.Data.DataView.set_RowFilter(String value) +153
   System.Data.LinqDataView.set_RowFilter(String value) +53
   Telerik.Web.UI.GridEnumerableFromDataView.PerformTransformation() +375
   Telerik.Web.UI.GridEnumerableFromDataView.TransformEnumerable() +21
   Telerik.Web.UI.GridTableView.GetEnumerator(Boolean useDataSource, GridEnumerableBase resolvedDataSource, ArrayList dataKeysArray) +105
   Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +432
   Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +500
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +57
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +114
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
   Telerik.Web.UI.GridTableView.PerformSelect() +4
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
   Telerik.Web.UI.GridTableView.DataBind() +224
   Telerik.Web.UI.GridDataItem.OnExpand() +272
   Telerik.Web.UI.GridItem.set_Expanded(Boolean value) +109
   Telerik.Web.UI.GridExpandCommandEventArgs.ExecuteCommand(Object source) +34
   Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e) +134
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +115
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +118
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +166
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

 

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927

Pavlina
Telerik team
 answered on 16 Jun 2013
6 answers
217 views
Ok...

I stripped my code down to the bare minimum and it still is not working!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I am getting Error: i.get_postBackElement() is undefined

Get this, SAME code WORKS when I don't use a MasterPage. When I DO use a MasterPage, it's broken!!!

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage2.master.cs" Inherits="MasterPages_MasterPage2" %>
 
<!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>
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
    <div>
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
         
        </asp:ContentPlaceHolder>
    </div>
 
    </form>
</body>
</html>
 
using System;
 
public partial class MasterPages_MasterPage2 : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
 
    }
}

And my aspx page:

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/MasterPage2.master" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:LinkButton ID="lb1" runat="server" OnClick="lb1_Click" Text="push" />
    <asp:Label ID="lbl1" runat="server" Text="test" />
 
 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true" UpdatePanelsRenderMode="Inline">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="lb1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lbl1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
</asp:Content>
 
using System;
 
public partial class Default3 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
 
    }
 
    protected void lb1_Click(object sender, EventArgs e)
    {
        lbl1.Text = "pushed";
    }
}

The above doesn't work.

But this WORKS!

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
 
<!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>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
     
<asp:LinkButton ID="lb1" runat="server" OnClick="lb1_Click" Text="push" />
<asp:Label ID="lbl1" runat="server" Text="test" />
 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true" UpdatePanelsRenderMode="Inline">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="lb1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="lbl1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
</form>
</body>
</html>
 
using System;
 
public partial class Default2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
 
    }
 
    protected void lb1_Click(object sender, EventArgs e)
    {
        lbl1.Text = "pushed";
    }
}

What gives? :(

I have been using RadControls for many many years. The environment is Windows 7 using .Net 4 integrated mode.
Oliver
Top achievements
Rank 1
 answered on 16 Jun 2013
0 answers
77 views
Moderator please delete. The scenario was invalidly described and the problem where not in a Telerik product.
Wendelstam
Top achievements
Rank 1
 asked on 16 Jun 2013
4 answers
139 views
Howdy all.

I wanted a custom little header for my RadPanelItems, so I did have to use HeaderTemplate.

I realize that when I created my own template, it's rendering as it's own little div without any anchors, allowing me to do my own CSS fun stuff.

However!  I'd much rather just use the defaults for the RadPanel that's already defined, specifically for the mouse hovering of headers.  From this thread, I've copied some CSS, but it's not working for me.  Any suggestions/help?

Thanks all!
Amanda
Top achievements
Rank 1
Iron
 answered on 15 Jun 2013
1 answer
130 views
I have a listview that is forced itno insert mode using ListView1.ShowInsertItem().
Where and how do I access the controls inside the InsertItemTemplate server side (I need to change some properties of the controls)?

Morten
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 15 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
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
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?