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

Hi

Is it possible to edit the InlineInsertTemplate without losing whats already in it ie the save button etc. I would like to add a drop down to this window but when i add it, it removes all of the buttons and the text area?

Thanks

Peter
Telerik team
 answered on 16 May 2009
4 answers
143 views
Hi

I'm currently battling the scroll functionality of the rsContentScrollArea when the scheduler is set to monthview. Some javascript is desiding the height of this element and overflowY is set to scroll. At the same time the javascript makes the element 1px to short wich means that if I set overflowY to auto, there will allways be scroll anyways.

I want the scroll... but only when there is more than 5 rows. Anyone have a suggestion?
Peter
Telerik team
 answered on 16 May 2009
4 answers
164 views
Hi,

I have a treeview control with 4 levels of branch in it.  Each node is rendered as a template and the template has 2 checkboxes.

I need the tristate cascading check mechanism to apply to these templated nodes.  Below is some sample code for this based on a simple two branch level tree.

In a nutshell I would like it so that if the user clicks on the first checkbox for the first parent node then the first checkbox in the two child nodes will also be ticked.  If one of them is then unticked, the parent first node should show the tristate status.

The purpose of this is to make various admin tasks quick and simple.

Any thoughts?

Regards,

Jon


  Private Sub GenerateTreeView()  
        ' parent node  
        Dim sampleRadTreeNode As RadTreeNode = New RadTreeNode()  
        sampleRadTreeNode.NodeTemplate = New NodeTemplate("Sample 1")  
        ' child node  
        Dim sampleChildRadTreeNode As RadTreeNode = New RadTreeNode()  
        sampleChildRadTreeNode.NodeTemplate = New NodeTemplate("Sample 1 Child 1")  
        sampleRadTreeNode.Nodes.Add(sampleChildRadTreeNode)  
        ' child node  
        sampleChildRadTreeNode = New RadTreeNode()  
        sampleChildRadTreeNode.NodeTemplate = New NodeTemplate("Sample 1 Child 2")  
        sampleRadTreeNode.Nodes.Add(sampleChildRadTreeNode)  
        uxRadTreeView.Nodes.Add(sampleRadTreeNode)  
        ' parent node  
        sampleRadTreeNode = New RadTreeNode()  
        sampleRadTreeNode.NodeTemplate = New NodeTemplate("Sample 2")  
        uxRadTreeView.Nodes.Add(sampleRadTreeNode)  
        uxRadTreeView.DataBind()  
    End Sub 
 
    Class NodeTemplate  
        Implements ITemplate  
        Public text As String 
        Public level As Integer 
 
        Public Sub New(ByVal text As String)  
            Me.text = text  
        End Sub 
 
        Public Sub InstantiateIn(ByVal container As Control) Implements System.Web.UI.ITemplate.InstantiateIn  
            Dim table As Table = New Table()  
            table.CssClass = "NodeTemplateCSS" 
            table.CellPadding = 0  
            table.CellSpacing = 0  
 
            Dim tableRow As TableRow = New TableRow()  
            Dim tableTextCell As TableCell = New TableCell()  
 
            Dim nodeText As Label = New Label()  
            nodeText.ID = "ItemLabel" 
            nodeText.Text = text  
            tableTextCell.Controls.Add(nodeText)  
 
            Dim checkbox1Cell As TableCell = New TableCell()  
            Dim checkbox1 As CheckBox = New CheckBox()  
            checkbox1.ID = "checkbox1" 
            checkbox1Cell.Controls.Add(checkbox1)  
 
            Dim checkbox2Cell As TableCell = New TableCell()  
            Dim checkbox2 As CheckBox = New CheckBox()  
            checkbox2.ID = "checkbox2" 
            checkbox2Cell.Controls.Add(checkbox2)  
 
            tableRow.Cells.Add(tableTextCell)  
            tableRow.Cells.Add(checkbox1Cell)  
            tableRow.Cells.Add(checkbox2Cell)  
            table.Rows.Add(tableRow)  
            container.Controls.Add(table)  
        End Sub 
    End Class 
Jon
Top achievements
Rank 1
 answered on 16 May 2009
4 answers
143 views
Hi

Is there an easy way of setting an appointment as an allday event? or do i have to set the start and end variables to specific date/times to get this to work?

Thanks
Andrew
Top achievements
Rank 1
 answered on 16 May 2009
1 answer
157 views
Hi all,
i have just updated the controls  from version Q3 2008  to version 2009.01.0506.35

When i open DocumentManager with DialogOpener object, a javascript error occurs.

In this snippet i set the DialogDefinitions for the DocumentManagerDialog
            targetFolder = _presenter.GetAttachmentsFolder(); 
 
            FileManagerDialogParameters dlgManagerParameters = new FileManagerDialogParameters 
                                                                   {ViewPaths = new string[1] {targetFolder}}; 
            dlgManagerParameters.UploadPaths = dlgManagerParameters.ViewPaths; 
            dlgManagerParameters.DeletePaths = dlgManagerParameters.ViewPaths; 
            dlgManagerParameters.MaxUploadFileSize = 5000000; 
            // If you don't set the following property, the default value will be used 
            dlgManagerParameters.SearchPatterns = 
                ConfigurationManager.AppSettings["allowedDocumentTypes"].Split(",".ToCharArray()); 
 
 
            DialogDefinition docManager = new DialogDefinition(typeof(DocumentManagerDialog), 
                                                               dlgManagerParameters) 
                                              { 
                                                  ClientCallbackFunction = "callBackFnAllegato"
                                                  Title = "Gestione documenti"
                                                  Width = Unit.Pixel(694), 
                                                  Height = Unit.Pixel(500) 
                                                  }; 
            docManager.Parameters["ExternalDialogsPath"] = "~/EditorDialogs"
            dlgOpener.DialogDefinitions.Add("DialogDocument", docManager); 
 

Dialog declaration
<telerik:RadDialogOpener runat="server" ID="dlgOpener"
        </telerik:RadDialogOpener>       
 


Open dialog
<asp:ImageButton ID="imgAllegatoManager" runat="server" SkinID="btnAttach"  
            OnClientClick="return ShowDialog('DialogDocument');" /> 


This is the embedded javascript that fails, specifically the first line of the function
_loadLinkProperties : function() 
    { 
        var currentLink = this._clientParameters.get_value(); 
        var currentHref = currentLink.getAttribute("href", 2); 
        var anchors = this._clientParameters.documentAnchors; 
 

This is the error:
Error: this._clientParameters.get_value is not a function
Source File: http://localhost:4137/ScriptResource.axd?d=UQWwKN_46q7-uyZ4WTiJtjbw7-TZ21nD4t1jm17a3wzrvCs8Hytb9miequru0VyFY8JL4lX41RPClwykw1ZqHw2&t=ffffffffc54d9c1d
Row: 1081



Any suggestions?

Thank in advance and
best regards.

Flavio




Lini
Telerik team
 answered on 16 May 2009
1 answer
262 views
My page contains a FormView, the FormView only has an insert template.  The FormView contains a RadMaskedTextBox Zip, a RadComboBox City, and a  RadComboBox State.

Ignoring ajax for a moment, if I click the Insert button in the FormView without any ajax applied to the page the insert happens correctly.

I ajaxify my page with the following code.

<rad:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">  
    <AjaxSettings>  
        <rad:AjaxSetting AjaxControlID="Zip">  
            <UpdatedControls>                      
                <rad:AjaxUpdatedControl ControlID="City" />  
                <rad:AjaxUpdatedControl ControlID="State" />  
            </UpdatedControls>  
        </rad:AjaxSetting>  
    </AjaxSettings>  
</rad:RadAjaxManagerProxy>  

The page is set up such that the OnTextChanged event of Zip looks up city and state for that zip and then binds those values to the City combo and selects the given value in the State combo respectively.

The ajaxed Zip lookup works great.  My issue begins after I've used the Zip lookup and I click the FormView Insert button.  I receive the following error:

Script control 'City' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors(). Parameter name: scriptControl

I've found a number of posts about this issue.  None of which seemed to solve my problem.  The most illuminating was this one.  It gives two solutions "you can update the entire FormView control or you can use RadAjaxManager and set the ajaxsetting for the nested control on Page's PreRender event."  I implimented the first approach and it works, but adopting this methodology creates many more issues in our application in other areas.  The second solution given is not working for me.  When I remove the declarative AjaxSettings described above and insert the following:

        protected void Page_PreRenderComplete(object sender, EventArgs e) 
        { 
            RadMaskedTextBox zip = ApplicationRapidForm.FindControl("Zip"as RadMaskedTextBox; 
            RadComboBox city = ApplicationRapidForm.FindControl("City"as RadComboBox; 
            RadComboBox state = ApplicationRapidForm.FindControl("State"as RadComboBox; 
 
            RadAjaxManagerProxy1.AjaxSettings.AddAjaxSetting(zip, city); 
            RadAjaxManagerProxy1.AjaxSettings.AddAjaxSetting(zip, state); 
        } 

 I receive the error "Controls cannot be ajaxified after Page PreRender." 

When I try overriding the OnPreRenderComplete event:

        protected override void OnPreRenderComplete(EventArgs e) 
        { 
            RadMaskedTextBox zip = ApplicationRapidForm.FindControl("Zip"as RadMaskedTextBox; 
            RadComboBox city = ApplicationRapidForm.FindControl("City"as RadComboBox; 
            RadComboBox state = ApplicationRapidForm.FindControl("State"as RadComboBox; 
 
            RadAjaxManagerProxy1.AjaxSettings.AddAjaxSetting(zip, city); 
            RadAjaxManagerProxy1.AjaxSettings.AddAjaxSetting(zip, state); 
  
            base.OnPreRenderComplete(e); 
        } 

I end up with a Javascript error: "Sys.InvalidOperationException: Could not find UpdatePanel with ID 'ctl00_ctl00_ContentPlaceHolder_ApplicationForm_CityPanel'. If it is being updated dynamically then it must be inside another UpdatePanel."




I've tried moving the code to a few other places as well with the same results. 

How can I ajax update selective controls that live within a FormView and then successfull save that FormView?

Thanks,

Rob T







Pavlina
Telerik team
 answered on 16 May 2009
1 answer
222 views
Hi,
I am trying to insert/update the data in my RadGrid and but could not able to save. I have few fields on the grid and some of them i change the properties readonly=true and display=false. I don't want to see these fields while editing or inserting. When i save the data is not saving. But when i change readonly=false and display=true, the data is saving. I don't know what exactly went wrong.
Temporary i just disable the textboxes while editing/inserting. 

Can you tell me what is the reason behind this.

Look at the following one i am disabling the textboxes.

Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles RadGrid1.ItemDataBound 
        If (TypeOf e.Item Is GridEditFormInsertItem) AndAlso (e.Item.OwnerTableView.IsItemInserted) Then 
            Dim insertItem As GridEditFormInsertItem = DirectCast(e.Item, GridEditFormInsertItem) 
            Dim txtbx1 As TextBox = DirectCast(insertItem("Resource_Name").Controls(0), TextBox) 
            txtbx1.Text = RadComboBox1.SelectedValue.ToString 
            Dim txtbx2 As TextBox = DirectCast(insertItem("Resource_Year").Controls(0), TextBox) 
            ' txtbx2.Text = Request.QueryString("Resource_Year").ToString 
            txtbx2.Text = Year(Now) 
            Dim txtbx3 As TextBox = DirectCast(insertItem("Resource_Month").Controls(0), TextBox) 
            'txtbx3.Text = Request.QueryString("Resource_Month").ToString 
            txtbx3.Text = Month(Now) 
            Dim txtbx4 As TextBox = DirectCast(insertItem("Resource_week").Controls(0), TextBox) 
            txtbx4.Text = Request.QueryString("ResourceVersion").ToString 
            Dim txtbx5 As TextBox = DirectCast(insertItem("Division_ID").Controls(0), TextBox) 
            txtbx5.Text = Request.QueryString("Division_ID").ToString 
            Dim txtbx6 As TextBox = DirectCast(insertItem("Section_ID").Controls(0), TextBox) 
            txtbx6.Text = Request.QueryString("Section_ID").ToString 
            txtbx6.ReadOnly = True 
            RadGrid1.MasterTableView.Columns(6).Visible = False 
            Dim txtbx7 As TextBox = DirectCast(insertItem("sno").Controls(0), TextBox) 
            txtbx1.Enabled = False 
            txtbx2.Enabled = False 
            txtbx3.Enabled = False 
            txtbx4.Enabled = False 
            txtbx5.Enabled = False 
            txtbx6.Enabled = False 
            txtbx7.Enabled = False 
        End If 
 
        If TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode Then 
            Dim item As GridEditableItem = DirectCast(e.Item, GridEditableItem) 
            Dim txtbx1 As TextBox = DirectCast(item("Resource_Name").Controls(0), TextBox) 
            Dim txtbx2 As TextBox = DirectCast(item("Resource_Year").Controls(0), TextBox) 
            Dim txtbx3 As TextBox = DirectCast(item("Resource_Month").Controls(0), TextBox) 
            Dim txtbx4 As TextBox = DirectCast(item("Resource_week").Controls(0), TextBox) 
            Dim txtbx5 As TextBox = DirectCast(item("Division_ID").Controls(0), TextBox) 
            Dim txtbx6 As TextBox = DirectCast(item("Section_ID").Controls(0), TextBox) 
            Dim txtbx7 As TextBox = DirectCast(item("sno").Controls(0), TextBox) 
 
            txtbx1.Enabled = False 
            txtbx2.Enabled = False 
            txtbx3.Enabled = False 
            txtbx4.Enabled = False 
            txtbx5.Enabled = False 
            txtbx6.Enabled = False 
            txtbx7.Enabled = False 
          
        End If 
   End Sub 











Pavlina
Telerik team
 answered on 16 May 2009
1 answer
95 views
Hi there,

             I'm using the latest telerik version. Developed an application using it. If a request is raised from the client side the application takes about 30 to 40 sec to completely display the requested output. I' v about 5 RadGrid One master page 3Radspliters one Tapstrip , Treeview , some RadTextBox and RadComboBox each and every component are of Rad-Telerik component type and RadAjax in one single page.

Even to display the no record found the request and response are about 30 to 40 sec. I could't figure out why it takes this much time.

In my application if the request is raised, with 15 to 20 sec i'm able to see the output . For about 10 to 15 sec the loading ... is happening . After about 30 to 40 sec only i'm able arise another request.

Please suggest me what should i do to increase the performance. I have found some performance tuning  articles and tried that too from converting the radcomponents to normal asp controls. But, this does not solve my problem .
Paul
Telerik team
 answered on 16 May 2009
0 answers
324 views

You can find attached to this sticky note all available localizations of RadUpload for ASP.NET AJAX provided by our customers. If you have any new localizations for RadUpload and would like to share them with our community, you can send them via the support ticketing system under your account.

You work will be gladly rewarded.

Here are some useful links relevant to the Localization:

P.S. Please, note that Telerik supports only the provided English (en-US) localizations in the Telerik.Web.UI installation and that the attached here localizations could be incomplete or could have mistakes.

P.S.2. If you want to update any language packs, you can use the following useful tool: http://www.screwturn.eu/(X(1)S(grc2ro551rnpa2eeviiyb5fn))/ResxSync.ashx. It can add new keys to the translated files whenever you have updated the original English files.

Another good diff and merge tool is WinMerge.

Telerik Admin
Top achievements
Rank 1
Iron
 asked on 16 May 2009
1 answer
118 views
Hi there,
Ajax seems to kill the ExportToPDF() functionality of the RadEditor. Is this going to be possible in the future?
Lini
Telerik team
 answered on 16 May 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?