Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
141 views
The setup:
I have a tabstrip with three tabs. The tabstrip is set to render only the selected page and autopostback. The ajaxmanager handles this guy so that there's no postback. If I click an item on the default tab (loads initially), the command item fires just fine. If I switch tabs to access one of the other grids and click one of that grid's items, it just resets the tabs and never actually fires the command item.

I'm sure I'm missing something really trivial. Does my grid need to be in the ajax manager, and made to control itself?

Thanks in advance.
Tsvetoslav
Telerik team
 answered on 09 Sep 2010
1 answer
106 views
Hi Telerik,

My web-app uses RadWindows, each containing multiple RadEditors.

I am finding that after using a RadEditor in one RadWindow, then closing the RadWindow via the 'X', all textboxes in the parent window and any subsequent RadWindow that is opened become unusable. Clicking any textbox does not make the focus go into the textbox, no cursor is displayed in the textbox and no text can be entered into it.

The problem only occurs in IE browsers (all versions) and seems to be connected with the browser entering its 'ContentEditable' mode. It seems that when a RadEditor becomes active, it takes control of the browser's text insert caret (cursor). Closing the RadWindow, via the 'x', while the RadEditor has control of the cursor seems to prevent any textbox from using it again.

I have found that if I click anywhere else inside the RadWindow before closing it via the 'X', this seems to release the cursor, so other textboxes will continue working.

A similar problem occurs on a single page that uses a MultiView, with multiple RadEditors in one view and textboxes in another view. Switching the view, whilst an editor has control of the text insert caret, causes the textboxes in the other view to become unusable.

I cannot recreate this using a simple test page, so it may be connected with other jQuery scripts/CSS that are used in the application.

I have tried using javascript to move the focus to another element when the 'X' is clicked on the RadWindow but the problem seems to be the cursor rather than the focus.

Do you know of any way that I can release the text insert caret using javascript, prior to a RadWindow being closed?

Debbie
Dobromir
Telerik team
 answered on 09 Sep 2010
2 answers
137 views

Hello everyone,

is it possible to hide the +/- icons for all nodes and always use the tree fully expanded?

Thanks!

Eugen
Top achievements
Rank 1
 answered on 09 Sep 2010
1 answer
240 views
Hello,

I have a bug with tooltip manager.

When it has some target controls defined, my item command event is not raised.

Here is a part of my ascx file :
<div id="Div2" class="field" runat="server">
    <label>
        <asp:Literal ID="lblText1" runat="server"></asp:Literal><uc1:RequiredFieldSign ID="ReqFieldSign1"
            runat="server" />
    </label>
    <asp:Repeater runat="server" ID="rptFiles" OnItemCommand="rptFiles_ItemCommand" OnItemDataBound="rptFiles_DataBound" OnItemCreated="rptFiles_ItemCreated">
        <HeaderTemplate><ul class="filelist"></HeaderTemplate>
        <ItemTemplate>
            <li>
            <a id="apercuimg" runat="server" class="lien" href='<%# DataBinder.Eval(Container.DataItem, "lienclick")%>' target="_blank"><%# DataBinder.Eval(Container.DataItem, "FileName")%></a>
            <span class="RemoveLink" style="padding-left: 30px">
                <asp:LinkButton ID="RemoveImage" Text="Supprimer cet élément" runat="server" OnClick="RemoveImage_Click"
                    CommandName="DeleteImage" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ImageId")%>' CausesValidation="false">
                </asp:LinkButton>
            </span>
            </li>
        </ItemTemplate>
        <FooterTemplate></ul><br /></FooterTemplate>
    </asp:Repeater>
</div>
<telerik:RadToolTipManager runat="server" AnimationDuration="300" ShowDelay="200"
    EnableShadow="true" HideDelay="1" ID="ttmUpload3" Width="10px" Height="10px"
    RelativeTo="Element" Animation="Resize" Position="TopRight" OnAjaxUpdate="OnAjaxUpdate"
  
    Skin="Windows7" />

and here itemcommand event and item created event :

protected

 

void rptFiles_ItemCommand(object sender, RepeaterCommandEventArgs e)

 

{

 

string connString = ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString();

 

 

if (e.CommandName == "DeleteImage")

 

{

 

if (TableId != 1)

 

{

 

string sql = "DELETE FROM Images WHERE ImageId=@ImageId";

 

 

SqlParameter param = new SqlParameter("@ImageId", e.CommandArgument);

 

 

SqlHelper.ExecuteNonQuery(connString, CommandType.Text, sql, param);

 

 

this._dtFiles.Rows.RemoveAt(e.Item.ItemIndex);

 

}

 

else

 

{

 

string sql = string.Format("UPDATE {0} SET {1}=@ImageValue WHERE {1}=@Filename", TableName, FieldName);

 

 

SqlParameter param = new SqlParameter("@ImageValue", DBNull.Value);

 

 

SqlParameter param1 = new SqlParameter("@Filename", ImagePath);

 

 

SqlHelper.ExecuteNonQuery(connString, CommandType.Text, sql, param, param1);

 

 

this._dtFiles.Rows.RemoveAt(e.Item.ItemIndex);

 

}

 

this._dtFiles.Columns.Add("lienclic");

 

 

this.rptFiles.DataSource = this._dtFiles;

 

 

this.rptFiles.DataBind();

 

 

if (rptFiles.Items.Count == 0)

 

{

Div2.Style.Add(

"display", "none");

 

Div1.Style.Add(

"display", "");

 

}

}

}



protected
void rptFiles_ItemCreated(object sender, RepeaterItemEventArgs e)
    {
        if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
        {
            DataRowView drv = (DataRowView)e.Item.DataItem;
  
            Control apercuimg = e.Item.FindControl("apercuimg");
  
            if (drv != null)
            {
                apercuimg.ID = "apercuimg_" + drv["ImageId"].ToString();
  
                if (drv["FileName"] != null && drv["FileName"].ToString() != "")
                {
                    if (drv["FileName"].ToString().ToLower().Contains(".jpg") || drv["FileName"].ToString().ToLower().Contains(".jpeg") || drv["FileName"].ToString().ToLower().Contains(".gif") || drv["FileName"].ToString().ToLower().Contains(".png") || drv["FileName"].ToString().ToLower().Contains(".tif"))
                    {
                        if (apercuimg != null && drv["ImagePath"] != null)
                        {
                            if (drv["FileName"].ToString() != drv["ImagePath"].ToString())
                            {
                                this.ttmUpload3.TargetControls.Add(apercuimg.ClientID, drv["ImagePath"].ToString(), true);
                            }
                            else
                            {
                                this.ttmUpload3.TargetControls.Add(apercuimg.ClientID, this.ViewPath + drv["ImagePath"].ToString(), true);
                            }
                        }
                    }
                    else
                    {
                        drv["lienclick"] = drv["ImagePath"].ToString();
                    }
                }
  
                LinkButton lnk = (LinkButton)e.Item.FindControl("RemoveImage");
                if (lnk != null)
                {
                    lnk.ID = "rmvImage_" + drv["ImageId"].ToString();
  
                    lnk.OnClientClick = "if(confirm('Etes vous sûr de vouloir supprimer cette image?')) {setCookie('deleteimage'," + drv["ImageId"].ToString() + ", 1); return true; }";
                }
            }
        }
    }

Thanks for your help
Svetlina Anati
Telerik team
 answered on 09 Sep 2010
5 answers
275 views
Hello,
I am using Q3 2009 controls and running in IE7. I am attempting to use the scheduler but am experiencing some weird problems. Here is the code for the test project I created:

Markup:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="SchedulerTest._Default" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" 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>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <div> 
         
        <telerik:RadScheduler ID="RadScheduler1" runat="server" OnAppointmentDelete="RadScheduler1_AppointmentDelete" OnAppointmentInsert="RadScheduler1_AppointmentInsert" OnAppointmentUpdate="RadScheduler1_AppointmentUpdate" Skin="WebBlue" OnDataBinding="RadScheduler1_DataBinding"> 
        </telerik:RadScheduler> 
         
        <telerik:RadComboBox ID="RadComboBox1" runat="server" OnSelectedIndexChanged="RadComboBox1_SelectedIndexChanged" 
            Skin="WebBlue" AutoPostBack="true"> 
            <Items> 
                <telerik:RadComboBoxItem runat="server" Selected="True" Text="English (US)" Value="en-US" /> 
                <telerik:RadComboBoxItem runat="server" Text="French (CAN)" Value="fr-CA" /> 
            </Items> 
        </telerik:RadComboBox> 
        <div runat="server" id="dummyDiv" style="display:none"> 
        <asp:TextBox ID="dummyTextBox" runat="server"></asp:TextBox> 
        <asp:RegularExpressionValidator ID="dummyValidator" Display="None" ValidationGroup="" runat="server" ControlToValidate="dummyTextBox"></asp:RegularExpressionValidator> 
        </div> 
         <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
        </telerik:RadScriptManager> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> 
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="RadScheduler1"> 
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadScheduler1" /> 
                        <telerik:AjaxUpdatedControl ControlID="dummyDiv" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="RadComboBox1"> 
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadScheduler1" /> 
                        <telerik:AjaxUpdatedControl ControlID="RadComboBox1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="dummyDiv"> 
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadScheduler1" /> 
                        <telerik:AjaxUpdatedControl ControlID="dummyDiv" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        
         
    </div> 
    </form> 
</body> 
</html> 
 


Code Behind:
using System; 
using System.Data; 
using System.Configuration; 
using System.Collections; 
using System.Web; 
using System.Web.Security; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Web.UI.WebControls.WebParts; 
using System.Web.UI.HtmlControls; 
using Telerik.Web.UI; 
using System.Collections.Generic;  
 
namespace SchedulerTest 
{ 
    public partial class _Default : System.Web.UI.Page 
    { 
        protected void Page_Load(object sender, EventArgs e) 
        { 
            if (!IsPostBack) 
            { 
            } 
        } 
 
        protected void RadScheduler1_AppointmentInsert(object sender, SchedulerCancelEventArgs e) 
        { 
        } 
 
        protected void RadScheduler1_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e) 
        { 
        } 
 
        protected void RadScheduler1_AppointmentDelete(object sender, SchedulerCancelEventArgs e) 
        { 
        } 
 
        protected void RadComboBox1_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) 
        { 
            string selectedCulture = e.Value.Trim(); 
            System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(selectedCulture); 
            RadScheduler1.Culture = culture; 
        } 
 
        protected void RadScheduler1_DataBinding(object sender, EventArgs e) 
        { 
            DataSet callBacks = GetSchedule(); 
            DataView callBackView = callBacks.Tables["callback"].DefaultView; 
 
            RadScheduler1.DataKeyField = "id"; 
            RadScheduler1.DataSubjectField = "subject"; 
            RadScheduler1.DataStartField = "start"; 
            RadScheduler1.DataEndField = "end"; 
            RadScheduler1.DataSource = callBackView; 
        } 
 
        public DataSet GetSchedule() 
        { 
            return GenerateSchedule(); 
        } 
 
        public DataSet GenerateSchedule() 
        { 
            DataTable callBackTable = new DataTable("callback"); 
            callBackTable.Columns.Add("id"); 
            callBackTable.Columns.Add("subject"); 
            callBackTable.Columns.Add("start"); 
            callBackTable.Columns.Add("end"); 
 
            DataRow row = callBackTable.NewRow(); 
            row["id"] = 1; 
            row["subject"] = "CALL"; 
            row["start"] = (new DateTime(2010, 6, 15, 13, 0, 0)).ToString(); 
            row["end"] = (new DateTime(2010, 6, 15, 16, 0, 0)).ToString(); 
            callBackTable.Rows.Add(row); 
 
            DataSet schedule = new DataSet(); 
            schedule.Tables.Add(callBackTable); 
            return schedule; 
        } 
    } 
} 
 

The scheduler renders ok and I can see the hard-coded appointment appear, but when I double click to edit it, the start and end date textboxes flash red (with error symbol) and then return to normal, and then the subject box's error symbol appears, as if it failed validation. I get the following javascript error in IE when this happens:
ValidatorUpdateDisplay is undefined
Code: 0
I can still close the appointment with the 'x' in the top right corner of the edit form, but the 'Save' and 'Cancel' buttons do not work.

If I double-click on a blank timeslot, add some text, and then click 'Options', the error symbol does not appear but I get the script error "'null' is null or not an object".

After searching the forums, I found a few suggestions to place a dummy validator on the page which does not actually validate anything. This has had no effect. Any help will be appreciated. Thank you.
Dan
Top achievements
Rank 2
 answered on 09 Sep 2010
1 answer
323 views
Hi,

 we have slider control on our page and it is visible on IE and FF browser but it is not showing in google chrome browser.
I am really surprise to see like this.
Please find attached Image for this..

Regards
Reetesh
Tsvetie
Telerik team
 answered on 09 Sep 2010
5 answers
181 views
We are using the built in MOSS spell checker to check spelling for all controls on the page which includes text boxes as well as rad editor controls. The checker reads the html in the rad editors and thus picks up lots of html coding that it thinks are spelling errors.

Since the rad editors have their own spell checkers which work fine, we want to configure the MOSS spell checker to skip any Rad editor controls. I read here: http://www.codedigest.com/Articles/Sharepoint/231_How_to_skip_SharePoint_spell_check_for_an_input_control.aspx
that you can add an attribute (excludeFromSpellCheck="true") to a control to have the MOSS spell checker skip it but I have tried this and the MOSS spell checker is still catching html code in the Rad Editor control and reporting it as a spelling error.

Any ideas how I can prevent the MOSS spell checker from checking Rad Editors while still letting it check text boxes on the page?

Thanks,
-Carl
Stanimir
Telerik team
 answered on 09 Sep 2010
2 answers
158 views
Hi

I use radgrid with SqlDataSource and paging enabled.
On asp page there is a select command in sqldatasource.

On codebehind i change select command of sqldatasource when page loads and on some circumstances
it works ok at first page.

but when click next page or any page on pager
it clears the sqlcommand which i changed from codebehind and gets the records according to the
sqldatasource's select command which i put asp page at first.

fer
Top achievements
Rank 1
 answered on 09 Sep 2010
1 answer
80 views
Hi,

I want to apply my custom skin for this I gone through the below link and do the same in my DNN application but slider control not taking custom skin. It is taking from web resource.

http://www.telerik.com/help/aspnet-ajax/slider_appearancecustomskin.html

I have applied custom skin and many controls like telerik Grid and so on. but with slider control it is not working

Can you please give me more detail how can I apply custom skin on Slider control.

Regards
Reetesh
Tsvetie
Telerik team
 answered on 09 Sep 2010
3 answers
311 views
Hi,

Is there a way to cancel an AJAX request in progress (after the onRequestStart stage)?

My use case is as follows: I have some search controls on a page with a RadGrid below.  When the search control values change, I trigger a second AJAX request to update the grid.  The DB search behind the grid can take a long time, so in this way, the user may still modify the search controls while the grid is updating.

Currently however, when the search controls change, the first grid update must complete before the next AJAX request actually fires, so there isn't really a speed improvement despite the controls being active during the grid update (the requests are queued and fired serially).  What I would like to do is cancel any running grid update when the controls change and fire the updated one.

Is this possible?  I know it isn't a limit of JavaScript since I've managed this with hand-coded JavaScript & the YUI JavaScript framework, but I can't seem to find a way to do it with RadControls nor with a cursory inspection of the jQuery docs.

Thanks!

Derek
Pavlina
Telerik team
 answered on 09 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?