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

Hi,
  I have used Radcontrol in Radcombobox, Radtextbox In Grid(See my grid row screen shot)
 Item list selected to assign Descrption also.
Then i have entered remaining fileds.
 Rate Column Entered to Tab Key Press Next Row Item filed to focus set.
How to Row Create and radcombobox to bind

Example:
 Default Grid Row set 5 Rows
  I have Entered 4th row Rate to Tab Key Press add one Row With radCombobox Bind.


Thanks,
Ansari
Eyup
Telerik team
 answered on 17 Jun 2013
1 answer
277 views
Hi,

We have an application built in Silverlight, in it we are using RadDateTimePickerControl for Silverlight which shows Date and time together in the popup windows.

We also have few ASP.Net pages which we are showing in the above Silverlight application.

In ASP.net pages we are also using the RadDateTimePickercontral for ASP.net but in it Date and Time comes as separate selectable icons and user has to click date icon to select date and clock icon to select time.

We want both the control to behave same for consistency.
Could you suggest some approch or way to make the ASP.net RadDateTimePickerControl to behave same as Silverlight RadDataTimePickerControl.

Thanks and Regards,
Nitin Garg

Kostadin
Telerik team
 answered on 17 Jun 2013
1 answer
228 views
Hello!

I have a 'classic' RadMenu with different items. My goal is to read the text of the menu items from a funtion in code behind. Reading from resx works (first item). The other menu items don't show any text.

ASPX:
         <radM:RadMenu ID="phMenu" runat="server" IsContext="True" ContextMenuElementID="none"
            CausesValidation="false">
            <Items>
               <radM:RadMenuItem runat="server" Text="<%$Resources:InputControlsRes,menuAddFiltername_Text %>" Value="AddFiltername" />
               <radM:RadMenuItem runat="server" Text='<%# GetStringResource("ActionId") %>' Value="AddActionId" />
               <radM:RadMenuItem runat="server" Text='<%# GetStringResourceActionId %>' Value="AddActionIdFix" />
               <radM:RadMenuItem runat="server" Text='<%= GetStringResourceActionIdPro100 %>' Value="AddActionIdFixPro100" />
            </Items>
         </radM:RadMenu>

Code Behind:
   Protected Function GetStringResource(key As String) As String
      Return key
   End Function

   Protected Function GetStringResourceActionId() As String
      Return "ActionId"
   End Function

   Protected Function GetStringResourceActionIdPro100() As String
      Return "GetStringResourceActionIdPro100"
   End Function

Functions in code behind are never called, even if I do a DataBind.

Regards,
Tonino.
Kate
Telerik team
 answered on 17 Jun 2013
1 answer
121 views
Hi 
I have time DateTimePicker On my radscheduler. I am trying to bind my time that starts from 4:00 am and goes next day till 3:30. 

This is how i am binding my time.
 startpicker.TimeView.CustomTimeValues = Assistant.TimeList(Assistant.GetStartTimeOfDay(this.TrmUsageSettingList["StartTimeOfDay"].ReturnValue));
 startpicker.TimeView.DataList.DataSource = Assistant.TimeList(Assistant.GetStartTimeOfDay(this.TrmUsageSettingList["StartTimeOfDay"].ReturnValue));
 startpicker.TimeView.DataList.DataBind();

But my screen looks like this(see attached file). I cannot see any time there but if i click there is a value. 

Thank you.

  
Vasil
Telerik team
 answered on 17 Jun 2013
5 answers
611 views
We're migrating to Azure and need to figure out how to configure the RadUpload control to write binary files (images specifically) to Azure Blob storage.  Can someone point me to documentation that demonstrates how to accomplish this? Thanks!
Peter Filipov
Telerik team
 answered on 17 Jun 2013
1 answer
98 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
120 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
220 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
351 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
178 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
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?