Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
242 views
I have created a custom grid column, so that I can create my own filter control (a combo box).

This was working well, but at some point it stopped working.

After a day of debugging, I've honed in on the problem.

In my case, the field name is "CompanyName", and the user has set the filter value to be "Acme".

The function GridColumn.EvaluateFilterExpression is returning the string:

CompanyName = "Acme".ToUpper()


Obviously, I don't want to convert the string to upper case.

I've overridden the function "EvaluateFilterExpression" as so:

public override string EvaluateFilterExpression(GridFilteringItem filteringItem)
{
    System.Diagnostics.Debug.WriteLine(string.Format("--- GridHyperlinkColumnWithComboFilter.EvaluateFilterExpression({0})", filteringItem));
    var rv = base.EvaluateFilterExpression(filteringItem);
    System.Diagnostics.Debug.WriteLine(string.Format("--- GridHyperlinkColumnWithComboFilter.EvaluateFilterExpression({0}) returning \"{1}\"", filteringItem, rv));
    return rv;
}

And the debug output is:

--- GridHyperlinkColumnWithComboFilter.EvaluateFilterExpression(Telerik.Web.UI.GridFilteringItem)
--- GridHyperlinkColumnWithComboFilter.GetCurrentFilterValueFromControl - returning "Acme"
--- GridHyperlinkColumnWithComboFilter.EvaluateFilterExpression(Telerik.Web.UI.GridFilteringItem) returning "CompanyName = "Acme".ToUpper()"



I've scoured all of the properties of the grid and the column, but can't figure out why "ToUpper" is appearing in the filtering expression.

What would be causing the method "Telerik.Web.UI.GridColumn.EvaluateFilterExpression" to think I want to convert my filter value to upper case?




   
Andrew
Top achievements
Rank 1
Iron
Iron
 answered on 05 Mar 2012
6 answers
184 views
In the radgrid when i want to select the radiobuttonlist in edit mode by selecting the specific row it is not selecting.
Shinu
Top achievements
Rank 2
 answered on 05 Mar 2012
1 answer
85 views
Hi ALL,

I do have a RadGrid with AllowCustomPaging and a CheckBoxList populated on ItemDataBound when user edits a record. 

When user clicks on Update button, NeedDataSource and ItemDataBound events are firing again, so I lose that CheckBoxList selection.

Do you guys have any suggestions?

Thanks,
Shinu
Top achievements
Rank 2
 answered on 05 Mar 2012
1 answer
91 views
Hi Telerik Team,

I have hide\ make uneditable\ uncheckable the base parent node of RadTreeView DragnDrop.
If there is any way please suggest me.


Thanks in advance.
Robin
Princy
Top achievements
Rank 2
 answered on 05 Mar 2012
3 answers
67 views
Hello,

I still have a few problems with the grid:
- the GridBoundColumns column are display, but the only contain blank values while they should not.
- the GridButtonColumn is not showing at all.

<telerik:RadGrid ID="OrderDetail_RadGrid" runat="server" AllowFilteringByColumn="True" AllowSorting="True" CellSpacing="0"
GridLines="None" AutoGenerateColumns="False" DataSourceID="TemporaryOnlineOrdersLines_SqlDataSource">
    <ClientSettings AllowColumnsReorder="True">
        <Scrolling AllowScroll="True" UseStaticHeaders="True" />
    </ClientSettings>
    <MasterTableView AllowFilteringByColumn="True" AllowSorting="True" DataSourceID="TemporaryOnlineOrdersLines_SqlDataSource">
    <CommandItemSettings ExportToPdfText="Export to PDF"/>
    <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
        <HeaderStyle Width="20px"/>
    </RowIndicatorColumn>
    <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
        <HeaderStyle Width="20px"/>
    </ExpandCollapseColumn>
    <Columns>
        <telerik:GridBoundColumn DataField="p_Name" FilterControlAltText="Product"
            UniqueName="Product" HeaderText="Product"/>
        <%--<telerik:GridBoundColumn DataField="p_Description" FilterControlAltText="Description" UniqueName="p_Description" HeaderText="Description"/>--%>
        <telerik:GridNumericColumn DataField="tool_Quantity" DecimalDigits="2" FilterControlAltText="Quanity" HeaderText="Qantity"/>
        <telerik:GridBoundColumn DataField="unit_Name"  FilterControlAltText="Unit" UniqueName="unit_Name"  HeaderText="Unit"/>
        <telerik:GridButtonColumn FilterControlAltText="Filter column column" UniqueName="Remove"/>
    </Columns>
 
    <EditFormSettings>
        <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
    </EditFormSettings>
</MasterTableView>
 
<FilterMenu EnableImageSprites="false"/>
</telerik:RadGrid>
Shinu
Top achievements
Rank 2
 answered on 05 Mar 2012
1 answer
63 views
I have a wizard, Regular ASP.NET for a custom sign up process as the Membership version did not fit the bill. One of the last steps includes a process to register several contacts to associate with the primary account. I wrote a User Control with basic fields for gather Name, Address, City and regular drop down for the State which utilizes a RequiredFieldValidator. This user control utilizes the RadInputManager for controlling the validation.

Here is the User Control markup:
<asp:Panel ID="pnlClient" runat="server">
    <asp:TextBox ID="tbClientName" runat="server"></asp:TextBox>
    <span class="width500">
        <asp:TextBox ID="tbAddress1" runat="server"></asp:TextBox>
    </span>
    <br />
    <span class="width250">
        <asp:TextBox ID="tbAddress2" runat="server"></asp:TextBox>
    </span>
    <br />
    <span class="width250">
        <asp:TextBox ID="tbCity" runat="server"></asp:TextBox>
    </span>
    <br />
    <asp:DropDownList ID="ddlState" runat="server" DataSourceID="EntityDS_StateProvince"
        DataTextField="Name" DataValueField="Id" AppendDataBoundItems="true">
        <asp:ListItem Text="[Resident State]" Value="ZZ"></asp:ListItem>
    </asp:DropDownList>
    <asp:RequiredFieldValidator ID="rfvStateProvince" runat="server" EnableViewState="true" EnableClientScript="true"
        ControlToValidate="ddlState" Display="Static"
        Enabled="true" ErrorMessage="Valid State is required." InitialValue="ZZ" />
    <br />
    <span class="width125">
        <asp:TextBox ID="tbZip" runat="server"></asp:TextBox>
    </span><span class="width300">
        <asp:TextBox ID="tbLetterName" runat="server"></asp:TextBox>
    </span>
    <br />
    <span class="width500">
        <asp:TextBox ID="tbEmail" runat="server">
        </asp:TextBox></span>
    <telerik:RadInputManager ID="rimClient" runat="server">
        <telerik:TextBoxSetting BehaviorID="tbbClientName" EmptyMessage="Name" ErrorMessage="Name required."
            Validation-IsRequired="true">
            <TargetControls>
                <telerik:TargetInput ControlID="tbClientName" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:TextBoxSetting BehaviorID="tbbAddress1" EmptyMessage="Address 1" ErrorMessage="Address is required."
            Validation-IsRequired="true">
            <TargetControls>
                <telerik:TargetInput ControlID="tbAddress1" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:TextBoxSetting BehaviorID="tbbAddress2" EmptyMessage="Address 2" Validation-IsRequired="false">
            <TargetControls>
                <telerik:TargetInput ControlID="tbAddress2" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:TextBoxSetting BehaviorID="tbbCity" EmptyMessage="City" ErrorMessage="City is required"
            Validation-IsRequired="true">
            <TargetControls>
                <telerik:TargetInput ControlID="tbCity" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:TextBoxSetting BehaviorID="tbbZip" EmptyMessage="Zip" ErrorMessage="Zip is required"
            Validation-IsRequired="true">
            <TargetControls>
                <telerik:TargetInput ControlID="tbZip" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:TextBoxSetting BehaviorID="tbbContactName" EmptyMessage="Contact Client"
            ErrorMessage="Contact Client required" Validation-IsRequired="true">
            <TargetControls>
                <telerik:TargetInput ControlID="tbLetterName" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:RegExpTextBoxSetting BehaviorID="tbbEmail" EmptyMessage="Email" ValidationExpression="^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$"
            ErrorMessage="Invalid Email" Validation-IsRequired="true">
            <TargetControls>
                <telerik:TargetInput ControlID="tbEmail" />
            </TargetControls>
        </telerik:RegExpTextBoxSetting>
    </telerik:RadInputManager>
    <asp:EntityDataSource ID="EntityDS_State" runat="server" ConnectionString="name=LUEntities"
        DefaultContainerName="LUEntities" EnableFlattening="False" EntitySetName="StateProvinces"
        Where="s.ID != 'ZZ'">
    </asp:EntityDataSource>
</asp:Panel>


Step 1 of the wizard uses this control and works fine since only 1 instance of the user control is used. Validation occurs as it should.
Step 2 has an optional step to gather up a contact's beneficiary information. It is optional in the sense that some users choose to set it up later or can choose from a list of supplied Trust Attorneys. if they opt in then I enabled the User control and its subsequent validations. This works fine too.
Step 3 has an optional step to gather secondary beneficiaries information. This is where I am scratching my head. (See Markup)

Somewhere along the line one (or more) of these is failing/doing something unintentional. During Page Load I disable all of the radpanelitems featuring this User Control (ClientUC). I also parse the controls and disabled the RadInputManager as well as the RequiredFieldValidator within them.
<asp:WizardStep ID="Step_SecondBen" StepType="Step" Title="Secondary Beneficiaries">
    <telerik:RadAjaxPanel ID="rapBeneficiaries" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
        <telerik:RadButton ID="AddBen" runat="server" Text="Add" OnClick="AddBen_Click" AutoPostBack="true"
            CausesValidation="false">
        </telerik:RadButton>
        <telerik:RadPanelBar runat="server" ID="rpbBenList" ExpandMode="FullExpandedItem"
            OnItemClick="rpbBenList_ItemClick" Width="100%" Height="300px" CausesValidation="false">
            <Items>
                <telerik:RadPanelItem Text="Beneficiary 1" Expanded="true">
                    <Items>
                        <telerik:RadPanelItem>
                            <ItemTemplate>
                                <uc1:clientuc id="Beneficiary1" runat="server" />
                            </ItemTemplate>
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="Beneficiary 2">
                    <Items>
                        <telerik:RadPanelItem>
                            <ItemTemplate>
                                <uc1:clientuc id="Beneficiary2" runat="server" />
                            </ItemTemplate>
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="Beneficiary 3">
                    <Items>
                        <telerik:RadPanelItem>
                            <ItemTemplate>
                                <uc1:clientuc id="Beneficiary3" runat="server" />
                            </ItemTemplate>
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="Beneficiary 4">
                    <Items>
                        <telerik:RadPanelItem>
                            <ItemTemplate>
                                <uc1:clientuc id="Beneficiary4" runat="server" />
                            </ItemTemplate>
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="Beneficiary 4">
                    <Items>
                        <telerik:RadPanelItem>
                            <ItemTemplate>
                                <uc1:clientuc id="Beneficiary4" runat="server" />
                            </ItemTemplate>
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelBar>
    </telerik:RadAjaxPanel>
</asp:WizardStep>

The Result I get is that I am unable to navigate forward even if i add (basically enable the user control) 0 beneficiaries. The Next button does not postback. I have added to the user control client side "OnError" functions to the RadInputManager however all 5 RIMs never hit the event (not sure why). I need a method that will tell me which validator is locking up the postback and how to properly address it. I can however postback using the previous button.

What am I missing?
Johnathan
Top achievements
Rank 1
 answered on 05 Mar 2012
4 answers
213 views
Hi:
No question.  Just sharing a code snippet.  I decreased the size of the font...

Dim _fontSize As Single = RadChart1.ChartTitle.TextBlock.Appearance.TextProperties.Font.Size - 2.0F
RadChart1.ChartTitle.TextBlock.Appearance.TextProperties.Font =
    New System.Drawing.Font( _
        RadChart1.ChartTitle.TextBlock.Appearance.TextProperties.Font.Name, _
        _fontSize, _
        RadChart1.ChartTitle.TextBlock.Appearance.TextProperties.Font.Unit)

Phil
Joan
Top achievements
Rank 1
 answered on 04 Mar 2012
1 answer
73 views
I have textbox that directly has nothing to do with radgrid on the same page.
Textbox has this:
$('#" + filterControl.ClientID + @"').live('keydown', function(event) {
                                                if (event.keyCode && event.keyCode == '13') {
                                                    return jsApplyFilterAction" + ParameterSetHolder.Group + @"();
                                                }
                                                else {
                                                    return true;
                                                }
                                            });
jsApplyFilterAction**** - method, that calls webservice for filling the grid and making some other things.

For some strange reason when I press Enter being inside this textbox, after executing mentioned method, jsApplyFilterAction, that is ok,

_OnCommand grid event is fired! And command name there is 'Sort'!

As a result, I get unpredictable results and double call of webservice.

I tried to disable _OnCommand event firing with different grid properties, but vain.

How to get rid of this OnCommand triggering and why, after all, it's triggered?

UPDATE: it happens in Firefox, not in IE(9). Chrome is also ok.
Alexander
Top achievements
Rank 1
 answered on 03 Mar 2012
0 answers
103 views
Hello,

"The Map control failed to load, Your browser is not Supported."

I got this error in safari while using bingmap and telerik grid on same page, error resolved and can display map
properly if i remove telerik grid from the page.

Please help to resolve this issue in safari

Thank you,

Devang
Devang
Top achievements
Rank 1
 asked on 03 Mar 2012
4 answers
370 views
How to find a RadGrid EditFormSettings form template inside control names using javascript

i have tried like this but it not working :(

    var masterTable = $find("<%=rgResting.ClientID %>").get_masterTableView();
    var Groupcombo = masterTable.get_dataItems()[0].findControl('ddlGroup');

In above code rgResting is my grid name and ddlGroup is my rad combobox name which i have added in my form template.


Thanks
Madhan
Madhan
Top achievements
Rank 1
 answered on 03 Mar 2012
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?