Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
103 views
Hi, 
How can i hide resource type if my ClientFormCreated function is in javascript.
Thanks in advance.
Plamen
Telerik team
 answered on 17 Jun 2013
7 answers
127 views
Hi,

I have a web page containing a RadTabStrip which has its orientation set to VerticalLeft.  It works fine in all browsers except IE7.  You can see the same behaviour off the demo page.  To reproduce:

In IE7, open http://demos.telerik.com/aspnet-ajax/tabstrip/examples/functionality/orientation/defaultcs.aspx then select the VerticalLeftOrientation.  You will get a HorizontalTop orientation instead.  See attached screen shot.

I've also noticed that VerticalRight actually behaves as HorizontalBottom.

Does anyone have a woraround for this?

Thanks,

-- Joel
Ivan Zhekov
Telerik team
 answered on 17 Jun 2013
7 answers
234 views
I am using the following css to change the default Metro Skin for the toolbar control. I need the toolbar to be a different color other that white (by the way, white was an odd choice for the primary color of a control that needs to be as prominent as a toolbar). Nevertheless, everything in my style works (I remove the toolbar borders as well), however, now I see that dropdown buttons aren't showing their text. This is because I set the button text color to white so it shows up against the now colored toolbar background. How do I set the background-color and/or text color of dropdown items only (ie dropdown buttons, splitbars buttons, etc.) and leave the main toolbar text as white?

Thanks.
.FullBorderlessToolbar .rtbOuter, .rtbMiddle
{
    background-color: #4BB0E7 !important;  
border: 0px !important;
}
 
.FullBorderlessToolbar .rtbTemplate, .rtbWrap {
  color: #ffffff !important;
}
 
.FullBorderlessToolbar .rtbSplBtnFocused .rtbWrap,
.FullBorderlessToolbar .rtbItemFocused .rtbWrap,
.FullBorderlessToolbar .rtbItemHovered .rtbWrap {
  background-color: #1485ba !important; }
Ivan Zhekov
Telerik team
 answered on 17 Jun 2013
5 answers
371 views
Hello,

I'm trying to set the crop width and height to 100 on start, and I don't want people change the crop box size.
How to make the with/height static and unchangeable?

I use the latest version 2011.2.712.40

Thanks

Dobromir
Telerik team
 answered on 17 Jun 2013
4 answers
196 views
Hi,
We have a rad grid with auto generated column. In some of the column that are having numeric data in the auto generated columns should be right aligned. We have tried from our end by following your code from the forum. But not been able to achieve desired result.Hence attaching herewith the grid screen shot and .aspx, aspx.cs codes for reference.

.aspx

<%@ Page Language="C#" MasterPageFile="~/Presentationlayer/MasterAdmin.master" AutoEventWireup="true" CodeFile="T_Other_AgentwiseCaseStatement.aspx.cs" Inherits="Presentationlayer_TAgentwiseCaseStatement" Title="Agentwise Case Statement" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Src="MS_Control/MultipleSelection.ascx" TagName="MultipleSelection" TagPrefix="uc1" %>   


<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
     <div>
     
<script type="text/javascript">
    function pageLoad() {
        var grid = $find('<%=RadGrid1.ClientID %>');
        var columns = grid.get_masterTableView().get_columns();
        for (var i = 0; i < columns.length; i++) {
            columns[i].resizeToFit();
        }
    }
</script>
</div>
     <div>
     
     
             <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="True"  
                AllowSorting="true" AllowPaging="True" PageSize="50" Skin="Sunset"
                ShowFooter="True" AllowFilteringByColumn="true" ShowGroupPanel="true"
                 onneeddatasource="RadGrid1_NeedDataSource" OnColumnCreated ="RadGrid1_ColumnCreated" >  <%--OnColumnCreated ="RadGrid1_ColumnCreated --%>
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Sunset"></HeaderContextMenu>

                <ExportSettings HideStructureColumns="true" IgnorePaging="true" OpenInNewWindow="true" ExportOnlyData="true" />
                <MasterTableView CommandItemDisplay="Top" ShowGroupFooter="true" GroupLoadMode="Client" TableLayout="Fixed" Width="100%">
                <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true"
                    ShowExportToCsvButton="true" ShowExportToPdfButton="true" ShowAddNewRecordButton="false" />
                                   
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>

<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>

<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
                                   
                </MasterTableView>
                <ClientSettings Selecting-AllowRowSelect="true" AllowKeyboardNavigation="true" EnablePostBackOnRowClick="true" EnableRowHoverStyle="true" AllowGroupExpandCollapse="true" ReorderColumnsOnClient="True" AllowDragToGroup="true" AllowColumnsReorder="True">
<Selecting AllowRowSelect="True"></Selecting>
<Scrolling AllowScroll="false" UseStaticHeaders="true" />
                    <Resizing AllowColumnResize="true" EnableRealTimeResize="true" AllowResizeToFit="true" />
                </ClientSettings>
                <FilterMenu EnableImageSprites="False"></FilterMenu>
            </telerik:RadGrid>  
        </div>
       <div>
        <telerik:RadDock ID="RadDock1" runat="server" Width="380px" Left="10" Top="125"
             Title="Search Companion"  DefaultCommands="ExpandCollapse">
            <ContentTemplate>
                <table>
                    
                    <tr>
                    <td>
                    <table width="90%">
                       <tr>
                        <td> From</td>
                        <td>
                            <telerik:RadDatePicker ID="rdpFrom" runat="server" Width="100"  Culture="(Default)">
                                <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x" Skin="Outlook"></Calendar>

                                <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>

                                <DateInput DisplayDateFormat="dd/MM/yyyy"    AutoPostBack="False"></DateInput>
                            </telerik:RadDatePicker>
                        </td>
                        <td> To</td>
                        <td>
                            <telerik:RadDatePicker ID="rdpTo" runat="server" Width="100"  Culture="(Default)">
                                <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x" Skin="Outlook"></Calendar>

                                    <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>

                                    <DateInput DisplayDateFormat="dd/MM/yyyy"    AutoPostBack="False"></DateInput>
                            </telerik:RadDatePicker>
                        </td>
                    </tr>
                    </table>
                         
                        </td>
                    </tr>
                     <tr>
                                <td style="z-index:2">
                            <asp:CheckBox ID="CheckBox1" runat="server" Text="All/Selective Agent" Checked="true"
                                AutoPostBack="true" oncheckedchanged="CheckBox1_CheckedChanged" />
                            <br />
                            <uc1:MultipleSelection ID="chkAgent" runat="server" width="400px" />
                        </td></tr>
                  
                    <tr>
                     <td colspan="1">
                    <table width="50%">
                       <tr>
                        
                                <td>
                                    Print Company Name,Address &amp; Report Heading :
                                </td>
                                <td>
                                    <telerik:RadComboBox ID="ddlincldagentcase" runat="server" Width="60PX">
                                        <Items>
                                            <telerik:RadComboBoxItem Text="Yes" Value="Y" />
                                            <telerik:RadComboBoxItem Selected="true" Text="No" Value="N" />
                                        </Items>
                                    </telerik:RadComboBox>
                                </td>
                                </tr>
                                </table>
                                </td>  
                            
                    </tr>
                    </tr>
                    <caption>
                        <br />
                        <br />
                        <tr>
                            <td>
                                <table width="75%">
                                    <tr>
                                        <td align="left">
                                            <telerik:RadButton ID="rbtRpt" runat="server" onclick="rbtRpt_Click"
                                                Text="Print">
                                            </telerik:RadButton>
                                        </td>
                                        <td align="right">
                                            <telerik:RadButton ID="rbtShow" runat="server" onclick="rbtShow_Click"
                                                Text="Preview">
                                            </telerik:RadButton>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </caption>
                    </tr>
                </table>
            </ContentTemplate>
        </telerik:RadDock>
          <%--<asp:SqlDataSource ID="SqlDataSource2" ProviderName="System.Data.SqlClient" SelectCommand="SELECT DISTINCT name as DOCTORNAME FROM doctor"
    runat="server"></asp:SqlDataSource>--%>
    </div>
</asp:Content>


aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Web.Configuration;
using System.Data.SqlClient;
using System.Globalization;
using Telerik.Web.UI;


public partial class Presentationlayer_TAgentwiseCaseStatement : System.Web.UI.Page
{
    string conn;

    Binddata btd;

    Misc1 misc;
    string strfltr1;

    public void conns()
    {

        conn = WebConfigurationManager.ConnectionStrings[Convert.ToString(Session["connstring"])].ConnectionString;
    }
    public void reset()
    {

        misc = new Misc1();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Convert.ToString(Session["connstring"]) == "" || Convert.ToString(Session["connstring"]) == null)
        {
            Response.Redirect("Userauthentication.aspx");
        }
        else
        {
            if (!IsPostBack)
            {
                btd = new Binddata();
                ViewState["crdate"] = btd.getsrdate();
                ViewState["fnstartdate"] = Convert.ToString(Session["fnstartdate"]);
                ViewState["mode"] = "0";
                string opdt = "01/04/" + Convert.ToString(ViewState["fnstartdate"]);
                rdpFrom.SelectedDate = DateTime.Parse(ViewState["fnstartdate"].ToString(), CultureInfo.CreateSpecificCulture("en-CA")); ;
                chkAgent.Visible = false;

                rdpTo.SelectedDate = DateTime.Parse(ViewState["crdate"].ToString(), CultureInfo.CreateSpecificCulture("en-CA")); ;
                //ViewState["ch"] = "1";
                //bindgrid();
                //RadGrid1.DataBind();
                //RadDock1.Collapsed = true;
            }
        }
    }
    protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        if (Convert.ToString(ViewState["mode"]) == "1")
        {
            bindgrid();
        }

        

    }

    private void bindgrid()
    {
        conns();
        SqlConnection con = new SqlConnection(conn);
        SqlCommand com;
        try
        {
            //ViewState["cmpid"] = "1";
            con.Open();
            com = new SqlCommand("Usp_AgentwiseCasestmt", con);
            com.CommandType = CommandType.StoredProcedure;
            com.Parameters.AddWithValue("@ComCode", "");
            com.Parameters.AddWithValue("@FrmDt", DateTime.Parse(rdpFrom.SelectedDate.Value.ToString("yyyy/MM/dd"), CultureInfo.CreateSpecificCulture("en-CA")));
            com.Parameters.AddWithValue("@ToDt", DateTime.Parse(rdpTo.SelectedDate.Value.ToString("yyyy/MM/dd"), CultureInfo.CreateSpecificCulture("en-CA")));
            // com.Parameters.AddWithValue("@ch", Int32.Parse(Convert.ToString(ViewState["ch"])));
            com.Parameters.AddWithValue("@strfltr", Convert.ToString(ViewState["strfltr"]));
            // com.Parameters.AddWithValue("@Pending", ddlonlypending.SelectedValue);
            SqlDataAdapter da = new SqlDataAdapter(com);
            DataTable dt = new DataTable();
            da.Fill(dt);
            RadGrid1.MasterTableView.Caption = "AgentWise CaseStatement   " + rdpFrom.SelectedDate.Value.ToString("dd/MM/yyyy") + " To" + rdpTo.SelectedDate.Value.ToString("dd/MM/yyyy");
            //int x = com.ExecuteNonQuery();
            RadGrid1.DataSource = dt;
            RadGrid1.DataBind();
        }
        catch (Exception ex)
        {

        }
        finally
        {
            con.Close();

        }

    }
    protected void RadGrid1_PreRender(object sender, System.EventArgs e)
    {
        /


    }
    protected void rbtShow_Click(object sender, EventArgs e)
    {
        ViewState["mode"] = "1";
        if (chkAgent.sValue != "")
        {
            strfltr1 = " and AGENT.CODE IN(" + chkAgent.sValue + ") ";
        }
        else
        {
            strfltr1 = "";
        }
        ViewState["strfltr"] = strfltr1;
        bindgrid();
        RadGrid1.DataBind();
        RadDock1.Collapsed = true;
    }
    protected void rbtRpt_Click(object sender, EventArgs e)
    {

        Response.Write("<script>window.open('T_Other_AgentwiseCaseStatement_rpt.aspx?cmp=" + Convert.ToString(ViewState["cmpid"]) + "&dtfrom=" + rdpFrom.SelectedDate.Value.ToString("dd/MM/yyyy") + "&dtto=" + rdpTo.SelectedDate.Value.ToString("dd/MM/yyyy") + "&strfltr=" + Convert.ToString(ViewState["strfilter"]) + "', '','left=0,height=900,width=1200,top=0,resizable=no,scrollbars=yes,toolbar=no,status=no,target=_blank,location=no');</script>");

    }
    protected void RadGrid1_ColumnCreated(object sender, GridColumnCreatedEventArgs e)
    {
        if (e.Column.ColumnType== "GridBoundColumn")
        {
            if (e.Column.UniqueName != "patient" && e.Column.UniqueName != "Agent" && e.Column.UniqueName != "casedt" && e.Column.UniqueName != "CaseNo")
            {
                e.Column.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
                e.Column.HeaderStyle.HorizontalAlign = HorizontalAlign.Right;
            }
            if (e.Column.DataType == typeof(String))
            {
                e.Column.ItemStyle.HorizontalAlign = HorizontalAlign.Left;
                e.Column.HeaderStyle.HorizontalAlign = HorizontalAlign.Left;

            }
           
            
              
           
        }
       

    }
   
 
    protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
    {
        if (CheckBox1.Checked == true)
        {
            chkAgent.Visible = false;
            
        }
        else
        {
            chkAgent.Visible = true;
            bindagent();
            

        }
    }
    public void bindagent()
    {
        conns();
        SqlConnection con = new SqlConnection(conn);
        SqlCommand com;
        con.Open();
        com = new SqlCommand("Select CODE, NAME from AGENT Order by Name", con);
        SqlDataAdapter da = new SqlDataAdapter(com);
        DataTable dt = new DataTable();
        da.Fill(dt);
        chkAgent.CreateCheckBox(dt, "name", "code");
    }
}


Thanks & Regards
Purojit

Purojit
Top achievements
Rank 1
 answered on 17 Jun 2013
1 answer
89 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
114 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
173 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
151 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
53 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?