Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
150 views
I have a grid setup to page, but sometimes when I click Next or Prev or even select a page by number I will get the following error:

Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

Now I know this error is typically associated with trying to pass values from client to server that were not registered as acceptable input values, but I am not using any other controls on my page; the grid is the only control.

Any suggestions or solutions to my problem?





Chris Berry
Top achievements
Rank 1
 answered on 21 Oct 2009
1 answer
137 views
Is it possible to not set the window behaviors all in one statement? I have a series of hidden form values that dictate whether the window should have reload or close or move options, but it's creating a nested if() nightmare. Can I somehow do radWnd.set_behaviors = radWnd.set_behaviors + radWnd.set_behaviors(x)?

I've also tried creating a string and setting it that way, which resulted in the window having no behaviors at all.
var hidShowCloseButton = getElementId(_strCPId + 'hidShowCloseButton'); 
        var hidHideReloadBtn = getElementId(_strCPId + 'hidHideReloadBtn'); 
        var hidWindowBehaviorMove = getElementId(_strCPId + 'hidWindowBehaviorMove'); 
        var strBehaviors = ""; 
        var strTelerik = "Telerik.Web.UI.WindowBehaviors."; 
         
        strBehaviors = strTelerik + "None"; 
        if (hidShowCloseButton != null) { 
                strBehaviors += " + " + strTelerik + "Close"; 
        } 
        if (hidWindowBehaviorMove != null) { 
                if (hidWindowBehaviorMove.value == "true") { 
                    strBehaviors += " + " + strTelerik + "Move"; 
                } 
          } 
        if (hidHideReloadBtn != null) { 
              if (hidHideReloadBtn.value == "true") { 
                    strBehaviors += " + " + strTelerik + "Reload"; 
              } 
          } 
          radWnd.set_behaviors(strBehaviors); 

Nik
Top achievements
Rank 1
 answered on 21 Oct 2009
2 answers
179 views
Hi,
I am using rad editor to manipulate some content. The content is like that..
This is& some sample$ content This is some£ sample content^ 
Notice these &,$ symbols here...when user selects any of these symbols and press right click I need to show a 
context menu saying REMOVE SYMBOL.... right now according to my understandings you have to relate context menus with a tag....which I don't have here....in fact I want to show the context menu on the basis of some condition.

Any help????

Thanks




Rumen
Telerik team
 answered on 21 Oct 2009
1 answer
75 views

I am attempting to disable embedded scripts for the radEditor on a project that uses radEditor with RadSpell, Dialogs and a couple Tooltips. I am disabling all EmbeddedScripts in the web.config with:
    <add key="Telerik.EnableEmbeddedScripts" value="false"/>
From my research on your forums I found I also need to use the source version of the EditorDialogs and configure them to load their scripts from source as well. Unfortunately my version does not include the source for the EditorDialogs.

The reason I would like to disable embedded scripts is because I am running into an error with the xhtml filter and I cannot find a way to permanently disable it across the entire page lifecycle. I can disable it using the OnClientLoad event of the editor like so: 

 

    editor.get_filtersManager().set_enableXhtmlFilter(

false);
This works fine when the control is initially loaded, however it does not persist on an AJAX postback.

 

Rumen
Telerik team
 answered on 21 Oct 2009
2 answers
150 views
Hello
I've been searching for a strange bug, when using a column template, without defining the itemtemplate (i.e. defining only edititemtemplate), Grid Delete command doesn't work any more, it throws an exception like this:

Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object.

took me 4 hours to solve it, hope it helps somebody else.
always define <itemtemplate /> even if it's empty .

Randy
Top achievements
Rank 1
 answered on 21 Oct 2009
2 answers
496 views
We are considering adding a feature to our application that provides a thumbnail preview of any documents that might be contained within a specific directory. These documents could be any one of several common types including pdf, rtf, doc, etc. I was wondering what you would suggest would be a good approach. Do you have a thumbnail control of some sort that might work for this purpose? We were considering using the slider control to facilitate browsing.

Thanks in advance,
Tom
Tom Jaspering
Top achievements
Rank 1
 answered on 21 Oct 2009
5 answers
422 views
I'm working with another developer to satisfy their busienss requirement of enabling/disabling editing on a row-by-row basis based on a given criteria...  For simplicity sake, let's say they can edit Even row #'s and Odd row #'s are displayed but not editable...

Our grid has a standard GridEditCommandColumn named "EditCommandColumn"... We also have an additional GridButtonColumn named "DeleteCommand" and its CommandName is set to "Delete"...  There is also a ClientEvents setting for OnRowDblClick to call a JavaScript function which performs the following:


radGrid.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical()); 

What I've done thus far is to use the following code to access the ImageButton in the GridEditCommandColumn and set it's Visible property to False...  Same basic approach I'm assuming I would apply for the Delete column though I haven't made it that far yet...


TableCell tableCell = gridDataItem[
"EditCommandColumn"];  
ImageButton imageButton = tableCell.Controls[0] as ImageButton;  
imageButton.Visible = false; 

So this works to hide the button and prevent the user from clicking on it, but it leaves the client-side OnRowDblClick still functional...

I was hoping to find something far more elegant / canned & ready-to-use... ie. a row-level setting of some sort - such as a property on the GridDataItem for "AllowEdit" or something similar... perhaps both "AllowEdit" and "AllowDelete"... but I see nothing of the sort...

What is the "right" way to handle this case? Or am I heading in the right direction and just need a few more tweaks.... 

I'm thinking my option here for dealing with the client-side double-click handler would be to do as described above and additionally catch the ItemCommand event and test for the same conditions and conditionally Cancel the ItemCommand event?


Brad Hehe
Top achievements
Rank 1
 answered on 21 Oct 2009
1 answer
327 views
Hi,

Is it possible to add a footer to a GridBoundColumn without turning it into an item template.

i want to add a button to the footer of a radGrid.  I'd like to have it under the right most column, but don't want to have to convert the contents of the column to an item template, is this possible, and if so, how do I do it?

The code below is a snippet from the grid I'd like to add the footer to.  If possible I'd like the button to appear under the FirstName column.



<telerik:RadGrid ID="grvLandlords" runat="server" AutoGenerateColumns="False" DataSourceID="SqlLandlord" GridLines="None"   
                Skin="Office2007" OnSelectedIndexChanged="grvLandlords_SelectedIndexChanged" OnItemDataBound="grvLandlords_ItemDataBound" > 
                <MasterTableView ShowFooter="true" DataKeyNames="LandlordID" DataSourceID="SqlLandlord">  
                    <Columns>                              
                        <telerik:GridButtonColumn CommandName="Select" Text="Select" UniqueName="Select">  
                        </telerik:GridButtonColumn>    
                        <telerik:GridBoundColumn DataField="LandlordID" DataType="System.Int32" HeaderText="LandlordID" 
                            ReadOnly="True" SortExpression="LandlordID" UniqueName="LandlordID" Visible="false">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="Title" HeaderText="Title" SortExpression="Title" 
                            UniqueName="Title">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" SortExpression="FirstName" 
                            UniqueName="FirstName">  
                        </telerik:GridBoundColumn> 
</Columns> 
                </MasterTableView> 
            </telerik:RadGrid> 


Thanks,

Peter
Pavlina
Telerik team
 answered on 21 Oct 2009
1 answer
224 views
Hi

In RadGrid, when you group and the group continues on the next page, RadGrid automatically displays this:
"(Showing 7 of 65 items. Group continues on the next page.)"

Is there a way to ALWAYS show this when grouping? Even when group does not continue on next page? ie:
"(7 items)"
Iana Tsolova
Telerik team
 answered on 21 Oct 2009
2 answers
64 views
Hi,
I am using rad Editor for some content manipulation which can be either in right to left language like arabic.
Is that possible to write in arabic using rad editor while cursor should move ahead rather staying there...this is what exactly happens when we use any left to right language???.

I am waiting for your response.

Thanks for your help.

Rumen
Telerik team
 answered on 21 Oct 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?