Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
180 views
I'm trying to figure out how to implement a filter on a template column that has multiple checkbox values.  

Scenario
The data source that I'm using for my grid control is an ObjectDataSource that is returning a list of business account objects.  This particular column represents a List<> of cost categories objects (contains a name field and boolean isUsed property) that the business account can be used for.  The customer wants all available cost categories displayed as check boxes with the ones associated to the current business account to be checked.  They want to be able to filter this column by selecting one cost category names from a drop down and it to filter the rows to only those that have that cost category checked.

The code below is from the current page (I removed industry specific terms for the sake of clarity). The selected cost categories are being correctly checked during the ItemDataBound and the filter template is being displayed correctly.  However, when I select a value I'm getting the error message following the code.

Code
<telerik:GridTemplateColumn FilterControlAltText="Filter AccountCostCategory column"
    HeaderText="Cost Category" UniqueName="AccountCostCategory">
    <ItemTemplate>
        <asp:CheckBox ID="chkAccountCostCategory_CC1" runat="server" Text="Cost Category 1" />
        <asp:CheckBox ID="chkAccountCostCategory_CC2" runat="server" Text="Cost Category 2" />
        <asp:CheckBox ID="chkAccountCostCategory_CC3" runat="server" Text="Cost Category 3" />
        <asp:CheckBox ID="chkAccountCostCategory_CC4" runat="server" Text="Cost Category 4" />
    </ItemTemplate>
    <FilterTemplate>
        <telerik:RadComboBox ID="ddlAccountCostCategoryFilter" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("AccountCostCategory").CurrentFilterValue %>'
            runat="server" OnClientSelectedIndexChanged="AccountCostCategoryFilterChanged">
            <Items>
                <telerik:RadComboBoxItem Text="All" />
                <telerik:RadComboBoxItem Text="Cost Category 1" Value="CC1" />
                <telerik:RadComboBoxItem Text="Cost Category 2" Value="CC2" />
                <telerik:RadComboBoxItem Text="Cost Category 3" Value="CC3" />
                <telerik:RadComboBoxItem Text="Cost Category 4" Value="CC4" />
            </Items>
        </telerik:RadComboBox>
        <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
            <script type="text/javascript">
                function AccountCostCategoryFilterChanged(sender, args) {
                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                    tableView.filter("AccountCostCategory", args.get_item().get_value(), Telerik.Web.UI.GridFilterFunction.EqualTo);
                }
            </script>
        </telerik:RadScriptBlock>
    </FilterTemplate>
    <ItemStyle Width="120px" BackColor="#FDE9D9" />
</telerik:GridTemplateColumn>

Error Message
Expression expected
 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
 
Exception Details: Telerik.Web.UI.ParseException: Expression expected
 
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 
 
Stack Trace:
[ParseException: Expression expected]
   Telerik.Web.UI.ExpressionParser.ParsePrimaryStart() +184
   Telerik.Web.UI.ExpressionParser.ParsePrimary() +17
   Telerik.Web.UI.ExpressionParser.ParseUnary() +115
   Telerik.Web.UI.ExpressionParser.ParseMultiplicative() +55
   Telerik.Web.UI.ExpressionParser.ParseAdditive() +60
   Telerik.Web.UI.ExpressionParser.ParseComparison() +55
   Telerik.Web.UI.ExpressionParser.ParseLogicalAnd() +55
   Telerik.Web.UI.ExpressionParser.ParseLogicalOr() +55
   Telerik.Web.UI.ExpressionParser.ParseExpression() +28
   Telerik.Web.UI.ExpressionParser.ParseArguments() +56
   Telerik.Web.UI.ExpressionParser.ParseIif() +94
   Telerik.Web.UI.ExpressionParser.ParseIdentifier() +221
   Telerik.Web.UI.ExpressionParser.ParsePrimary() +17
   Telerik.Web.UI.ExpressionParser.ParseUnary() +115
   Telerik.Web.UI.ExpressionParser.ParseMultiplicative() +55
   Telerik.Web.UI.ExpressionParser.ParseAdditive() +60
   Telerik.Web.UI.ExpressionParser.ParseComparison() +55
   Telerik.Web.UI.ExpressionParser.ParseLogicalAnd() +55
   Telerik.Web.UI.ExpressionParser.ParseLogicalOr() +55
   Telerik.Web.UI.ExpressionParser.ParseExpression() +28
   Telerik.Web.UI.ExpressionParser.ParseParenExpression() +52
   Telerik.Web.UI.ExpressionParser.ParsePrimary() +17
   Telerik.Web.UI.ExpressionParser.ParseUnary() +115
   Telerik.Web.UI.ExpressionParser.ParseMultiplicative() +55
   Telerik.Web.UI.ExpressionParser.ParseAdditive() +60
   Telerik.Web.UI.ExpressionParser.ParseComparison() +55
   Telerik.Web.UI.ExpressionParser.ParseLogicalAnd() +55
   Telerik.Web.UI.ExpressionParser.ParseLogicalOr() +55
   Telerik.Web.UI.ExpressionParser.ParseExpression() +28
   Telerik.Web.UI.ExpressionParser.Parse(Type resultType) +31
   Telerik.Web.UI.GridDynamicQueryable.Where(IQueryable source, String predicate, Object[] values) +172
   Telerik.Web.UI.GridDataTableFromEnumerable.FillData35() +2148
   Telerik.Web.UI.GridDataTableFromEnumerable.FillData() +855
   Telerik.Web.UI.GridResolveEnumerable.EnsureInitialized() +29
   Telerik.Web.UI.GridEnumerableFromDataView..ctor(GridTableView owner, IEnumerable enumerable, Boolean CaseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields, Boolean enableSplitHeaderText) +265
   Telerik.Web.UI.GridDataSourceHelper.CreateGridEnumerable(GridTableView owner, IEnumerable enumerable, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields, Boolean enableSplitHeaderText) +225
   Telerik.Web.UI.GridTableView.get_ResolvedDataSource() +411
   Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +392
   Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +858
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +94
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +182
   Telerik.Web.UI.GridTableView.PerformSelect() +206
   Telerik.Web.UI.GridTableView.DataBind() +432
   Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e) +159
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +52
   Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +50
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +52
   Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +102
   Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument) +7403
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3707


Can someone point me in the right direction?

Thanks,
Kyle
Kyle
Top achievements
Rank 1
 answered on 30 Dec 2011
1 answer
68 views
Hello!

Sure - I can define my own xpath, datavalues etc..but there must be a DEFAULT xml schema setup for this control?

Please..someone tell me where I can get the FULL xml schema definition for RadMenu.
This demo is pathetic - sorry...but it is.

http://demos.telerik.com/aspnet-ajax/menu/examples/programming/xmldefinition/defaultcs.aspx

It states you can use the RadMenu.GetXml() method - but that method does NOT output all of the menu attributes as I'd expect..like url, flow, enabled..

Thanks!


Richard
Top achievements
Rank 1
 answered on 30 Dec 2011
1 answer
55 views
The sitemap control has a font property which can be bolded, but what if I want only certain entries bolded, or even the font color changed.  Can that be done?
Richard
Top achievements
Rank 1
 answered on 30 Dec 2011
1 answer
104 views
Hi,
I design a file upload function,use below this AsyncUpload,RadProgressArea,RadProgressManager in RadAjaxPanel.
When I click one button in RadAjaxPanel, After the page postback, and all of the session value in page will lost.
why? what is the resolution for this?

Thanks All.
Richard
Top achievements
Rank 1
 answered on 30 Dec 2011
3 answers
80 views
Hi,

i have two Template columns in a RadGrid, a RadDatePicker control in one and a RadCombobox in the other.
when user changes the date i need to call  Business Layer method and populate the radcombobox from clientside.

can any one please help me.

Thank you 
Jay
Top achievements
Rank 1
 answered on 30 Dec 2011
3 answers
125 views
I have a situation where we want to use a search method that is already in place for post backs on certain pages, however, they want to use the same method but use it for onkeypress to search while the user is entering to return matches, etc.  obviously the onkeypress is client-side and my method is in a class which I can call from the code behind which is server side. Suggestions on this?
Jeff
Top achievements
Rank 1
 answered on 30 Dec 2011
1 answer
50 views
For some reason IE is not rendering the 'RepeatColumns' Correctly.  My sitemap has 4 groups so I have the RepeatColumns set to 4 like so:
<telerik:RadSiteMap ID="RadSiteMap1" runat="server"
                    DataNavigateUrlField="Title" DataSourceID="RadSiteMapDataSource1"
                    DataTextField="Title" DataValueField="Description" Font-Names="Arial"
                    Font-Size="8pt" ShowNodeLines="True" Skin="Windows7">
                    <LevelSettings>
                        <telerik:SiteMapLevelSetting MaximumNodes="5">
                            <ListLayout AlignRows="True" RepeatColumns="4" />
                        </telerik:SiteMapLevelSetting>
                    </LevelSettings>
                </telerik:RadSiteMap>

However in IE only 3 columns show up and the 4th is on the next line.  Firefox, Chrome, and Safari all render this correctly.

If I set the columns to 5 instead of 4 it works correctly, but then the spacing is wrong because it is compensating for an additional column. 

Any ideas?
Ivan Zhekov
Telerik team
 answered on 30 Dec 2011
1 answer
114 views
I would like to offer users the ability to select from a list of videos, and upon clicking, show that video in a preview window.  Ideally, this would be docked, and would open for the video and then close once the video was completed.  Is this possible?  Are there any demos?
Slav
Telerik team
 answered on 30 Dec 2011
2 answers
226 views
Spell Check Handler Server Error:500
<html>
  
    <head>
  
        <title>No dictionary loaded. Set the DictionaryPath property from the spell checker settings or copy the dictionaries to ~/App_Data/RadSpell/</title>
  
        <style>
  
         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
  
         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
  
         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
  
         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
  
         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
  
         pre {font-family:"Lucida Console";font-size: .9em}
  
         .marker {font-weight: bold; color: black;text-decoration: none;}
  
         .version {color: gray;}
  
         .error {margin-bottom: 10px;}
  
         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
  
        </style>
  
    </head>
  
  
  
    <body bgcolor="white">
  
  
  
            <span><H1>Server Error in '/cpe' Application.<hr width=100% size=1 color=silver></H1>
  
  
  
            <h2> <i>No dictionary loaded. Set the DictionaryPath property from the spell checker settings or copy the dictionaries to ~/App_Data/RadSpell/</i> </h2></span>
  
  
  
            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">
  
  
  
            <b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
  
  
  
            <br><br>
  
  
  
            <b> Exception Details: </b>System.ArgumentException: No dictionary loaded. Set the DictionaryPath property from the spell checker settings or copy the dictionaries to ~/App_Data/RadSpell/<br><br>
  
  
  
            <b>Source Error:</b> <br><br>
  
  
  
            <table width=100% bgcolor="#ffffcc">
  
               <tr>
  
                  <td>
  
                      <code>
  
  
  
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>
  
  
  
                  </td>
  
               </tr>
  
            </table>
  
  
  
            <br>
  
  
  
            <b>Stack Trace:</b> <br><br>
  
  
  
            <table width=100% bgcolor="#ffffcc">
  
               <tr>
  
                  <td>
  
                      <code><pre>
  
  
  
[ArgumentException: No dictionary loaded. Set the DictionaryPath property from the spell checker settings or copy the dictionaries to ~/App_Data/RadSpell/]
  
   Telerik.Web.UI.Dictionaries.EditDistanceDictionary.Load(TextReader baseDictionaryReader, ICustomDictionarySource customSource, String cacheKey) +154
  
   Telerik.Web.UI.SpellChecker.LoadDictionary() +290
  
   Telerik.Web.UI.SpellChecker.get_dictionary() +18
  
   Telerik.Web.UI.SpellChecker.CheckWord(String word, String sLastWord) +162
  
   Telerik.Web.UI.TelerikSpellCheckProvider.CheckWord(ITextWord current, ITextWord previous) +64
  
   Telerik.Web.UI.SpellChecker.CheckText() +171
  
   Telerik.Web.UI.SpellChecker.BadWordsJScript() +13
  
   Telerik.Web.UI.SpellCheckHandler.ProcessSpellCheckRequest(HttpResponse response, SpellChecker checker, String text) +74
  
   Telerik.Web.UI.SpellCheckHandler.ProcessRequest(HttpContext context) +487
  
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
  
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
  
</pre></code>
  
  
  
                  </td>
  
               </tr>
  
            </table>
  
  
  
            <br>
  
  
  
            <hr width=100% size=1 color=silver>
  
  
  
            <b>Version Information:</b> Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053
  
  
  
            </font>
  
  
  
    </body>
  
</html>
  
<!--
  
[ArgumentException]: No dictionary loaded. Set the DictionaryPath property from the spell checker settings or copy the dictionaries to ~/App_Data/RadSpell/
  
   at Telerik.Web.UI.Dictionaries.EditDistanceDictionary.Load(TextReader baseDictionaryReader, ICustomDictionarySource customSource, String cacheKey)
  
   at Telerik.Web.UI.SpellChecker.LoadDictionary()
  
   at Telerik.Web.UI.SpellChecker.get_dictionary()
  
   at Telerik.Web.UI.SpellChecker.CheckWord(String word, String sLastWord)
  
   at Telerik.Web.UI.TelerikSpellCheckProvider.CheckWord(ITextWord current, ITextWord previous)
  
   at Telerik.Web.UI.SpellChecker.CheckText()
  
   at Telerik.Web.UI.SpellChecker.BadWordsJScript()
  
   at Telerik.Web.UI.SpellCheckHandler.ProcessSpellCheckRequest(HttpResponse response, SpellChecker checker, String text)
  
   at Telerik.Web.UI.SpellCheckHandler.ProcessRequest(HttpContext context)
  
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
  
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
  
-->
when i test the RadSpell this error occures how could i solve this problem please help me.
Thank you.
Please Reply
Chandra
Top achievements
Rank 1
 answered on 30 Dec 2011
1 answer
95 views
Hello,

I have created one page which have Treeview and other controls. Child node data populating using web-service method.

 <ajaxToolkit:ToolkitScriptManager runat="server" ID="RadScriptManager1" AsyncPostBackTimeout="18000">
</ajaxToolkit:ToolkitScriptManager>
<telerik:RadScriptBlock>
<script>
 var allowDragDrop = "<%= allowDragAndDrop%>";
            var SelectedType;
            function nodePopulating(sender, eventArgs) {
                var node = eventArgs.get_node();
                var context = eventArgs.get_context();
                SelectedType = document.getElementById('<%=hdnSelectedNodeType.ClientID %>').value;
                context["ParentID"] = node.get_value();
                context["AllowDragAndDrop"] = allowDragDrop;
                context["SelectedType"] = SelectedType;
            }
        </script>
</telerik:RadScriptBlock>

Treeview is located in one Update panel and Other controls are located in Second Update panel like below.
<div ID="Left">
  <asp:UpdatePanel ID="upLeft" runat="server" UpdateMode="Conditional">
       <ContentTemplate>
             <telerik:RadTreeView ID="tvNodes" runat="server" EnableDragAndDrop="false" ExpandAnimation-Type="OutExpo"
                                        ExpandAnimation-Duration="800" EnableDragAndDropBetweenNodes="false"
                                        CollapseAnimation-Type="OutElastic"
                                        CollapseAnimation-Duration="800" Skin="Windows7" OnNodeDrop="tvNodes_HandleDrop"
                                        OnNodeExpand="tvNodes_NodeExpand" OnNodeClick="tvNodes_Click"
                                        OnContextMenuItemClick="tvNodes_ContextMenuItemClick"
                                        OnClientContextMenuItemClicking="onClientContextMenuItemClicking"
                                        OnClientContextMenuShowing="onClientContextMenuShowing"
                                        OnClientNodeDropping="onNodeDropping"
                                        OnClientNodeDragging="OnClientNodeDragging"
                                        OnClientNodeClicked="OnClientNodeClicked"
                                        OnClientNodeClicking="OnClientNodeClicking"
                                        OnClientNodePopulating="nodePopulating">
                                        <ContextMenus>
                                            <telerik:RadTreeViewContextMenu ID="NodesTreeMenu" runat="server" CssClass="MenuGroup"
                                                Skin="Windows7">
                                                <CollapseAnimation Type="none" />
                                            </telerik:RadTreeViewContextMenu>
                                        </ContextMenus>
                                        <WebServiceSettings Path="../ManageNode.asmx" Method="GetNodes"></WebServiceSettings>
                                    </telerik:RadTreeView>
    </ContentTemplate>
   </asp:UpdatePanel>
</div>
<div id="right">
     <asp:UpdatePanel ID="upright" runat="server" UpdateMode="Conditional">
         <ContentTemplate>
           <asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Text="Save" ValidationGroup="surveyValidate" />
            .......................... <!-- Other Controls -->
         </ContentTemplate>
       </asp:UpdatePanel>
</div>

When I clicked on node then I have loaded selected node-data into the right side controls which is in upRight update panel, when I perform click "btnSave" then we are updating node information and then call upleft.Update() to update treeview node,
after that If I want to populate child nodes for selected node then it will gives error like eventArgs.get_context() is null.

if upleft.Update()  is commented then perform above operation then the error is not occurred. But I have to update the Treeview information as well.

Please help me out why this error is occurred.

Thanks,
Mohmedsadiq Modan
Helen
Telerik team
 answered on 30 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?