Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
119 views
I have a grid akin to the following which has as its DataSourceID a LinqDataSource:

<telerik:RadGrid ID="MyGrid" runat="server"
    AllowAutomaticInserts="false"
    AllowFilteringByColumn="true"
    AllowSorting="true"
    PageSize="15"
    ShowFooter="true"
    EnableLinqExpressions="true"
    OnUpdateCommand="MyGrid_UpdateCommand"
    OnItemDataBound="MyGrid_ItemDataBound"
    DataSourceID="MyLinqDataSource"
    >
    <PagerStyle Mode="NextPrevNumericAndAdvanced" />
    <MasterTableView AutoGenerateColumns="false" EditMode="InPlace"
        AllowFilteringByColumn="true"
        DataKeyNames="Id"
        OverrideDataSourceControlSorting="true"
        Width="1700px" TableLayout="Fixed"
        CommandItemDisplay="Top"
        >
        <CommandItemTemplate>
            <asp:Button ID="SearchButton" runat="server" Text="Search" Width="100px" Height="2em"
                CommandName="<%=RadGrid.FilterCommandName %>" />
        </CommandItemTemplate>
        <Columns>
            ...
        </Columns>
    </MasterTableView>
    <ClientSettings AllowColumnsReorder="true" >
        <Resizing AllowColumnResize="true" AllowResizeToFit="true" EnableRealTimeResize="true" />
    </ClientSettings>
</telerik:RadGrid>

All columns have AutoPostBackOnFilter="false" and have a SortExpression. Whenever I click the button in the CommandItemTemplate I 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.

For those that answer with "use Advanced Binding", how do I replicate all the functionality of the LinqDataSource in code-behind?
Tsvetina
Telerik team
 answered on 08 Apr 2011
2 answers
96 views
Hi,

Any help on this matter would be greatly appreciated, I have been stuck on it for a good while now.

I have a radtoolbar, I have two events handled:

OnClientButtonClicked="RadToolBar_ClientButtonClicked"
OnButtonClick="RadToolBar_ButtonClick" 

Depending on the outcome of the RadToolBar_ClientButtonClicked method (javascript) I would like to/not to handle the OnButtonClick event using the RadToolBar_ButtonClick (c#) - that is, if the client-side method returns false I would like the server-side method to just not execute (I don't even want an alternative method to run, just want it to do nothing).

I have tried the following..

OnClientButtonClicked="return RadToolBar_ClientButtonClicked()"
and
OnClientButtonClicked="return RadToolBar_ClientButtonClicked();"

...but on doing this the page simply does not load (remains blank white).

Thanks a LOT!!!

Dan
Daniel
Top achievements
Rank 1
 answered on 08 Apr 2011
0 answers
75 views

Hello
Im trying to filter the radgrid with filtertemplate. the code look's like this

<telerik:GridTemplateColumn DataField="Obraz" Resizable="false" Visible="false" UniqueName="TemplateColumn"
  AllowFiltering="true">
 <FilterTemplate>
 <telerik:RadComboBox ID="RadComboBoxCountry"  DataTextField="Text"
 DataValueField="Obraz" Height="100px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("TemplateColumn").CurrentFilterValue %>'
 runat="server" OnClientSelectedIndexChanged="CountryIndexChanged">
 <Items>
 <telerik:RadComboBoxItem Text="Bez filtra" value="1"/>
  <telerik:RadComboBoxItem Text="Pojedynczy skan" value="~/Ikony/Gify/Skan.png"/>
  <telerik:RadComboBoxItem Text="Multi skan" value="~/Ikony/Gify/SkanMulti.png"/>
  <telerik:RadComboBoxItem Text="Brak skanu" value="~/Ikony/Gify/BrakSkanu.png"/>
   <telerik:RadComboBoxItem Text="Bez filtra1" value=""/>
    </Items>
   </telerik:RadComboBox>
   <telerik:RadScriptBlock ID="RadScriptBlock3" runat="server">
  <script type="text/javascript">
  function CountryIndexChanged(sender, args) {
   var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
    tableView.filter("Obraz", args.get_item().get_value(), "EqualTo");
     }
   </script>
 </telerik:RadScriptBlock>
 </FilterTemplate>
<ItemTemplate>
 <asp:Image ID="Image1" runat="server" ImageUrl="<%# bind('Obraz') %>" ForeColor="White" />
 </ItemTemplate>
 <HeaderStyle Width="199px" />
<ItemStyle Width="199px" />
 </telerik:GridTemplateColumn>

and when I change the item of combox nothig happens the items are not filterd, what can be wrong?
Tomasz
Top achievements
Rank 1
 asked on 08 Apr 2011
1 answer
88 views
Hi,
Is any way to merge two RadWindows into one RadWindow?
On the left: 1. RadWindow and on the right: 2. RadWindow.

Best reagards.
Shinu
Top achievements
Rank 2
 answered on 08 Apr 2011
25 answers
793 views
I see your demo of the new AsyncUpload control claims:

RadAsyncUpload provides client-side event called OnClientValidationFailed. It is fired when the selected file has invalid extension or its size is higher than the MaxFileSize property.

The demo, however, is validating file size on the server. Is there still a problem with client-side filesize validation, or is the demo just not configured to use it?

Thanks,

Craig
Peter Filipov
Telerik team
 answered on 08 Apr 2011
1 answer
88 views
I am using a SharePoint 2007 PublishingPage to display a RadHtmlField as follows:

<

 

telerik:RadHtmlField ID="RadHtmlField1" FieldName="Content" runat="server" ToolsFile="/_wpresources/RadEditorSharePoint/5.8.6.0__1f131a624888eeed/Resources/QAAInternetToolsFile.xml" ConfigFile="/_wpresources/RadEditorSharePoint/5.8.6.0__1f131a624888eeed/Resources/QAAInternetConfigFile.xml"></telerik:RadHtmlField>

 

I wish to use Image Manager to insert images from both the SiteCollection and the current website. Looking at the documentation my ConfigFile.xml should look like this:

<configuration>
 <property name="ToolbarMode">Default</property>
 <property name="ToolsWidth">680px</property>
  <property name="ImagesPaths">
           <item>PublishingImages</item>
           <item>/SiteCollectionImages</item>
  </property>
</configuration>

When I click ImageManager it shows both folder locations defaulting to the current website image folder which is good. When I click on the second folder it displays the site collections images which is also fine. But, if I then click on the first folder again it will not change - it stays fixed on the site collection folder.

This looks like a bug. Is there a way around it?

Stanimir
Telerik team
 answered on 08 Apr 2011
4 answers
182 views

When there is a single column relating two tables defining GridRelationFields is straight forward:

GridRelationFields rf = new GridRelationFields();
rf.MasterKeyField = "col1";
rf.DetailKeyField = "col1";
tvProtocols.ParentTableRelation.Add(rf); 

However, how do you define a GridRelationFields when the keys are compound, such as:

GridRelationFields rf = new GridRelationFields();
rf.MasterKeyField = "col1,col2,col3";
rf.DetailKeyField = "col1,col2,col3";
tvProtocols.ParentTableRelation.Add(rf); 

This is not uncommon.

Must I create an autoincremented column in the parent table and then rely only upon that in the child table?

Mira
Telerik team
 answered on 08 Apr 2011
3 answers
84 views

I have asp.net web page that is using RadTabStrip & RadMultiPage. The multi page controls/tabs contain web parts.

When I use Ajax and click/switch to the Design Mode (WebPartManager.DesignDisplayMode) I don't have the web parts drag and drop feature, drop down verbs menu and other client functionality. What is the work arount to make it work with Telerik?

Tsvetoslav
Telerik team
 answered on 08 Apr 2011
1 answer
95 views
we written onNodeDragging event at client side, while draging the node it will fires automatically with out interruption.
here  we paste the code :
 function onNodeDragging(sender, args) {
            if (args._sourceNodes[0]._attributes._data.IsPrerequisiteQuestion == "True" || args._sourceNodes[0]._attributes._data.IsPrerequisiteAttribute == "True") {
                args.set_cancel(true);
                args.IsValid =false;
                return false;
            }
            else {
                args.set_cancel(false);
            }
        }
Shinu
Top achievements
Rank 2
 answered on 08 Apr 2011
2 answers
218 views
How can I bind the RadTimePicker to a SQL Server 2008 Time field? It would see the logical choice of control, but when I do, I get the error:-
Cannot convert value of parameter 'Time' from 'System.DateTime' to 'Nullable<System.TimeSpan>' 

Is there a work around,or plans to support this in the future? 
Vasil
Telerik team
 answered on 08 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?