Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
920 views
Is it possible to Enable or disable the Tab strip based on the Rad Grid Condition. I have Three Tabs and each tab has a RadGrid in it. When a Grid is in Edit mode, I want to Disbale the TasbStrip so that users can not move to a different Tab. Once the users either update or cancel the edit Tab Strip should be enabled back.

I tried setting Tabstrip.enabled to false on Grid Prerender and Item Command, but did not work.

Thanks for your help and advice.

Thanks,
Siva
Ivan Danchev
Telerik team
 answered on 06 Feb 2015
1 answer
98 views
Hi

I am need to add a new row and then setup some default values while using batch edit.  The code below causes problems once it has executed.  It executes fine but seems to not save the values properly.  Could someone verify if I am setting the column data properly with the last two lines?

Many thanks,

Jon
  var uxRadGrid = $find("<%=uxRadGrid.ClientID%>");
  var uxRadGrid_MasterTable = uxRadGrid.get_masterTableView();
  var uxRadGrid_batchEditingManager = uxRadGrid.get_batchEditingManager();
  uxRadGrid_batchEditingManager.addNewRecord(uxRadGrid_MasterTable);
 
  var uxRadGrid_MasterTable_row = uxRadGrid_MasterTable.get_dataItems()[0];
//  uxRadGrid_MasterTable_row.get_cell("BudgetValue").innerText = '£0.00';
  //uxRadGrid_MasterTable_row.get_cell("BudgetDetailId").innerText = ' ';
  uxRadGrid_MasterTable_row.get_cell("CategoryId").innerText = idValue;
  uxRadGrid_MasterTable_row.get_cell("Category").innerText = textValue;
Eyup
Telerik team
 answered on 06 Feb 2015
1 answer
111 views
Hi,
     i would like to know if it is possible to know if it is possible to extract the pager information during the NeedDataSource event.

I supposed it can be done with a custom pager, but i would like to reuse basic pager.
I need this because i have not a local db, but have to call a remote wcf service with a simple call (no odata or similar).

If cannot, do you suggest ObjectDataSource or Custom Pager?

Thx in advance
Mauro Dalla Zuanna

<telerik:RadGrid ID="RadGridMain" runat="server" AllowSorting="True" AllowPaging="True" AllowFilteringByColumn="True" PageSize="12" 
OnNeedDataSource="RadGridTransazioni_NeedDataSource">

....

</telerik:RadGrid>

#Code behind
protected void RadGridMain_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e) {
  WcfClient client = new WcfClient();
  List<DataType> returnedData = client.ReturnData( <... sort, page number, number of records ...>);
  this.RadGridMain.DataSource = returnedData;
}
Angel Petrov
Telerik team
 answered on 06 Feb 2015
2 answers
283 views
I'm having a weird occurrence when adding a RadAjaxManager to a Webform. From ButtonClick codebehind I am calling a java script function successfully, but fails when I add a RadAjaxManager.

CodeBehind:
    protected void btnUpload3DModel_Click(object sender, EventArgs e)
        {

            try
            {
                FileUpload fileUpload = FileUploadControl;

                string physicalFolder = Server.MapPath("~/assets/");
                if (fileUpload.HasFile)
                {
                    string uploadFile = physicalFolder + fileUpload.FileName;
                    fileUpload.SaveAs(uploadFile);

                    string testFile = "/assets/" + fileUpload.FileName;
   
                   ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "NovaCopyStlViewer('" + testFile + "')", true);
                }
            }
            catch (Exception)
            {

                throw;
            }

        }

Javascript function:

 <script type="text/javascript">
        function NovaCopyStlViewer(file)
        {

            var cv = document.getElementById('canvas_drop');
            cv.style.display = 'block';

            var e = document.getElementById('select_options');
            e.style.display = 'block';



            var mycanvas = document.getElementById('upload_canvas');
            var viewer = new JSC3D.Viewer(mycanvas);
            var theScene = new JSC3D.Scene;

            var stlpath = file;
            viewer.setParameter('SceneUrl', stlpath);
            viewer.setParameter('InitRotationX', 20);
            viewer.setParameter('InitRotationY', 20);
            viewer.setParameter('InitRotationZ', 0);
            viewer.init();
            viewer.update();
        }
    </script>



The error I am seeing after adding RadAjaxManager is as follows
JavaScript critical error at line 343, column 42 in http://localhost:32135/3DPrototypeQuote.aspx\n\nSCRIPT1004: Expected ';' 

Notice there is no SemiColon between NovaCopyStlViewer('/assets/Inverted.stl') and Sys.Application.add_init(function() 
This is where Visual Studio is showing the error. 

DOM:
<script type="text/javascript">
//<![CDATA[
NovaCopyStlViewer('/assets/Inverted.stl')Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadAjaxManager, {"_updatePanels":"","ajaxSettings":[],"clientEvents":{OnRequestStart:"",OnResponseEnd:""},"defaultLoadingPanelID":"","enableAJAX":true,"enableHistory":false,"links":[],"styles":[],"uniqueID":"ctl00$ContentPlaceHolder1$RadAjaxManager1","updatePanelsRenderMode":0}, null, null, $get("ctl00_ContentPlaceHolder1_RadAjaxManager1"));
});
//]]>
</script>





















Peter Filipov
Telerik team
 answered on 06 Feb 2015
1 answer
104 views
I am using a RadTreeList control on an ASPX page.   When Inserting a new node on the tree, I am validating what the user entered in the editbox.  However, when I call the alert() and then cancel the event, the alert dialog is not displayed.

I have similar code for the Edit it works just fine.  The only difference is the message being displayed.  The errorString variable built based upon the errors found in the validation of the control.

SiteAspNetMaster samInsert = (SiteAspNetMaster)Page.Master;
if (samInsert != null)
{
           samInsert.Alert(errorString, 400, 100, "Alert");
}
e.Canceled = true;


Thank you.


Konstantin Dikov
Telerik team
 answered on 06 Feb 2015
1 answer
122 views
Like the subject says, the editor is in control that's used as an editor for a grid. When I go to edit a row, the value in the editor is always blank and unclickable when an AjaxPanel is on the page. I can remove the panel is everything works as it should. Even though there is no value shown, I can still hit update and the real values are still saved. Am I missing something that has to do with AJAX and the editor?
Marin Bratanov
Telerik team
 answered on 06 Feb 2015
1 answer
171 views
Hi,

The Rad Editor toolbar is not rendering correctly. On loading of editor, the tool bar is stretched to the bottom covering the entire content are and the editor does not appear to be editable.

Telerik version : 2010.2.1029.35
Browser : IE 8,9 and 11

Thanks in advance for the suggestions.

Misho
Telerik team
 answered on 06 Feb 2015
1 answer
159 views
After updating to the latest version of Telerik, we are encountering issues with the rcbSprite image of the RadCombobox

Any thoughts on how to resolve this issue?
Magdalena
Telerik team
 answered on 06 Feb 2015
4 answers
317 views
Hi,

On validation fail I would like to switch the css class of the raddropdowntree in order to end up with a red border.  

I am trying the following but not sure if it is my code or the css that is to blame. Any suggestions?

             
                    function RadDropDownTree_ValidationStyleSetter(textBox, eventArgs) {
                        if (eventArgs.IsValid === false) {
                            textBox.addCssClass('RadDropDownTreeFieldErrorHighlight');
                        } else {
                            textBox.removeCssClass('RadDropDownTreeFieldErrorHighlight');
                        }
                    }

Regards

Jon


Jon
Top achievements
Rank 1
 answered on 06 Feb 2015
1 answer
215 views
Let me preface this by stating that I am defining all of the RADGrid layout design using server-side code.
The DLL Version is: 2012.2.724.35 (And before it is said, no I can not upgrade, I am currently stuck at this version)
     - If the problem is because of a bug in the version I have, just let me know and I will just abandon this idea and find an alternative.

So I have a RADGrid using a RADToolbar at the top of the grid.

The problem I am having is two-fold...
  1. The RADToolbar Buttons do not cause a postback. Viewing the html source after the page is rendered shows no java code at all within the RADToolbar.
    How do I get these buttons on the Toolbar to actually postback?
    The RADToolbar has AutoPostBack = True and each RADToolbarButton has PostBack = True
  2. If I render the RADToolbar into the grid, the "Pager" items (Prev, Next, Page#, etc) kick off the Ajax call which displays the LoadingPanel, but gets "stuck"...
    The loading panel never goes away. Debugging the page reveals an error in jquery-ui.min.js:
                            Unable to get property 'push' of undefined or null reference
    No other information is show about the error...so I am at a loss on this one. This error happens only when the RADToolbar is used.

That being said, I have a RADGrid where I set the following:
.CommandItemDisplay = Telerik.Web.UI.GridCommandItemDisplay.Top
.CommandItemSettings.ShowAddNewRecordButton = False

Now, I have server-side code that dynamically creates a RADToolbar and adds it to the RADGrid's MasterTableView.CommandItemTemplate...
Me.RADGrid.MasterTableView.CommandItemTemplate = New Template_RADToolbar(Me._objRADToolbar)

My custom ITemplate is:
Private Class Template_RADToolbar : Implements ITemplate
    Protected _objRADToolbar As RadToolBar
 
    Public Sub New(ByRef p_objRADToolbar As RadToolBar)
        Me._objRADToolbar = p_objRADToolbar
    End Sub
 
    Public Sub InstantiateIn(container As System.Web.UI.Control) Implements System.Web.UI.ITemplate.InstantiateIn
        container.Controls.Add(Me._objRADToolbar)
    End Sub
End Class


Ben
Top achievements
Rank 1
 answered on 05 Feb 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?