Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
313 views
RadGrid's filter button property 'CurrentFilterFunction'  showing previous selected value

I am have gone through the below steps and facing some issues :

(1) Page load first time -> CurrentFilterFunction shows 'NoFilter' -> works fine
(2) Enter text in TextBox -> Press tab -> CurrentFilterFunction shows 'Contains'-> works fine
(3) Enter text in TextBox-> press filter button -> select 'DoesNotContains' from drop down list -> CurrentFilterFunction shows 'Contains'(wrong value, it should shows
                                                                                                                                                                                                                                                  'DoesNotContains' )
(4) Enter text in TextBox -> press filter button -> select 'StartsWith' from drop down list -> CurrentFilterFunction shows 'DoesNotContains'(wrong value, , it should
                                                                                                                                                                                                                                             shows 'StartsWith')

can anyone please tell me the reason of this behavior and what is the solution of it. 

below is the code snippet :

<telerik:RadGrid ID="gvParameterLookup" runat="server" AllowSorting="true" CellSpacing="0"
                    CellPadding="2" GridLines="none" HeaderStyle-CssClass="dnnGridHeader" AllowFilteringByColumn="true"
                    AutoGenerateColumns="false" AllowAutomaticUpdates="false" AllowPaging="false"
                    EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins="false" >
                    <groupingsettings casesensitive="false" />
                    <mastertableview allowfilteringbycolumn="true" allowpaging="false">                          
                    <Columns>                    
                        
                        <telerik:GridTemplateColumn DataField="Subsystem" SortExpression="Subsystem" CurrentFilterFunction="Contains" 
  UniqueName="Subsystem"  AutoPostBackOnFilter="True" HeaderText="Subsystem">
                            <HeaderStyle Font-Bold="true" />
                            <HeaderTemplate>Subsystem</HeaderTemplate>
                            <ItemTemplate><%# Eval("Subsystem")%></ItemTemplate>
                        </telerik:GridTemplateColumn>

                            </Columns>
                    </mastertableview>
                    <clientsettings enablepostbackonrowclick="false" />
                </telerik:RadGrid>
amit
Top achievements
Rank 1
 answered on 31 Oct 2014
0 answers
130 views
I have a textbox in a template column. I can't get the value using the same technique as for a bound column. What is the syntax for retrieving this value both in client-side JavaScript and server-side C#?

I would like to sum the values for all the textboxes in the column in codebehind TextChanged and also sum them clientside with Javascript.


....
 <telerik:GridTemplateColumn HeaderText="Amount Approved" UniqueName="AmtApproved" HeaderStyle-Width="55px"
                            ItemStyle-Width="55px" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right">
                            <ItemTemplate>
                                <asp:TextBox ID="AmountApproved" runat="server" Width="55px" OnTextChanged="AmountApproved_TextChanged"
                                    AutoPostBack="true" CssClass="numericAlign"></asp:TextBox>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right">
                        </telerik:GridClientSelectColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings AllowKeyboardNavigation="true" EnableRowHoverStyle="true" EnablePostBackOnRowClick="true">
                    <ClientEvents OnRowSelected="handleTextBoxValue" OnRowDeselected="handleTextBoxValue" OnActiveRowChanged="sumAmtApproved" />
                    <Selecting AllowRowSelect="true" />
                </ClientSettings>
            </telerik:RadGrid>
Thomas Derenthal
Top achievements
Rank 1
 asked on 31 Oct 2014
1 answer
134 views
I've been trying to make the RadEditor DocumentManger control work with a UNC path. Admin on the forum gave me this link but it's only for the <Telerik:RadFileExplorer> control.

How do I override the file provider for <telerik:RadEditor><telerik:EditorTool name="DocumentManager">
Andrew
Top achievements
Rank 1
 answered on 30 Oct 2014
2 answers
236 views
Can anyone explain why I get the following error?

System.Web.HttpParseException (0x80004005): Type 'Telerik.Web.UI.Calendar.DatePickerClientEvents' does not have a public property named 'OnLoad'. ---> System.Web.HttpException (0x80004005): Type 'Telerik.Web.UI.Calendar.DatePickerClientEvents' does not have a public property named 'OnLoad'.

The Telerik documentation on this page http://www.telerik.com/help/aspnet-ajax/input-client-side-onload.html states the following:
  The OnLoad event is supported by all RadInput controls.

Here's my markup:
<telerik:RadDateTimePicker
      ID="m_dpTargetDate"
      runat="server">
         <ClientEvents OnLoad="m_dpEventBegin_Load" />
</telerik:RadDateTimePicker>

<script type="text/javascript">
var m_dpEventBegin = null;
function m_dpEventBegin_Load(sender, args) {
      m_dpEventBegin = sender;
}
</script>

I can get other client-side events to fire.

Any help would be greatly appreciated.
Kennon McCaa
Top achievements
Rank 1
 answered on 30 Oct 2014
1 answer
517 views
Dear Support,

I am getting above error when radmenu is getting its datasource dynamically. please check the below code.

Create PROCEDURE [dbo].[HGetSubMenu]
(
@categoryid int
)
AS
begin
DECLARE @level int
  
    /* Creating temporary table for tree storage*/
    CREATE TABLE #temp_tree
    (
        level int,
        id int NOT NULL PRIMARY KEY,
        ptr int,
        f1 char(20)
    )
  
    INSERT #temp_tree (level, id, ptr, f1)
    SELECT 0, categoryid, parentid, categoryname FROM HCategroyNew WHERE categoryid = @categoryid
    SELECT @level = 0
  
    WHILE 1 = 1
    BEGIN
        INSERT #temp_tree (level, id, ptr, f1)
        SELECT
            @level + 1, HCategroyNew.categoryid, HCategroyNew.parentid, HCategroyNew.categoryname  
        FROM
            HCategroyNew, #temp_tree tt
        WHERE
                HCategroyNew.parentid = tt.id
            AND tt.level = @level
  
        IF @@rowcount = 0 BREAK
         
        SELECT @level = @level + 1
    END
  
    SELECT id, ptr, f1,level
    FROM #temp_tree
    DROP TABLE #temp_Tree
end

Dataset Table Structure
id  ptr f1                     level
3   1   Bedrooms                0
13  3   Classical               1
14  3   Modern                  1
15  3   Contemporary            1
16  3   Transitional            1
17  3   Arte Deco               1

Radmenu Binding.
RadMenu1.DataSource = ds.Tables[0];
             
            RadMenu1.Flow = ItemFlow.Horizontal;
            RadMenu1.DataTextField = "f1";
            RadMenu1.DataFieldID = "ptr";
            RadMenu1.DataValueField = "id";
            RadMenu1.DataFieldParentID = "level";
            RadMenu1.DataBind();

Please help me urgent.

Thanks
Rizwan
Hristo Valyavicharski
Telerik team
 answered on 30 Oct 2014
1 answer
239 views
Sometimes my Elmah logs shows(note there is no namespace of my application code),

System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Web.UI.AsyncPostBackTrigger.HasTriggered()
   at System.Web.UI.UpdatePanelTriggerCollection.HasTriggered()
   at System.Web.UI.PageRequestManager.ProcessUpdatePanels()
   at System.Web.UI.PageRequestManager.RenderPageCallback(HtmlTextWriter writer, Control pageControl)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Page.Render(HtmlTextWriter writer)
   at Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Page.Render(HtmlTextWriter writer)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Maria Ilieva
Telerik team
 answered on 30 Oct 2014
0 answers
136 views
Hi, 

I have a grid, where i had done a grouping with InvoiceNumber, and also i need to sum a particular column. Everything was fine, but now i want sum the column based on some condition. (i.e) i have column called "Cancelled".   need to sum the column where Cancelled > 5. How can i achieve this? 


Velkumar
Top achievements
Rank 1
 asked on 30 Oct 2014
1 answer
291 views
Is it possible to trigger the notification show() on the call back update function? Especially when the notification was created dynamically.

RadNotification notification = new RadNotification();
notification.LoadContentOn = Telerik.Web.UI.NotificationLoad.TimeInterval;  
notification.UpdateInterval = 20000;
notification.CallbackUpdate +=_notification_CallbackUpdateOnTime;
 
 
        protected void _notification_CallbackUpdateOnTime(object sender, RadNotificationEventArgs e)
        {
             if( <some condition>)
             {
                ((Telerik.Web.UI.RadNotification)(sender)).Show();
             }
        }


Marin Bratanov
Telerik team
 answered on 30 Oct 2014
5 answers
214 views
Just curious if anyone has figured a way to dynamically resize the Gannt chart on the client side. I've tried resizing the entire div container but it looks like I'd have to do every container inside the main div. Is there an easier way?
Sam
Top achievements
Rank 1
 answered on 30 Oct 2014
3 answers
302 views
Hello,

     I am hoping that someone can help with a requirement I'm trying to accomplish.  What I am trying to accomplish is when a new record is added I am wanting to hide the label and entry textbox based on the value of a dropdown.  I have been able to successfully hide the textbox but I can't find a way to hide the label.  From browsing the net and reading other forums I used the EditFormHeaderTextFormat property to set to empty and it does hide the label, but the issue now is setting the value in the code behind in the selectedindexchanged event back to a value.  I have included sample code for what I have below.  If anyone knows an alternate solution that would work please let me know.

Aspx
<telerik:GridTemplateColumn EditFormHeaderTextFormat="" DataField="CHIPReasonOther" DataType="System.String" FilterControlAltText="Filter Reason column" HeaderText="Define Other" SortExpression="ReasonOther" UniqueName="CHIPReasonOther">
                        <EditItemTemplate>
                            <telerik:RadTextBox ID="txtCHIPReasonOther" runat="server" Width="275px" MaxLength="50" Visible="false"></telerik:RadTextBox>
                            <asp:RequiredFieldValidator ID="rqdReasonOther" ControlToValidate="txtCHIPReasonOther" runat="server" ErrorMessage="Required" CssClass="validation" Enabled="false" Display="Dynamic"></asp:RequiredFieldValidator>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lblCHIPReasonOther" runat="server" Text='<%# Bind("CHIPReasonOther") %>' Enabled="True" Visible="true" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>

Code behind
protected void rcbTempOOH_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
        {
            RadComboBox rcbSender = (RadComboBox)o;
            GridEditFormItem item = rcbSender.NamingContainer as GridEditFormItem;
            RadTextBox txtCHIPReasonOther = item.FindControl("txtCHIPReasonOther") as RadTextBox;
            RequiredFieldValidator rqdReasonOther = item.FindControl("rqdReasonOther") as RequiredFieldValidator;
            var selectedItem = e.Text;
            selectedItem = Regex.Replace(selectedItem, @"\s+", "");
            txtCHIPReasonOther.Text = string.Empty;
 
            if (selectedItem == "Other")
            {
                txtCHIPReasonOther.Visible = true;
                rqdReasonOther.Enabled = true;
            }
            else
            {
                txtCHIPReasonOther.Visible = false;
                rqdReasonOther.Enabled = false;
            }
        }

Eyup
Telerik team
 answered on 30 Oct 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?