Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
187 views
Hello,
I am trying to add RadFilterTextFieldEditor programmatically. It works fine BUT after any action with the field I am getting an error

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object.

ASP code

   <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" LoadingPanelID="LoadingPanel1" EnableAJAX="true" >
             
                <telerik:RadFilter  runat="server" ID="RadFilter1" ExpressionPreviewPosition="Bottom" Enabled="false" RegisterWithScriptManager="true" EnableEmbeddedScripts="true"  EnableViewState ="true"  >
                </telerik:RadFilter>
            </telerik:RadAjaxPanel>

C# code
   RadFilterTextFieldEditor editor = new RadFilterTextFieldEditor();
            editor.FieldName = "field1";
            editor.DataType = typeof(string);
            editor.DisplayName = "Field 1";
            RadFilter1.FieldEditors.Add(editor);
            RadFilterTextFieldEditor editor1 = new RadFilterTextFieldEditor();
            editor1.FieldName = "field2";
            editor1.DataType = typeof(string);
            editor1.DisplayName = "Field 2";
            RadFilter1.FieldEditors.Add(editor1);

Please help !!!
Iana Tsolova
Telerik team
 answered on 09 Nov 2010
3 answers
975 views
Hello All,

I have a quite complex RadGrid with 3 hierarchy levels.
Data is show like below In RadGrid:

Organization1
   - SubOrganization1
        - SubSubOrganization1
Organization2
   - SubOrganization2
        - SubSubOrganization2
   - SubOrganization2B
        - SubSubOrganization2B
Organization3
   - SubOrganization3

Organizations are referenced in RadGrid using Ids. Every Organization has it's own Id, also Sub Organizations.

Now I have noticed a problem e.g. when I read data from Database which belongs to same Organization hive but are stored in different rows in Database. Right situation is like Organization2 in picture above, wrong one is sample below.

Is it possible to prevent inserting a row that allready exits in RadGrid using ItemCreated method and insert row in proper place in hierarchy?
I can get all Ids of Item in ItemCreated method but how to check from RadGrid that row or part of it doesn't allready exists and put childs after it?
Couldn't write such code I disn't get it to work, anyone have a sample?

I try avoid to create same first or second hiearchy level items but instead put their 3th level childs nicely below one hive (like Organization2 above).

Wrong hierarchy that I get now is like following where Organization2 is two diffrent hives:

Organization1
   - SubOrganization1
        - SubSubOrganization1
Organization2
   - SubOrganization2
        - SubSubOrganization2
Organization2 <=  This is wrong!
   - SubOrganization2B
        - SubSubOrganization2B
Organization3
   - SubOrganization3

Cheers

Tsvetina
Telerik team
 answered on 09 Nov 2010
1 answer
101 views
Hi,

I am using RadGrid with grouping.

I am grouping by 4 fields in the table that represent the outline level in an Excel spreadsheet that I am transfering to a database.
4 is the maximum number of levels I have but not all the rows use up to 4 levels.

there is a way to remove/Hide group levels that are blank?

See the attached picture.

Thanks,

-Gabriele
Veli
Telerik team
 answered on 09 Nov 2010
1 answer
103 views
Hello to telerik.

I found this different information about client side validation extension on RadUpload.

this is saying arguments.IsValid = <%= RadUpload1.ClientID %>.ValidateExtensions(); missing $find() function

and this is saying arguments.IsValid = $find('<%= RadUpload1.ClientID %>').validateExtensions();

so I thing there should be find function.

But whats worries me is when I do this: var fileInputs = $find(fileuploadId).GetFileInputs(); I get Error: $find(fileuploadId).GetFileInputs is not a function. And variable fileuploadId is correct because validateExtensions on that object works fine...

I want to check if there is at least one file selected (on client). Do you know about better approach? Thanks.


Cori
Top achievements
Rank 2
 answered on 09 Nov 2010
1 answer
183 views
Hi,

I have a page, where there is 3 radeditor controls along with other form elements (e.g. textbox, combobox etc). My requirement is, I need to 'extract' the RTF from these 3 controls and store it in the database. I have looked up different posts regarding this, but all the sample applications that was posted was using the method to use Response.Redirect (to stop the Save Dialog popto to open), after I call the ExportToRtf() method. But, I wont be able to get the RTF content of all the RadEditors after the 1st Response.Redirect (also, my view state will be lost along with all the data that was eneted by the user in the form elements).

I have also tried putting OpenInNewWindow = "false", but this doesnt seem to work (my control def is given below).

<

 

 

telerik:RadEditor ID="txtAfterChange" Width="250" Height="150" ToolsFile="~/Script/ToolsFile.xml"

 

 

 

ToolsWidth="330px" runat="server" EditModes="Design" ToolbarMode="ShowOnFocus">

 

 

 

<ExportSettings OpenInNewWindow="false">

 

 

 

</ExportSettings>

 

 

 

</telerik:RadEditor>

Is there any alternative, or any resolution to my problem? Please help me !

Regards,
Bhaskar

 

Rumen
Telerik team
 answered on 09 Nov 2010
5 answers
363 views
I am trying to use an asp range validator to throw a message when the user tries to hit the save button.  It works when I do not set a min and max value.  I am setting the min and max value in the code behind.  Any suggestions?

        <asp:RangeValidator ID="rv" runat="server" ErrorMessage="Enter a valid value." 
            ControlToValidate="txt" Type="Integer" MinimumValue="0" 
            MaximumValue="100"></asp:RangeValidator> 
 
                            <telerik:RadNumericTextBox ID="txt" runat="server" Culture="en-US" Type="Percent" 
                                Width="90px" InvalidStyle-BorderColor="Red" InvalidStyle-BorderStyle="Solid" 
                                AllowOutOfRangeAutoCorrect="false" InvalidStyle-BorderWidth="2" CausesValidation="true"> 
                                <ClientEvents OnLoad="Load" OnBlur="Blur" OnFocus="Focus" OnError="Error" /> 
                                <NumberFormat DecimalDigits="4" AllowRounding="false" KeepNotRoundedValue="true" /> 
                            </telerik:RadNumericTextBox> 

Brian
Top achievements
Rank 1
 answered on 09 Nov 2010
10 answers
542 views
I am in the process of converting my RadTreeView to use the ASP AJAX RadTreeView and I am having some trouble. I have a NodeTemplate that uses DataBinder.Eval() calls to build the template. On the server, I get a hierarchical datasource and manually add the nodes (not using a databind). This would add the nodes but none of the DataBinder tags were being resolved. I read in your documentation that I needed to call DataBind() on the treeview control. I added that call and the tags are being resolved and the templates are working.

Now the problem is when I try to expand a node that wasn't initially expanded. I am using the ServerSideCallBack mode on the node. The NodeExpanded event will fire and I will manually add the child nodes to the selected/expanded nodes but once again, the template isn't working and the DataBinder.Eval calls are not being made. I have tried calling DataBind on the nodes being added, the node that was expanded and the RadTreeView control itself but to no avail.

Any ideas and help would be appreciated.

Nikolay Tsenkov
Telerik team
 answered on 09 Nov 2010
2 answers
80 views
In codebehind, given a GridTemplateColumn, how do I get a reference to containing grid's datasource?

Sean M. Severson
Sean Severson
Top achievements
Rank 1
 answered on 09 Nov 2010
1 answer
77 views
I am using RADGrid client side binding , data source is JSON.


when I click a imagebutton or clientside delete, I always get JSCRIPT parse error. please help

<telerik:GridButtonColumn  ButtonType="ImageButton" CommandName="Delete" Text="(remove)" UniqueName="DeleteColumn" >
 </telerik:GridButtonColumn>

  <telerik:GridClientDeleteColumn Text="(remove2)" UniqueName="DeleteColumn2" />


an javascript parse error ,'a[b](c,d)'  occurred in McrosoftAjax.js script file.


//----------------------------------------------------------
// Copyright (C) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------
// MicrosoftAjax.js
Function.__typeName="Function";Function.__class=true;Function.createCallback=function(b,a){return function(){
Veli
Telerik team
 answered on 09 Nov 2010
2 answers
126 views
Hello,

In my FormCreated method in the code behind, I am trying to set the visibility of the 'Options' button in the InlineInsertTemplate to false in the manner below:

if (e.Container.Mode == SchedulerFormMode.Insert)
{
   LinkButton Options = (LinkButton)e.Container.FindControl("InsertMoreButton");
   Options.Visible = false;
}

This code does not work however, as the FindControl method isn't finding the button. I.e, I get the following error: "Object reference not set to an instance of an object."

I only want this to happen for the InlineInsert form, so using the RadScheduler property below:

EnableAdvancedForm="false"

... is no good for me as this affects the Options button for both the InlineEdit and InlineInsert templates.

Note: I am trying to avoid creating my own template, as the built-in styling over-complicates what I need to do in the time that I have.

I look forward to your response.
Veronica
Telerik team
 answered on 09 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?