Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
108 views
Is there any known issues with calling RadAjaxManager ajaxRequest from within SharePoint?  Are there any settings/variable I should check in the SharePoint masterpage?

I have a combobox with AllowCustomText = True.  When the user presses enter, I call ajaxRequest to update a grid on the screen.  The problem is it only works 1 time.  After the first time, ajaxRequest gets called, but the loading panel does not show, and the grid does not update.  I added alerts to make sure that the AjaxManager is found in the javascript, and ajaxRequest calls with no error.  I have set up the same senario in a simple web project, and it works fine.  But when I use it on a page in SharePoint, the issue exists.

Here is my code:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest" RequestQueueSize="3" />
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Telerik" />
<telerik:RadComboBox ID="cmbSearch" runat="server" Width="220px" AllowCustomText="True" >
    <ItemTemplate>
        <telerik:RadGrid ID="grdSearch" Width="530px" runat="server" OnNeedDataSource="grdSearch_NeedDataSource">
            ...
        </telerik:RadGrid>
    </ItemTemplate>
    <Items>
        <telerik:RadComboBoxItem runat="server" Text=" "></telerik:RadComboBoxItem>
    </Items>
</telerik:RadComboBox>


protected void Page_Load(object sender, EventArgs e)
{
    RadGrid grid = cmbSearch.Items[0].FindControl("grdSearch") as RadGrid;
    RadAjaxManager1.AjaxSettings.AddAjaxSetting(RadAjaxManager1, grid, RadAjaxLoadingPanel1);
}

<telerik:RadCodeBlock ID="rcb1" runat="server">
    <script type="text/javascript">
        window.onload = RegisterSearchEvent;
             
        function RegisterSearchEvent() {
            var combo = $find("<%= cmbSearch.ClientID %>");
            var input = combo.get_inputDomElement();
            input.attachEvent("onkeydown", searchBoxKeyDown);
         }
 
        function searchBoxKeyDown(e)
        {
             if (!e)
                 e = window.event;
             var code = e.keyCode;
             if (code == 13)
             {
                 var combo = $find("<%= cmbSearch.ClientID %>");
                 $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("LoadFilteredData");
              }
 
              e.cancelBubble = true;
              if (e.stopPropagation)
              {
                  e.stopPropagation();
              }
              return false;
          }
      }
  </script>
</telerik:RadCodeBlock>

Any help would be appreciated.

Thanks,
Justin
Justin Lee
Top achievements
Rank 1
 answered on 21 Oct 2011
1 answer
191 views
So I have a RadGrid that is bound to the result of a SOAP call that returns a bunch of clients. Each client's country is returned as the 3 digit iso3 code (examples: "USA" for Unites States or "AUT" for Austria).The country column is bound using a GridBoundColumn.

I already have a table that contains the iso3 codes and the full names of the country that I can reference.

I'm wondering how can I most efficiently change the iso3 output to show the full name to the user.
 
Shinu
Top achievements
Rank 2
 answered on 21 Oct 2011
3 answers
194 views
Hi,

Yesterday, in order to be able to modify the layouts of some of the RadEditor dialogs, I created the EditorDialogs folder and stuck in a few of the ascx controls that we wanted to change. One was the ImageManager. Basically all I wanted to do with that was to change the overall dialog size since it was cutting off the Cancel and OK buttons.

However when I open up the ImageManager, select an image and then click on Image Editor, I get an error:
Inner Exception: Unknown server tag 'telerik:RadImageEditor'.
at System.Web.UI.TagPrefixTagNameToTypeMapper.System.Web.UI.ITagNameToTypeMapper.GetControlType(String tagName, IDictionary attribs) at System.Web.UI.MainTagNameToTypeMapper.GetControlType2(String tagName, IDictionary attribs, Boolean fAllowHtmlTags) at System.Web.UI.MainTagNameToTypeMapper.GetControlType(String tagName, IDictionary attribs, Boolean fAllowHtmlTags) at System.Web.UI.RootBuilder.GetChildControlType(String tagName, IDictionary attribs) at System.Web.UI.ControlBuilder.CreateChildBuilder(String filter, String tagName, IDictionary attribs, TemplateParser parser, ControlBuilder parentBuilder, String id, Int32 line, VirtualPath virtualPath, Type& childType, Boolean defaultProperty) at System.Web.UI.TemplateParser.ProcessBeginTag(Match match, String inputText) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)
 ...Telerik.Web.UI.DialogHandler.aspx%3fDialogName%3dImageEditor%26Skin%3dOffice2007%26Title%3dImage+Editor%26doid%3d22a2c583-8c90-4554-bc20-06f6848d044d%26dpptn%3d%26dp%3dY3VlR29uZVRsdydSAiwoFW98cgJtYU5EdHIWEAAcMzJnAl8BYWBTDG1nNxEBdWBmVnN8VmJ%2bQxkBNQA8BHwNa2Fg


Both the Telerik.Web.UI and the Telerik.Web.Design have the version: 2011.1.413.35 and Runtime Version: v2.0.50727.

The real upshot of this is, even if I delete the ImageEditor.ascx file the error remains, which means that I'm unable to use the ExternalDialogs because by using it, the error occurs.

FYI, the RadEditor is created as a user control so it is not declared on any aspx page.
 
Suggestions?

Thanks,
Cameron
Rumen
Telerik team
 answered on 21 Oct 2011
2 answers
217 views
I have a RadGrid with multiple pages (or could be a single page) based on the number of values being displayed on the grid.  I would like the grid to automatically move on to the next page after 60 seconds.  When it reaches the last page, it should go back to the first page. 

I have been searching the forums for something of this nature but I haven't found anything yet.  Has anyone tried to do this?
Iana Tsolova
Telerik team
 answered on 21 Oct 2011
1 answer
193 views

 

 

 

<telerik:RadListView ID="RadListView3" runat="server" OnLayoutCreated="OnLayoutCreated" ItemPlaceholderID="ProductsContainerItems" OnItemCommand="RadListViewItemCommand" GroupPlaceholderID="GroupsProductsContainer" GroupItemCount="4">

<LayoutTemplate>

    <asp:PlaceHolder ID="GroupsProductsContainer" runat="server" />

</LayoutTemplate>

<GroupTemplate>

    <fieldset style="float: left; width: auto; border-width:1px; border-color:Gray; ">

    <legend><asp:Label ID="lblLegendDag" runat="server" Text="Maurice"></asp:Label></legend>

    <div id="contentproducts">

        <asp:PlaceHolder ID="ProductsContainerItems" runat="server" />

    </div>

    </fieldset>

</GroupTemplate>

How can I set the label lblLegendDag which is in the GroupTemplate.
I tried this with the following code, but this is not working.

 

Label test = (Label)RadListView3.FindControl("lblLegendDag");

The result is that test delivers null.

Can someone helps me with this problem.

 

 

Iana Tsolova
Telerik team
 answered on 21 Oct 2011
3 answers
125 views
<telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Vista" SelectedIndex="0"
  MultiPageID="RadMultiPage1"  Align="Justify">
<Tabs>
<telerik:RadTab Text="Tab1" PageViewID="Pageview1"></telerik:RadTab>
<telerik:RadTab Text="Tab2" PageViewID="Pageview2"></telerik:RadTab>
<telerik:RadTab  Text="Tab3" PageViewID="Pageview3" IsBreak="True"></telerik:RadTab>
<telerik:RadTab Text="Tab4" PageViewID="Pageview4"></telerik:RadTab>
<telerik:RadTab Text="Tab5" PageViewID="Pageview5"></telerik:RadTab>
<telerik:RadTab Text="Tab6" PageViewID="Pageview6"></telerik:RadTab>
</Tabs>
</telerik:RadTabStrip>

Multi-line Tabstrip creates extra space and bullet in IE. In firefox and chrome, it has no issue.
Kate
Telerik team
 answered on 21 Oct 2011
2 answers
326 views


If the OrderOption changed  radgrid _prerebder is fired butVisible = true; Columns are not showing



if (OrderOption == "Order Pending")
            {
                foreach (GridDataItem item in RadGrid1.MasterTableView.GetItems(GridItemType.Item))
                {
                    RadGrid1.MasterTableView.GetColumn("orderno").Visible = false;
                    RadGrid1.MasterTableView.GetColumn("orderdate").Visible = false;
                    RadGrid1.MasterTableView.GetColumn("quotationno5").Visible = true;
                }
            }
else if (OrderOption == "Order Generated")
            {
                foreach (GridDataItem item in RadGrid1.MasterTableView.GetItems(GridItemType.Item))
                {
                    RadGrid1.MasterTableView.GetColumn("orderno").Visible = true;
                    RadGrid1.MasterTableView.GetColumn("orderdate").Visible = true;
                    RadGrid1.MasterTableView.GetColumn("quotationno5").Visible = false;
                }
            }


Thanks,
Mohamed.
mohamed
Top achievements
Rank 1
 answered on 21 Oct 2011
3 answers
160 views
I have a RadCombobox being used exactly like the example here:
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridincombobox/defaultcs.aspx?product=combobox

I pretty much copied the code from the demo.  Everything works exactly like the demo except for 1 thing...  If you type too fast, its stops working.  After entering 3 characters, it works fine if you wait for the grid to load after each character, but if you type too fast, it stops working.  Once it stops working, the grid doesn't refresh even if you clear the text and start again. You have to refresh the page to get it to start working again.

I cannot reproduce it in the online demo, and since my code is the same, I don't expect you to know what's wrong.  However, if you can give me some tips on what might be the cause, or a way to diagnose the issue, it would be greatly appreciated.

Differences between my app and the demo:
    - I'm calling a WCF server from the code behind instead of retrieving directly from a database
    - My combobox is in the masterpage of the site.
    - My application is in SharePoint

Thanks,
Justin
Justin Lee
Top achievements
Rank 1
 answered on 21 Oct 2011
1 answer
150 views
Hello,
I use toolbar as a control inside CommandItemTemplate for RadGrid. One of buttons has CommandName="DeleteSelected". I can select rows only from clientside. How do I pass row IDs to CommandArgument from clientside?
That's how I use the button:
<telerik:RadToolBarButton runat="server" ImageUrl="~/images/btnDel.png" Value="delete"
            CommandName="DeleteSelected" Enabled="false"/>


function ToolbarClientButtonClicking(sender, args) {
            if (args.get_item().get_value() == "delete") {               
                 args.set_cancel(!confirm("Delete selected rows?"));
                return;
            }
Is there a way to add custom arguments to command from clientside before postback and ItemCommand event?
Thank you
Kevin
Top achievements
Rank 2
 answered on 21 Oct 2011
1 answer
353 views
Hi, when I click on the cancel button on the javascript confirm dialog, it does do a postback. 

The problem is that the file is just a (.cs), so I can't use the "return args.set_cancel(true);" argument in de aspx file.
.
Creating Remove button and javascript confirm:
// Remove
rtb = new RadToolBarButton();
rtb.CommandName = "Remove";
rtb.Text = "";
rtb.ImageUrl = "~/Images/actiontoolbar/actiontoolbar_remove.png";
rtb.DisabledImageUrl = "~/Images/actiontoolbar/actiontoolbar_remove_grayed.png";
rtb.CausesValidation = false;
rtb.Attributes.Add("onclick", "javascript: if (!confirmDelete()) return false;");
radtoolbar.Items.Add(rtb);

Creating message:
/// <summary>
/// Shows a conformation dialog when deleting.  On by default.
/// </summary>
[DefaultValue(true)]
public bool ConfirmDelete
{
    get
    {
        return (bool)(this.ViewState["ConfirmDelete"] ?? true);
    }
    set
    {
        this.ViewState["ConfirmDelete"] = value;
    }
}
 
/// <summary>
/// Shows this message in a conformation dialog when deleting ans ConfirmDelete is on.  On by default.
/// </summary>
[DefaultValue("Are you sure you want to delete this record?")]
public string ConfirmDeleteMessage
{
    get
    {
        return (string)(this.ViewState["ConfirmDeleteMessage"] ?? "Are you sure you want to delete this record?");
    }
    set
    {
        this.ViewState["ConfirmDeleteMessage"] = value;
    }
}
 
protected override void OnLoad(EventArgs e)
{
    base.OnLoad(e);
    RadScriptManager.RegisterClientScriptBlock(Page, GetType(), "confirmdelete", @"function confirmDelete(){return confirm('" + ConfirmDeleteMessage + "');}",true);
}

I hope somebody can help me.

Thanks.
Kevin
Top achievements
Rank 2
 answered on 21 Oct 2011
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?