Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
316 views
Hi I have the following code works fine on my local machine but when deployed to test server I get the following error: "The script /Sample1/ScriptResource.axd?... failed to load. Check for inaccessible path." It acts weird it updates or cancels first time and second time I try and click it does not work and when refresh the page it starts working again but only for the one record and then I have to click the refresh button again to make it work, My boss told me that it is giving following error scriptresource.asd and that

The JavaScript error is the root of the problem - once that is solved, the grid will behave as expected.

.. Please help me
ASPX Code:


<telerik:RadGrid runat="server" ID="rgRegistered" GridLines="None"
                AllowSorting="true" AllowPaging="true" AllowFilteringByColumn="true" PageSize="30"
                AutoGenerateColumns="false" ShowGroupPanel="false" ShowFooter="true" Width="1500" EnableAjaxSkinRendering="true"
                OnNeedDataSource="rgRegistered_NeedDataSource"
                OnItemDataBound="rgRegistered_ItemDataBound"
                OnItemCommand="rgRegistered_ItemCommand">
                <ValidationSettings EnableValidation="true" ValidationGroup="vgGrid" />
                <MasterTableView DataKeyNames="GradID" EditMode="InPlace">
                    <Columns>
                        <telerik:GridBoundColumn HeaderText="GradID" DataField="GradID" SortExpression="GradID"
                            Visible="false" />
                        <telerik:GridEditCommandColumn ButtonType="LinkButton" EditText="Edit" CancelText="Cancel"
                            UpdateText="Update">
                        </telerik:GridEditCommandColumn>
                        <telerik:GridTemplateColumn HeaderText="Badge Name" SortExpression="BadgeName" ItemStyle-Wrap="false">
                            <EditItemTemplate>
                                <asp:TextBox ID="tbxBadgeName" runat="server" />
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblBadgeName" />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn HeaderText="Department" DataField="Department"
                            SortExpression="Department" ReadOnly="true" />
                        <telerik:GridBoundColumn HeaderText="Email" DataField="Email" SortExpression="Email"
                            ReadOnly="true" />
                        <telerik:GridTemplateColumn HeaderText="Phone" SortExpression="Phone" ReadOnly="true">
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblPhone" />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>                                               
                        <telerik:GridTemplateColumn HeaderText="Other" SortExpression="Other">
                            <EditItemTemplate>
                                <asp:RadioButtonList runat="server" ID="rbtnlOther" />
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblOther" />
                            </ItemTemplate>
                            <FooterTemplate>
                                <asp:Label runat="server" ID="lblOtherTotals" />
                            </FooterTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="Not Attending Conference" SortExpression="Rsvp">
                            <EditItemTemplate>
                                <asp:RadioButtonList runat="server" ID="rbtnlRsvp" />
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblRsvp" />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>

C# Code:

protected void rgRegistered_ItemDataBound(object source, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem gdiItem = (GridDataItem)e.Item;

                if (gdiItem != null)
                {
                    // bind different controls to the data from the collection based
                    // on whether or not the row in the grid is in edit mode.
                    if (!gdiItem.IsInEditMode) // view mode (Label controls)
                    {
                        ((Label) gdiItem.FindControl("lblBadgeName")).Text = DataBinder.Eval(gdiItem.DataItem, "BadgeName").ToString();                    
                     
                        ((Label) gdiItem.FindControl("lblOther")).Text = DataBinder.Eval(gdiItem.DataItem, "Other").ToString();
                        ((Label) gdiItem.FindControl("lblRsvp")).Text = DataBinder.Eval(gdiItem.DataItem, "Rsvp").ToString();

                        if (DataBinder.Eval(gdiItem.DataItem, "Phone") != null)
                        {
                            Regex regexNonnumeric = new Regex(@"[^0-9]");
                            string strNumeric = regexNonnumeric.Replace(DataBinder.Eval(gdiItem.DataItem, "Phone").ToString(), string.Empty);
                            ((Label)gdiItem.FindControl("lblPhone")).Text = Convert.ToInt64(strNumeric).ToString("(000)000-0000");
                        }
                        
                    }
                    else // edit mode (non label controls)
                    {
                        #region Declare Controls                 
                        RadioButtonList rbtnlOther = (RadioButtonList)gdiItem.FindControl("rbtnlOther");
                        RadioButtonList rbtnlRsvp = (RadioButtonList)gdiItem.FindControl("rbtnlRsvp");

                        #endregion

                        #region Bind Controls

                        ((TextBox)gdiItem.FindControl("tbxBadgeName")).Text = DataBinder.Eval(gdiItem.DataItem, "BadgeName").ToString().Trim();

                      
                        if (rbtnlOther != null)
                        {
                            // now populate the radio button list
                            AppCode.ControlLibrary.BindMethod.rbtnlYesNoBind(rbtnlOther);
                            rbtnlOther.SelectedValue = DataBinder.Eval(gdiItem.DataItem, "Other").ToString();
                        }
                        if (rbtnlRsvp != null)
                        {
                            // now populate the radio button list
                            AppCode.ControlLibrary.BindMethod.rbtnlYesNoBind(rbtnlRsvp);
                            rbtnlRsvp.SelectedValue = DataBinder.Eval(gdiItem.DataItem, "Rsvp").ToString();
                        }

                        #endregion
                    }
                }
            }
            else if (e.Item is GridFooterItem)
            {
                GetGridTotals();

                Label lblRegisteredTotals = (Label)e.Item.FindControl("lblRegisteredTotals"); 
                Label lblOtherTotals = (Label)e.Item.FindControl("lblOtherTotals");

                if (Int32.Parse(Registered.ToString()) != 0)
                {
                    lblRegisteredTotals.Text = string.Format("Registered: {0}", Registered);
                }             
                if (Int32.Parse(Other.ToString()) != 0)
                {
                    lblOtherTotals.Text = string.Format("Other: {0}", Other);
                }
            }
        }
Prangadj
Top achievements
Rank 1
 answered on 27 Aug 2009
1 answer
117 views
Hi Everyone,

I am dynamically generating an XML string containing the structure of my RadPanelBar and then using LoadXML function.

Is there any way to add additional attributes into the XML string and then access them from Server side/ Client side code?

I have seen a few examples of using custom attributes when binding to an XML datasource but none of these appear to apply to using the LoadXML function.

Any help appreciated.

Thanks
Antony
Paul
Telerik team
 answered on 27 Aug 2009
2 answers
1.5K+ views

Hi There, I need a litle help with GridBoundColumn DataFormateString Property. I have boundcolumn which shows the values like:

0
1.0
1.88
3.0

The values should appear like:

0.00
1.00
1.88
3.00

 

Is there any easy way that can be used with GridBoundColumns to get the above results. any example will be a gr8 help :).

Thanks & Regards
Nitesh Monga

nitesh monga
Top achievements
Rank 1
 answered on 27 Aug 2009
1 answer
90 views
Hi telerik team,
I' ve succesfully following the http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandsplitterresizing/defaultcs.aspx?product=grid (the only different is the fact that I've a scenario with master-content page).
But I've the following problems
1. load the page (initially the grid is not paging becouse I've few records)
2. resize the panel, so grid now is paging
3. navigate into paging (for example page 3)
4. resize again the panel, so grid is now not paging: records are missed, and grid shows the message "no record showed"
Can you help me?
Thanks in advance
Nadia Giusti
Yavor
Telerik team
 answered on 27 Aug 2009
1 answer
126 views
Hi,
I want throw in any moment the event of button in fileexplorer, and not only pressing the button

How  can i do that'??

Thanks
Fiko
Telerik team
 answered on 27 Aug 2009
2 answers
117 views
Hello,

1st Question: I installed 3 dictionaries for radEditor, as I use edt.Languages.Add(...) it works ok and I get the choice for my 3 languages, but how to select the default one ?

Second question, I am using several editors in my page and using the optimizing ToolProviderID to use one Toolbar (from first editor ceated). But I have my spellchecker language list filled only for first editor. Even if I force Language.Add for each editor in page.

3rd question, should I redefine for each editor the differnt managers: ImageManager, DocumentManager, etc. ?

Last question: is there a way to limit the number of chars in the editor content in such a way the user get a warning clientside ?

Many thanks for fast answer.

Best regars

CS







CSurieux
Top achievements
Rank 2
 answered on 27 Aug 2009
3 answers
514 views
Hi,

I've a page with a RadFileExplorer in a div. When the page load, this div has the style "display:none". In this page, there's a linkbutton that call a javascript that change the style of the div to "display:block".

The problem is that the files are not shown correctly.

If I use the basic version of RadFileExplorer (case 1 in the example), the width of the grid do not adjust to the percent set, it seems to have a preset value (the percent works if the RadFileExplorer is shown on the load). In addition, the height if the grid seems to be automatically set to a very little value.

If I use a custom provider to add some columns (case 2 in the example), it's even worse: the width and height problem is still there and I don't see the filename anymore. The custom provider I use is the one for local path in the code library here with very little changes (to add two custom columns).

Is there a way to make them appear correctly ?
I send you a simple example that doesn't work for me. I have the latest internal build of AJAX controls (2009_2_817). I tested it on IE, FF3 and Chrome and each navigator has little differences. but none works correctly, I let you test and see.

Thanks !!

Here's the calls of a simple example of what I'm experiencing
<asp:Content runat="server" ContentPlaceHolderID="head"> 
    <script type="text/javascript"> 
        function test1() { 
            document.getElementById('div1').style.display = 'block'; 
            document.getElementById('div2').style.display = 'none'; 
        } 
 
        function test2() { 
            document.getElementById('div1').style.display = 'none'; 
            document.getElementById('div2').style.display = 'block'; 
        } 
    </script> 
</asp:Content> 
 
<asp:Content runat="server" ContentPlaceHolderID="content"> 
 
    <asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="test1(); return false;" Text="test1" /><br /> 
    <asp:LinkButton ID="LinkButton2" runat="server" OnClientClick="test2(); return false;" Text="test2" /><br /> 
     
    <br /> 
 
    <div id="div1" style="background-color:White; width:100%; display:none;"> 
        1 
        <br /> 
        <rad:RadFileExplorer ID="file_explorer" runat="server" EnableCreateNewFolder="false" VisibleControls="Grid,Toolbar,ContextMenus,TreeView"  
            TreePaneWidth="150px" Width="100%" Configuration-MaxUploadFileSize="1024000" AllowPaging="false" /> 
        <br /> 
        &nbsp; 
    </div> 
 
    <div id="div2" style="background-color:White; width:100%; display:none;"> 
        2 
        <br /> 
        <rad:RadFileExplorer ID="RadFileExplorer1" runat="server" EnableCreateNewFolder="false" VisibleControls="Grid,Toolbar,ContextMenus,TreeView"  
            TreePaneWidth="150px" Width="100%" Configuration-MaxUploadFileSize="1024000" AllowPaging="false" /> 
        <br /> 
        &nbsp; 
    </div> 
</asp:Content> 

And the code
protected void Page_Load(object sender, EventArgs e) 
    { 
        string[] paths = new string[] { "~/templates/" }; 
        file_explorer.Configuration.ViewPaths = paths; 
        file_explorer.Configuration.UploadPaths = paths; 
        file_explorer.Configuration.DeletePaths = paths; 
 
 
        /* 2nd explorer */ 
        string[] p_paths = new string[] { "C:\\documents\\candidats\\" }; 
        RadFileExplorer1.Configuration.ViewPaths = p_paths; 
        RadFileExplorer1.Configuration.UploadPaths = p_paths; 
        RadFileExplorer1.Configuration.DeletePaths = p_paths; 
        RadFileExplorer1.Configuration.ContentProviderTypeName = typeof(CandidatFileSystemProvider).AssemblyQualifiedName; 
 
        GridTemplateColumn col_taille_ko = new GridTemplateColumn(); 
        col_taille_ko.HeaderText = "Taille"; 
        col_taille_ko.SortExpression = "Taille_ko"; 
        col_taille_ko.UniqueName = "Taille_ko"; 
        col_taille_ko.DataField = "Taille_ko"; 
        col_taille_ko.ItemStyle.Width = col_taille_ko.HeaderStyle.Width = Unit.Pixel(100); 
        col_taille_ko.ItemStyle.HorizontalAlign = col_taille_ko.HeaderStyle.HorizontalAlign = HorizontalAlign.Right; 
        RadFileExplorer1.Grid.Columns.Add(col_taille_ko); 
 
        GridTemplateColumn col_date = new GridTemplateColumn(); 
        col_date.HeaderText = "Date de création"; 
        col_date.SortExpression = "Date"; 
        col_date.UniqueName = "Date"; 
        col_date.DataField = "Date"; 
        col_date.ItemStyle.Width = col_date.HeaderStyle.Width = Unit.Pixel(150); 
        col_date.ItemStyle.HorizontalAlign = col_date.HeaderStyle.HorizontalAlign = HorizontalAlign.Center; 
        RadFileExplorer1.Grid.Columns.Add(col_date); 
    } 

Fiko
Telerik team
 answered on 27 Aug 2009
1 answer
104 views
Hi,
 In evaluating the free version of the MOSS editor lite, we've found a couple of issues that I'd like to share with you :-

  • SpellChecker highlights mispelt words in yellow and gives the option to amend the highlighted word. Once amended, if 'enter' is not pressed and you click away from the word, the changes do not take affect.  The words remain highlighted in yellow, but SpellChecker has to be re-selected from the toolbar and changes have to be made again
  • SpellChecker highlights misspelt words in yellow and gives the option to amend the highlighted word...except for the first word at the beginning of the sentence in the first paragraph.  The word is highlighted in yellow, but gets missed off.  However it is possible to hover over the word and prompt the correction.

 It's likely that we'll be purchasing the full licensed controls, but it would be good to know that if these bugs exists in the full version also, that they will be resolved.
Thanks,
Jason.

Petko
Telerik team
 answered on 27 Aug 2009
14 answers
481 views
I submitted a suggestion along these lines and Telerik wanted to hear if anyone else thought it might be a good idea. Please give your two cents.

It appears the current RadSlider "Value" property is of type Integer in the Beta. In the first release, this should be of type Double in order to allow for decimal values. Any other Value-related properties should also have this change... like MaximumValue, Minimum alue and SlideStep.

Of course, integer values can  be scaled to decimals, but I don't see why this complication should be put upon the developer when there doesn't seem to be any reason to exclude the ability from using decimal values in the slider itself.
Tsvetie
Telerik team
 answered on 27 Aug 2009
1 answer
112 views
Hi,
How to create websetup with Telerik?
1. I am  trying to create a web setup project, 
2. How to package telerik in web setup project?.
3. I have add the Telerik.Web.Ui.dll in to the GAC.
4. Page rendered with out css styles.

Thanks
Sabarish
Svetlina Anati
Telerik team
 answered on 27 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?