Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
99 views
Hi,

I am trying to use the RadFilter to create a customer filter. The code is as follows:

<%

@ Control Language="vb" AutoEventWireup="false" CodeBehind="ReportCriteria.ascx.vb" Inherits="xxx.ReportCriteria" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 


 <telerik:RadFilter runat="server" ID="RadFilter1" 
        OnApplyExpressions="RadFilter1_ApplyExpressions">  
            <FieldEditors> 
                <telerik:RadFilterBooleanFieldEditor FieldName="Some Bool" /> 
                <telerik:RadFilterTextFieldEditor FieldName="Some Text" /> 
            </FieldEditors> 
        </telerik:RadFilter> 

and the code behind is...
Imports Telerik.Web.UI  
 
Partial Public Class ReportCriteria  
    Inherits System.Web.UI.UserControl  
 
    Protected Sub RadFilter1_ApplyExpressions(ByVal sender As ObjectByVal e As Telerik.Web.UI.RadFilterApplyExpressionsEventArgs)  
        Dim provider As New RadFilterSqlQueryProvider()  
        provider.ProcessGroup(e.ExpressionRoot)  
        ltlDebug.Text = provider.Result  
    End Sub 
 
End Class 

The filter displays correctly, and I can add criteria. However, as soon as I change the condition from 'Some Bool' to 'Some Text' I get the following error:

Specified argument was out of the range of valid values.
Parameter name: HierarchicalIndex


[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: HierarchicalIndex]
   Telerik.Web.UI.RadFilterItemsCollection.get_Item(String hierarchicalIndex) +63
   Telerik.Web.UI.RadFilter.HandleClientCommand(String commandName, String commandArgs) +505
   Telerik.Web.UI.RadFilter.RaisePostBackEvent(String eventArgument) +82
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565


Any ideas? 

Thanks.
Nikolay Rusev
Telerik team
 answered on 22 Jun 2010
1 answer
384 views
Hey there,

I've got a RadGrid bound to an objectDataSource but I've been running into an odd situation, on my grid I got the following declared:
<telerik:GridDropDownColumn DataField="Continent.Id" HeaderText="Continente" DataSourceID="odsContinent" ListTextField="Name" ListValueField="Id" UniqueName="Continent" SortExpression="Continent" />

The problem is, regardless of the params I set on my objectDataSource I am not able to switch the param name from Continent.Id to something I could name a parameter on C# Code, so I always end up with the following error when trying to update an item:

"Sys.WebForms.PageRequestManagerServerErrorException: ObjectDataSource 'odsCountry' could not find a non-generic method 'GridUpdate' that has parameters: Alias, Fullname, Capital, Continent.Id, ThreeDigitCountryCode, ThreeLetterCountryCode, TwoLetterCountryCode, Id."


<asp:ObjectDataSource ID="odsCountry" runat="server" 
            TypeName="Highland.Models.Country" 
            EnablePaging="true"             
            SelectMethod="SlicedFindAll"  
            SelectCountMethod="Count" 
            OldValuesParameterFormatString="{0}" 
            InsertMethod="GridInsert" DeleteMethod="GridDelete" UpdateMethod="GridUpdate"             
            StartRowIndexParameterName="firstResult" 
            MaximumRowsParameterName="maxResults" > 
            <DeleteParameters> 
                <asp:Parameter Name="Id" Type="Int32" /> 
            </DeleteParameters> 
            <UpdateParameters> 
                <asp:Parameter Name="Id" Type="Int32" /> 
                <asp:Parameter Name="Alias" Type="String" /> 
                <asp:Parameter Name="Fullname" Type="String" /> 
                <asp:Parameter Name="Capital" Type="String" /> 
                <asp:Parameter Name="Continent" Type="String" /> 
                <asp:Parameter Name="ThreeDigitCountryCode" Type="Int32" /> 
                <asp:Parameter Name="ThreeLetterCountryCode" Type="String" /> 
                <asp:Parameter Name="TwoLetterCountryCode" Type="String" /> 
            </UpdateParameters> 
            <InsertParameters> 
                <asp:Parameter Name="Id" Type="Int32" /> 
            </InsertParameters> 
        </asp:ObjectDataSource>  

Thanks for your time :)

-Thi


Rosen
Telerik team
 answered on 22 Jun 2010
1 answer
101 views
Hi,

I use one OnChanging view to call one webservice and use a DayRender to apply to my calendar but have some problems in the cycle. The DayRender is apply before my webservice are digest. I need one new DayRender after my response is ready or Onsucess. Exist some "repaint" event like tabstrip or call OnSucess.

Thanks 
Daniel
Telerik team
 answered on 22 Jun 2010
1 answer
99 views
Downloaded and installed RadControlExamples.  When building the solution it produces 20 error messages all realated to:

Description: Type 'MyBusinessObjectCollection' is not defined.  File: WebServiceVB.asmx.

How do I go about fixing this?

Thanks



Tsvetina
Telerik team
 answered on 22 Jun 2010
3 answers
546 views
EJ

Posted on 13 minutes ago

i have two situations as I listed earlier:

1) needing to display a messagebox modal that shows info and has ok button - radalert seems to be the ticket here if I can get it to work

2) needing to display a usercontrol within a modal window inside of my browser window that is not a popup window - radwindow seems to be the thing to use here - but i need to have two buttons outside of the usercontrol that have "add" or "cancel" - the cancel button can just close the window - the "Add" button needs to call a public method on the usercontrol and if that returns true then it closes the window and passes back a value of what was added (guid or string) otherwise it does nothing and the radwindow continues to be displayed

here's the structure of my page

my code for this is running in a user control that is embedded in a page that has a masterpage

my masterpage has the scriptmanager component

the user control generally is structured like so:

<asp:UpdatePanel ID="MyUpdatePanel" runat="server">
    <ContentTemplate>
        <asp:FormView ID="MyFormView" runat="server" DefaultMode="Edit" DataSourceID="MyObjectDataSource">
            <EditItemTemplate>
<asp:Panel ID="Panel1" runat="server" DefaultButton="ReaderLinkButton">
                            <asp:LinkButton ID="MyLinkButton" runat="server" OnClick="MyLinkButton_Click">My Link</asp:LinkButton>
</EditItemTemplate>
        </asp:FormView>
    </ContentTemplate>
</asp:UpdatePanel>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
<Windows>
        <telerik:RadWindow ID="MyDialogRadWindow" runat="server" Modal="True">
            <ContentTemplate>
                <asp:Label ID="MyLabel" runat="server" Text=""></asp:Label>
                <uc:MyControl ID="MySpecialControl" runat="server" />
                <asp:Button ID="DialogCancelButton" runat="server" Text="Cancel" OnClick="DialogCancelButton_Click"
                    Visible="false" />
                <asp:Button ID="DialogOkButton" runat="server" Text="Ok" OnClick="DialogOkButton_Click" />
            </ContentTemplate>
        </telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
</ContentTemplate>
</asp:UpdatePanel>

and my code behind for the linkbutton is

protected void MyLinkButton_Click(object sender, EventArgs e)
        {

// this was my attempts at the radalert

//                        string script = @"
//                                    function f() {
//                                        radalert('" + returnValues[1] + @"');                        
//                                    }
//                                Sys.Application.remove_load(f);
//                                Sys.Application.add_load(f);";

                       string script = @"radalert('" + returnValues[1] + @"',200,200);";                        
                        Page.ClientScript.RegisterStartupScript(typeof(string), "radalert", script, true);
}

i read various posts about this but there does not seem to be a definite method to open/show or close/hide the radwindow that is located inside of a updatepanel inside a user control.

I tried this and it does not work

        private void ShowDialog() 
        { 
         // define the name and type of the client scripts on the page 
            string csname = "showDialog"
            // get a clientscriptmanager reerence from the page class 
            ClientScriptManager cs = Page.ClientScript; 
            // check to see if the startup script is already registered 
            if (!cs.IsStartupScriptRegistered(csname)) 
            { 
                string script = @" 
                <script language='javascript'
                    function showDialog(){ 
                        var oWnd = $find('" + MyDialogRadWindow.ClientID + @"'); 
                        oWnd.show(); 
                        Sys.Application.remove_load(showDialog); 
                    };  
                    Sys.Application.add_load(showDialog); 
                </script>"; 
                cs.RegisterStartupScript(typeof(string), csname, script); 
            } 
        } 
 
        private void HideDialog() 
        { 
            string csname = "hideDialog"
            // get a clientscriptmanager reerence from the page class 
            ClientScriptManager cs = Page.ClientScript; 
            // check to see if the startup script is already registered 
            if (!cs.IsStartupScriptRegistered(csname)) 
            { 
                string script = @" 
                <script language='javascript'
                    function hideDialog(){ 
                        var oWnd = $find('" + MyDialogRadWindow.ClientID + @"'); 
                        oWnd.Close(); 
                        Sys.Application.remove_load(hideDialog); 
                    };  
                    Sys.Application.add_load(hideDialog); 
                </script>"; 
                cs.RegisterStartupScript(typeof(string), csname, script); 
            } 
        } 

i tried this but it did not help calling it server side

i tried doing the ajax sample here but that did not work either
how do I do this?
Fiko
Telerik team
 answered on 22 Jun 2010
1 answer
101 views
I have a grid with a bound column:

<telerik:GridBoundColumn HeaderText="<%$ Resources:Common, Load %>" DataField="LoadNo"

 

 

UniqueName="LoadNo" SortExpression="LoadNo" HeaderStyle-Width="30px" />


I make a javascript call to a web service and bind the results to the grid:

function

 

updateMCTGrid(result) {

 

 

try {

 

ShowHideLoadingPanel(

'Hide', MCTransferGrid.ClientID);

 

MCTransferGrid.get_masterTableView().set_dataSource(result.Data);

MCTransferGrid.get_masterTableView().dataBind();

MCTransferGrid.get_masterTableView().set_virtualItemCount(result.Count);

 

}

 

catch (e) {

 

ShowHideLoadingPanel(

'Hide', MCTransferGrid.ClientID);

 

}

}


The "LoadNo" is a number that can return 0.  When binding I see every non-zero value but, 0 show as blank in the column. 

Any thoughts?

 


 

 

Rosen
Telerik team
 answered on 22 Jun 2010
4 answers
456 views
Hello experts,
I have a rad grid with 5 groups each having certain number of items. I can sort the groups ascending or decending using sortexpression.
But my need is that, i want to reorder the groups so that the group which i prefer need to be the first one and the
rest may be in any order. simply to say, i want to set certain group to be the first one in the list of groups at runtime. 

Below is my GridView code, Please help on this its very urgent.

d
<telerik:RadGrid ID="GridView1" AllowSorting="true" runat="server" MasterTableView-GroupLoadMode="Client" GridLines="None" AutoGenerateColumns="False" Skin="Office2007" Width=100%> 
                                                                                             <groupingsettings casesensitive="False"  />      
                                                                                        <MasterTableView GroupsDefaultExpanded="false">                                                                                         
                                                                                            <GroupByExpressions> 
                                                                                                <telerik:GridGroupByExpression> 
                                                                                                    <SelectFields> 
                                                                                                        <telerik:GridGroupByField FieldAlias="Category" FieldName="Category" HeaderValueSeparator=" " HeaderText=" &lt;b&gt;Available : &lt;/b&gt;" FormatString="" ></telerik:GridGroupByField> 
                                                                                                    </SelectFields> 
                                                                                                     
                                                                                                    <GroupByFields> 
                                                                                                        <telerik:GridGroupByField FieldAlias="Category" FieldName="Category" FormatString="" SortOrder="None" HeaderText=""></telerik:GridGroupByField> 
                                                                                                    </GroupByFields> 
                                                                                                </telerik:GridGroupByExpression> 
                                                                                            </GroupByExpressions>                                                                                                                                                                              
                                                                                             
                                                                                         
                                                                                            <RowIndicatorColumn> 
                                                                                                <HeaderStyle Width="20px" /> 
                                                                                            </RowIndicatorColumn> 
                                                                                            <ExpandCollapseColumn > 
                                                                                                <HeaderStyle Width="20px" /> 
                                                                                            </ExpandCollapseColumn> 
                                                                                            <Columns> 
                                                                                                <telerik:GridTemplateColumn  UniqueName="TemplateColumn1" HeaderText="&lt;font color=red&gt; Select&lt;/font&gt;"
                                                                                                <ItemTemplate> 
                                                                                                <asp:CheckBox ID="CheckBox1" AutoPostBack="true" runat="server"/> 
                                                                                                </ItemTemplate> 
                                                                                                    <ItemStyle HorizontalAlign="Left" /> 
                                                                                                </telerik:GridTemplateColumn> 
                                                                                                <telerik:GridTemplateColumn HeaderText="Product" UniqueName="URL"
                                                                                                <ItemTemplate> 
                                                                                                   <href=<%# Eval("URL") %> target="_blank" ><%# Eval("Product_Name")%></a
                                                                                                 
                                                                                                </ItemTemplate> 
                                                                                                </telerik:GridTemplateColumn>                                                                                                 
                                                                                                                                                                                               
                                                                                                <telerik:GridBoundColumn EmptyDataText="&amp;nbsp;" HeaderText="Product" UniqueName="Product_Name" DataField="Product_Name" Visible=False > 
                                                                                                    <ItemStyle HorizontalAlign="Left" /> 
                                                                                                </telerik:GridBoundColumn> 
                                                                                                <telerik:GridBoundColumn EmptyDataText="&amp;nbsp;" HeaderText="Date" UniqueName="Date" DataField="Date"
                                                                                                </telerik:GridBoundColumn> 
                                                                                                <telerik:GridBoundColumn DataField="Resolution" EmptyDataText="&amp;nbsp;" HeaderText="Resolution" 
                                                                                                    UniqueName="Resolution"
                                                                                                    <ItemStyle HorizontalAlign="Left" /> 
                                                                                                </telerik:GridBoundColumn> 
                                                                                                <telerik:GridBoundColumn DataField="Percentage_Coverage" EmptyDataText="&amp;nbsp;" 
                                                                                                    HeaderText="% Coverage" UniqueName="Percentage_Coverage"
                                                                                                    <ItemStyle HorizontalAlign="Left" /> 
                                                                                                </telerik:GridBoundColumn> 
                                                                                                <telerik:GridBoundColumn DataField="Price" EmptyDataText="&amp;nbsp;" HeaderText="Price ($)" 
                                                                                                    UniqueName="Total_Price"
                                                                                                    <ItemStyle HorizontalAlign="Left" /> 
                                                                                                </telerik:GridBoundColumn> 
                                                                                                <telerik:GridBoundColumn DataField="Area" EmptyDataText="&amp;nbsp;" HeaderText="Area" 
                                                                                                    UniqueName="Price" Visible="False"
                                                                                                </telerik:GridBoundColumn> 
                                                                                                <telerik:GridTemplateColumn UniqueName="ViewScene"
                                                                                                <ItemTemplate> 
                                                                                                   <href="javascript:openScenePopup('<%# Eval("SubProduct") %>','<%# Eval("AOI") %>','<%# Eval("View_Scene") %>')"><%# Eval("View_Scene") %></a
                                                                                                 
                                                                                                </ItemTemplate> 
                                                                                                    <ItemStyle HorizontalAlign="Left" /> 
                                                                                                </telerik:GridTemplateColumn> 
                                                                                                 
                                                                                                                                                                                           
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                <telerik:GridBoundColumn DataField="SubProduct" EmptyDataText="&amp;nbsp;" HeaderText="SubProduct" 
                                                                                                    UniqueName="SubProduct" Visible="False"
                                                                                                </telerik:GridBoundColumn> 
                                                                                                <telerik:GridBoundColumn DataField="Notes" EmptyDataText="&amp;nbsp;" HeaderText="Notes" 
                                                                                                    UniqueName="Notes" Visible="False"
                                                                                                </telerik:GridBoundColumn> 
                                                                                                <telerik:GridBoundColumn DataField="Category" EmptyDataText="&amp;nbsp;" HeaderText="Category" 
                                                                                                    UniqueName="Category" Visible="False"
                                                                                                </telerik:GridBoundColumn> 
                                                                                                 
                                                                                                <telerik:GridTemplateColumn HeaderText="Recommended" UniqueName="Recommended"
                                                                                                <ItemTemplate> 
                                                                                                   <img src=<%# Eval("Recommended")%> width=18 height=18 alt="Recommendation is based on your total Area"
                                                                                                 
                                                                                                </ItemTemplate> 
                                                                                                 <ItemStyle HorizontalAlign="Center"  /> 
                                                                                                </telerik:GridTemplateColumn> 
                                                                                                <telerik:GridBoundColumn DataField="EULA" EmptyDataText="&amp;nbsp;" UniqueName="EULA" Visible="False"
                                                                                                </telerik:GridBoundColumn> 
                                                                                            </Columns> 
                                                                                             
                                                                                        </MasterTableView> 
                                                                                        <FilterMenu EnableTheming="True" Skin="WebBlue"
                                                                                            <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                                                                        </FilterMenu> 
                                                                                        <GroupPanel Text=""
                                                                                        </GroupPanel> 
                                                                                    </telerik:RadGrid> 
Mukunda
Top achievements
Rank 1
 answered on 22 Jun 2010
2 answers
133 views
Hi,

I am developing an application for my client (they have a license for Asp.net AJAX components) and we need to use the listview.
The current version that we have is this:
<add assembly="Telerik.Web.UI, Version=2009.2.826.20,Culture=neutral, PublicKeyToken=121fae78165ba3d4" />

A few questions: 
  1. Is the listview control part of the version that we have bought? If yes, how can we add it to the toolbox?
  2. If it is not part of our version, can we upgrade to the latest version for free? Please give us a link for that.

Thanks
Vishesh
vishesh kumar
Top achievements
Rank 1
 answered on 22 Jun 2010
1 answer
123 views

Hi Support,

I've been using the Radgrid component for some time now and have stumble into a problem I can't resolve.

I have a hierarchical grid which I want paging inside the details table. I've used a simple data binding in the server code:

RadGrid2.DataSource = DataTable1;

RadGrid2.MasterTableView.DetailTables[0].DataSource = DataTable2;

And simple relations in the aspx file:

                        <ParentTableRelation>

                            <telerik:GridRelationFields

                                            DetailKeyField="IDPerek"

                                            MasterKeyField="IDPerek" />

                        </ParentTableRelation>

 

 

The problem we are facing is that in the details table it seems that we have paging that is not in relation to a level but to the entire data source – so in each level we have the same number of pages although the number of records is different.
In the example below (see file attached) you can see the problem – the number in brackets show the actual number of records in each level:

Note: the characters are in Hebrew and the grid is right to left aligned.

Any help will be appreciated,
Evgeny

Pavlina
Telerik team
 answered on 22 Jun 2010
1 answer
93 views
Hi,

We have a requirement where we want the sorting, Filtering to work on RadGrid when javascript is disabled to make it 508 compliant.

Any help is much appreciated.
Pavlina
Telerik team
 answered on 22 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
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?