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

I would like to know how i get the search button into the textbox just like the one you have http://www.telerik.com/ or http://www.kendoui.com/get-help.aspx.  Thanks a lot
Princy
Top achievements
Rank 2
 answered on 20 Aug 2012
0 answers
83 views
I have date in another variable.
time in a string variable [ stored as datetime.ToShortTimeString() format.

How can I display both in the dateTimePicker's caledar view ?

It is okay if we've to modify variables.
Aarsh
Top achievements
Rank 1
 asked on 20 Aug 2012
1 answer
262 views
Instead of using visibleonpageload i used show method to display notification.But it reappears after postback.Is there any work around for this?
Princy
Top achievements
Rank 2
 answered on 20 Aug 2012
0 answers
70 views
Hi

I'm trying implement drag and drop functionality in my user control which is actually one of my custom wizard steps.
I've implement all most all parts of code in the online demo http://demos.telerik.com/aspnet-ajax/grid/examples/programming/draganddrop/defaultcs.aspx and faced with next situation : drag and drop fires only once. After this it doesn't work anymore unless I refresh page. Does anybody know how to fix it?

Thank you
Andrew
Top achievements
Rank 1
 asked on 19 Aug 2012
0 answers
111 views
Hi everyone.

I'm new with Telerik Controls, and I have a question. I use DevExpress Controls a long time ago, and I remember that I can Filter the Columns data without PostBack, only tiping de text, and the grid Filter.

But, with the Telerik Grid... I can't do this... always fired a PostBack... and this is so slow...

Can I filter my Columns Data only by tiping the text I want to search???

Please help me... 

Regards...
Juan
Top achievements
Rank 1
 asked on 19 Aug 2012
0 answers
61 views
Three   attribute   set    of    diagram.

One:
       How  to  make   the    "Shape"    can't    be   selected???        As   the   first    picture   attached... 

Two:
      How  to  make   the    "Shape"    can't    be   edited???        As   the   second    picture   attached...

Three:
      
 How   to   make     the     "Shape"    don't    appear     dotted     line   when  left  mouse   button  down   ???        As   the   third    picture   attached... 
 In  a  word:

       The Diagram   is   used   to   display ,  needn't    each   Shap   can   be   edited  ,  such as  selected  ,edited the  text.
       How  to  set???   
Yostec
Top achievements
Rank 1
 asked on 19 Aug 2012
2 answers
527 views
I have a RADGrid named 'RadGrid1' in my aspx page.

RadGrid1 has a form template edit form and this edit form contains:

  • A text box with an ID 'txtEmail' for editing the email address of the selected record
  • A button with an ID 'ButtonA'

What I am trying to do is:

When user click the 'ButtonA' button,
I want to send the email address information shown in the 'txtEmail' text box of the selected record to the code behind file's 'ButtonA' onClick event procedure.

I need to know the correct syntax/code for doing this.

Code behind file:

protected void ButtonA_Click(object sender, EventArgs e)
{
    string EmailAddress = // How can I get the email address information shown in the ‘txtEmail’
                   //  text box in the Form Template Edit Form
}

Thank you. :D
ILJIMAE
Top achievements
Rank 1
 answered on 19 Aug 2012
0 answers
82 views
I have the following code with the radComboxBox text value as the param to the sqldatasource. the result set of the sqldatasource will be populate to the raddatePick. this is not work. can anyone help me?

-----------------------------------------aspx ------------------------------------------

<%@ Page Language="c#" Inherits="imatrader_general_Default" CodeFile="Default.aspx.cs" %>


<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Src="../../Common/Header.ascx" TagName="Header" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div style="position: relative; top: 3px; left: 3px; width: 400px; height: 30px;">
        <telerik:Header runat="server" ID="Header1" NavigationLanguage="CS" ShowDbResetTimer="true">
        </telerik:Header>
    </div>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
            </asp:ScriptReference>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
            </asp:ScriptReference>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
            </asp:ScriptReference>
        </Scripts>
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div style="position: relative; top: 10px; left: 3px; height: 30px; font: bold 20px Arial;">
        <asp:Label ID="Label1" runat="server" Text="Download" Height="27px"></asp:Label>
    </div>
    <div style="position: relative; top: 10px; left: 3px; height: 200px;">
        Symbol
        <telerik:RadComboBox ID="RadComboBox1" runat="server" AllowCustomText="true" Width='100'
            DataSourceID="SqlDataSource1" Filter="Contains" DataTextField="code" AutoPostBack="true " OnSelectedIndexChanged="RadComboBox1_OnSelectedIndexChanged">
        </telerik:RadComboBox>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MarketDbConnectionString %>"
            SelectCommand="SELECT '^HSCE' AS code UNION SELECT '^HSI' AS code UNION SELECT '^DJI' AS code UNION SELECT DISTINCT code FROM Quote ORDER BY Code">
        </asp:SqlDataSource>
        <br />
        <br />
        From
        <telerik:RadDatePicker ID="FromDatePicker" Width="100px" runat="server" SelectedDate='<%# Bind("startDate") %>'
            Culture="zh-HK">
            <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
        </telerik:RadDatePicker>
        <%--        <telerik:RadDatePicker ID="RadDatePicker1" Width="100" runat="server" DbSelectedDate='<%# startDate %>'
            Culture="zh-HK" AutoPostBack="True" OnSelectedDateChanged="FromDatePicker_SelectedDateChanged">
            <Calendar ID="Calendar1" UseRowHeadersAsSelectors="False" runat="server" UseColumnHeadersAsSelectors="False"
                ViewSelectorText="x">
            </Calendar>
            <DateInput ID="DateInput1" DisplayDateFormat="d/M/yyyy" DateFormat="d/M/yyyy" runat="server" LabelWidth="40%"
                AutoPostBack="True">
            </DateInput>
            <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
        </telerik:RadDatePicker>
        --%>
        &nbsp;To
        <telerik:RadDatePicker ID="ToDatePicker" Width="100" runat="server" DbSelectedDate='<%# endDate %>'
            Culture="zh-HK">
            <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
        </telerik:RadDatePicker>
        <br />
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:MarketDbConnectionString %>" 
            SelectCommand="SELECT DATEADD(day, 1, MAX(tradeDate)) AS startDate FROM vwMaster WHERE (code = @code)">
            <SelectParameters>
                <asp:ControlParameter ControlID="RadComboBox1" Name="code" 
                    PropertyName="SelectedValue" />
            </SelectParameters>
        </asp:SqlDataSource>
        <br />
        <telerik:RadButton ID="RadButtonStart" runat="server" Text="Start" OnClick="RadButtonStart_Click">
        </telerik:RadButton>
        <br />
        <br />
        <asp:Label ID="lblResults" runat="server" Text=""></asp:Label>
        <br />
    </div>
    </form>
</body>
</html>


---------------------- cs ----------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;


using System.Data;
using System.Net;
using System.Data.SqlClient;
using YahooStocks;
using Telerik.Web.UI.Skins;
using Telerik.Web.UI;


public partial class imatrader_general_Default : System.Web.UI.Page
{


    protected DateTime? startDate
    {
        set
        {
            ViewState["strD"] = value;
        }
        get
        {
            if (ViewState["strD"] != null)
                return (DateTime)ViewState["strD"];
            else
                return new DateTime(DateTime.Today.Year - 1, DateTime.Today.Month, DateTime.Today.Day);
        }
    }
    protected DateTime? endDate
    {
        set
        {
            ViewState["endD"] = value;
        }
        get
        {
            if (ViewState["endD"] != null)
                return (DateTime)ViewState["endD"];
            else
                return DateTime.Today;
        }
    }
    protected void RadButtonStart_Click(object sender, EventArgs e)
    {


        YahooDownloader ydl = new YahooDownloader();
        DataTable dtable = ydl.UpdateSymbol(this.RadComboBox1.Text, FromDatePicker.SelectedDate, ToDatePicker.SelectedDate);
        //DataTable dtable = ydl.UpdateSymbol(this.RadComboBox1.Text, startDate, endDate);
        if (dtable != null)
        {
            string code = RadComboBox1.Text;
            ydl.InsertOrUpdateIssue(dtable, code);
        }
        lblResults.Text = ydl.getMessage();
    }
    //protected void FromDatePicker_SelectedDateChanged(object sender, Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs e)
    //{
    //    startDate = this.FromDatePicker.SelectedDate;
    //}


    //protected void ToDatePicker_SelectedDateChanged(object sender, Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs e)
    //{
    //    endDate = this.ToDatePicker.SelectedDate;
    //} 




    protected void RadComboBox1_OnSelectedIndexChanged(Object sender, RadComboBoxSelectedIndexChangedEventArgs e)
    {
    }


    
    
    protected void Page_Load(object sender, EventArgs e)
    {
        //FromDatePicker.SelectedDate = startDate;
        //ToDatePicker.SelectedDate = endDate;
    }
    
}
G
Top achievements
Rank 1
 asked on 18 Aug 2012
0 answers
57 views
Hi
How can I do Localization for RadInputManager ? this control does not participate in 'Generate Local Resource' of VS.
I want to get ErrorMessage and EmptyMessage from the page resource file.
I added meta:resourcekey manually , it worked, but just for ErrorMessage

Thank you very much for your feedback
reza
Top achievements
Rank 1
 asked on 18 Aug 2012
1 answer
379 views
Hello Everyone,
Can anyone help me out in highlight (or HTML format) the search string in the combobox results.
I need to use it in the Items_Requested server side method of Combobox
and also a web service method for  combobox in grid.
I tried the following code , and it shows the search text but  created problem for the ecents of Combobox.
//************************  Homepage.aspx.cs **********************************************************  
public static string SetHighlight(string strOrginal, string strNeedle)
    {
        Regex regex = new Regex(strNeedle, RegexOptions.IgnoreCase);
        //return regex.Replace(strOrginal, "<b>" + strNeedle + "</b>");
        return regex.Replace(strOrginal, "<font color=red>" + strNeedle + "</font>");
    }
 
[WebMethod]
    public static RadComboBoxData GetAirportNames(RadComboBoxContext context)
    {
        //DataTable data = GetData(context.Text);
        CommonDL CDL = new CommonDL();
        DataTable data = CDL.LoadAirports_HomePage(context.Text);
        RadComboBoxData comboData = new RadComboBoxData();
        int itemOffset = context.NumberOfItems;
        int endOffset = Math.Min(itemOffset + ItemsPerRequest, data.Rows.Count);
        comboData.EndOfItems = endOffset == data.Rows.Count;
  
        List<RadComboBoxItemData> result = new List<RadComboBoxItemData>(endOffset - itemOffset);
        for (int i = itemOffset; i < endOffset; i++)
        {
            RadComboBoxItemData itemData = new RadComboBoxItemData();
            itemData.Text = SetHighlight(data.Rows[i]["PortName"].ToString(), context.Text.ToString());
            itemData.Value = data.Rows[i]["AirportID"].ToString();
            itemData.Attributes.Add("OrginalText", data.Rows[i]["PortName"].ToString());
            //itemData.Attributes.Add(data.Rows[i]["PortName"].ToString(), context.Text.ToString());
            result.Add(itemData);
        }
        comboData.Message = GetStatusMessage(endOffset, data.Rows.Count);
        comboData.Items = result.ToArray();
        return comboData;
    }
  
  
//************************  Homepage.aspx   **********************************************************  
  
<telerik:RadComboBox Width="160" ID="cmbFromAirportP3" ValidationGroup="P3"
                                                class="text-input"
                                                    AllowCustomText="true"
                                                    runat="server" DataTextField="PortName"
                                                    DataValueField="AirportID"
                                                    EmptyMessage="Select From Airport" Text=""
                                                    EnableLoadOnDemand="true"
                                                    ShowMoreResultsBox="true"
                                   EnableVirtualScrolling="false"
                                   ChangeTextOnKeyBoardNavigation="false"
                                   OnClientDropDownClosing="cmb_Closing"
                                   OnClientItemsRequested="cmbOrgName_ClientItemsRequested"
                                   OnClientItemsRequesting="cmbOrgName_ClientItemsRequesting"
                                   OnClientSelectedIndexChanged="cmbOrgName_ClientSelectedIndexChanged"
                                    OnClientBlur="cmb_Blur"
                                    >
                                                    <WebServiceSettings Method="GetAirportNames" Path="HomePage.aspx" />
                                                </telerik:RadComboBox>
  
  
//************************  Javascript Code  **********************************************************  
<script type="text/javascript" id="S2">
            function cmbOrgName_ClientSelectedIndexChanged(sender, args) {
                //Get OrginalText and set to the selected item
                var orginalText = sender.get_selectedItem().get_attributes().getAttribute("OrginalText");
                sender.set_text(orginalText);
            }
            function cmb_Blur(sender, args) {
                //Get OrginalText and set to the selected item
                  
                var orginalText = sender.get_selectedItem().get_attributes().getAttribute("OrginalText");
                sender.set_text(orginalText);
                sender.hideDropDown();
//                alert('Cmbo lost focus');
            }
            function cmb_Closing(sender, args) {
                //Get OrginalText and set to the selected item
                var orginalText = sender.get_selectedItem().get_attributes().getAttribute("OrginalText");
                sender.set_text(orginalText);
                  
            }
  
              
            function cmbOrgName_ClientItemsRequesting(sender, args) {
                //clear the existing items
                sender.get_items().clear();
            }
            //If no records returned, collapse the dropdown automatically.
  
            function cmbOrgName_ClientItemsRequested(sender, args) {
                if (sender.get_items().get_count() == 0) {
                    sender.toggleDropDown();
                }
            }
              
        </script>

Thanks,
Vishal
Abhi Shinde
Top achievements
Rank 1
 answered on 18 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?