Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
82 views
Hello,

I am working on a grid with some columns have the width automatically adjusted, some others adjusted by resizeToFit() and some other the width is fixed by HeaderStyle.Width.

If there is a column re sized by  resizeToFit(), all the following columns' width with HeaderStyle.Width are not respecting this parameter. The columns before the one re sized to fit work well.

Also if I use resizeToFit() and resizeColumn(index,width) (not using HeaderStyle.Width in this case), only resizeColumn is applied (placed after resizeToFit() in the script).

Could please explain how can they all get along together?
Thank you
Gregory


Antonio Stoilkov
Telerik team
 answered on 02 Jan 2014
5 answers
89 views
Only in Firefox, using getRadWindow().close(workLink); does not allow a OnClick call from an ASP:LinkButton to fire. There does not seem to be an issue with using a ASP:Button.

If I yank out the following, it fires.
console.log("begin trouble");
            workLink.pages = pageValue; //pages.value <-- just swapped out for pageValue variable;
            selectedText += ")</a>";
            workLink.selectedText = selectedText;
            getRadWindow().close(workLink); //use the close function of the getRadWindow to close the dialog and pass the arguments from the dialog to the callback function on the main page.  



Here's my code.


 
<asp:LinkButton ID="cmdUpdate" CssClass="dnnPrimaryAction" resourcekey="cmdUpdate" Text="Save and Exit" runat="server" OnClick="cmdUpdate_Click" OnClientClick="if(!insertLinkFromDB()){return false;};" UseSubmitBehavior="false" ></asp:LinkButton
 
 
if (window.attachEvent) {
            window.attachEvent("onload", initDialog);
        }
        else if (window.addEventListener) {
            window.addEventListener("load", initDialog, false);
        }
 
        var pages = document.getElementById("pages");
        var workLink = null;
 
        function getRadWindow() {
            if (window.radWindow) {
                return window.radWindow;
            }
 
            if (window.frameElement && window.frameElement.radWindow) {
                return window.frameElement.radWindow;
            }
 
            return null;
        }
 
        function initDialog() {
            var clientParameters = getRadWindow().ClientParameters; //return the arguments supplied from the parent page  
 
            pages.value = clientParameters.innerHTML;
            workLink = clientParameters;
        }
 
function insertLinkFromDB() //fires when the Insert Link button is clicked on the "New Item" Screen  
        {
            //create an object and set some custom properties to it
            var authorLastValue = $('#referenceAuthor').val();
            var dateValue = $('#referenceYear').val();
            var currentId = $('.highlighted').attr('id');
 
            var selectedText;
 
            selectedText = "<a href=\"#citation_" + currentId + "\">(" + authorLastValue + ", " + dateValue;
 
            var pageValue = $('#pages2').val();
            if (pageValue != "") {
                selectedText += " Pg " + pageValue;
            }
 
            console.log("begin trouble");
            workLink.pages = pageValue; //pages.value <-- just swapped out for pageValue variable;
            selectedText += ")</a>";
            workLink.selectedText = selectedText;
            getRadWindow().close(workLink); //use the close function of the getRadWindow to close the dialog and pass the arguments from the dialog to the callback function on the main page.  
 
            return true;
        }
 
//This is a radwindow workaround. Buttons call the closewindow function
        function closeWindow() {
            GetRadWindow().close();
        }
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow)
                oWindow = window.radWindow;
            else if (window.frameElement.radWindow)
                oWindow = window.frameElement.radWindow;
            return oWindow;
        }
Stanimir
Telerik team
 answered on 02 Jan 2014
5 answers
97 views
Tested this on http://demos.telerik.com/aspnet-ajax/editor/examples/default/defaultcs.aspx with IE7:

1. Clear all text (in case this matters, I did CTRL+A followed by backspace)
2. Set font to Arial
3. Type some text
4. Set font size to 20px
5. Font changes back to Times New Roman
Stanimir
Telerik team
 answered on 02 Jan 2014
2 answers
37 views
I have a telerik drop down box inside a Telerik grid's edit form. When user change the value of a dropdown i called server side event and binds/sets others dropdowns as below code:

Protected Sub RdCmbTpcType_IndexChanged _
        (ByVal sender As Object, ByVal e As RadComboBoxSelectedIndexChangedEventArgs)
     
        Dim ddlTpcType As RadComboBox = DirectCast(sender, RadComboBox)
        Dim editItem As GridEditableItem = DirectCast(ddlTpcType.NamingContainer,  _
            GridEditableItem)
        Dim ddlTpcInvoiceItemLevel As RadComboBox = _
            DirectCast(editItem.FindControl("rdcmbTPCInvoiceItemLevel"), RadComboBox)
        Dim ddlTpcRateType As RadComboBox = _
           DirectCast(editItem.FindControl("rdcmbTPCRateType"), RadComboBox)
        Dim ddlTpcFeeCode As RadComboBox = DirectCast(editItem.FindControl _
            ("rdcmbTPCFeeCode"), RadComboBox)

        If (ddlTpcType.SelectedValue = CommissionTypes.Premium) Then
            BindDropDown(ddlTpcInvoiceItemLevel, ReturnPremiumsView, _
                         "InvoiceItemLevel", "InvoiceItemID")
            ddlTpcFeeCode.Enabled = False

        ElseIf (ddlTpcType.SelectedValue = CommissionTypes.Fee) Then
            BindDropDown(ddlTpcInvoiceItemLevel, ReturnFeesView, _
                         "InvoiceItemLevel", "InvoiceItemID")
            BindTpcFeeCode(editItem)
            ddlTpcFeeCode.Enabled = True
        Else
            ddlTpcRateType.SelectedValue = 0

        End If

        EnableDisablePaging("TPCClassToHidePageSelector", "TPCClassToHidePageResizer", "true")

    End Sub


So my question is like i want to minimize this method by using any inbuilt/custom ways which can be provided by Telerik or do i have to directcast all control and do code like above for all these type of events?

Any suggestion will be helpful.
Himanshu
Top achievements
Rank 1
 answered on 02 Jan 2014
2 answers
161 views
Hi Telerik,

There is a new version of WIRIS editor (v3).  I'm wondering if you have an example application that integrates the RadEditor and WIRIS editor 3 .NET plugins + WIRIS server components.  I can only find integration examples for WIRIS editor (v2).

Thanks and regards,
Joey


Thang Le
Top achievements
Rank 1
 answered on 02 Jan 2014
1 answer
108 views
Hello

I've got a custom control built using AsyncUploader in manual mode targeting a custom handler.  The uploader works fine running locally in Visual Studio, but when deployed the upload never completes and Fiddler reports 302 result for the request to my custom handler.  Firefox and IE 11 both suffer from this problem.

Our setup uses Forms authentication, and anonymous access is allowed.

Do I need to allow anonymous access for the custom handler, i.e.

<location path="CustomHandlers/CropImage.ashx">
  <system.web>
      <authorization>
          <allow users="*" />
      </authorization>
  </system.web>
</location>

Thanks!
Michael
Shinu
Top achievements
Rank 2
 answered on 02 Jan 2014
6 answers
292 views
I have a few cases where I want to cancel the postback of the Search Box. I am trying to use the OnClientSearch, but this doesn't appear to be possible. Am I overlooking something?
Plamen
Telerik team
 answered on 01 Jan 2014
1 answer
620 views
Hi Team Telerik,

We have recently started using Telerik for our product. In our application, we have used scripting to use server side variables at hundreds of places. For example as below.

<a id="lnk1" class="xyz" href="abc.aspx?ReturnPath=<%= returnPath %>">Test</a>

Now, as we have introduced Telerik, we were facing issues around this. By browsing the documentation, we come to know that - we can use RadScriptBlock to avoid this. But I understand that it is only in case if we have script block and any server side variable we are using inside it.

I also gone through this and this posts, but I couldn't really understand what to do. Please assist.

One case I would like to share is, I have placed link (above mentioned code snippet) inside list view Layout Template. I have tried to add RAD script block around it. It worked fine for loading page. But, when I do paging, nothing happened and I observed below JS error

Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: The script tag registered for type 'System.Web.UI.Page' and key 'RadListView1$RadScriptBlock1' has invalid characters outside of the script tags: <a id="lnk1" class="xyz" href="abc.aspx?ReturnPath=s%3d301%26c%3d3%26d%3d%26p%3d1%26">Compare</a> . Only properly formatted script tags can be registered.
     
 
...._validPosition(a.scrollLeft)||this._validPosition(a.scrollTop)))return {x:a.scr...

Any assistance will be greatly appreciate.

Thanks.
Konstantin Dikov
Telerik team
 answered on 01 Jan 2014
1 answer
68 views
Hi,

I've just started using the RadHtmlChart and have been getting on quite well with it so far, however I want to create a graph that I can't see any documentation or examples of, and am wondering if it's possible.

I have data in the following format:

Team - Matchday - Position
London - 1 - 1
London - 2 - 1
London - 3 - 2
London - 4 - 1
Birmingham - 1 - 2
Birmingham - 2 - 2
Birmingham - 3 - 1
Birmingham - 4 - 3
Liverpool - 1 - 3
Liverpool - 2 - 4
Liverpool - 3 - 3
Liverpool - 3 - 2

etc. etc.

I want to display a line series for each of these teams, showing their position on each matchday.  Is there any grouping fields properties that I can set in order to do this?  I've been able to get a line graph to show the progression for one of these teams, and for all of them together (which isn't very useful!), but would like them to each have their own line.

This is just example data, it will come from a database, so I can't just hard-code it.

Thanks
Stanimir
Telerik team
 answered on 01 Jan 2014
4 answers
182 views
Is it possible to display a browser confirm when the user click the cancel button of the asyncupload? I cant find a way to get the cancel click event.

Thankyou
Freddy
Massimiliano
Top achievements
Rank 1
 answered on 31 Dec 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?