Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
76 views
Hello,

I am rather new to this, so if this is not the right place for this question, please let me know where and how I should proceed.
I have a problem since the last upgrade (v2013.1.403.40).
I have the following:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>
<%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <script>
        function someCallback(panelId) {
            var panel = $find(panelId);
            if (panel) {
                panel.set_value('');
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <telerik:RadDatePicker ID="RadDatePicker1" runat="server" OnSelectedDateChanged="datechanged"
            AutoPostBack="true" EnableViewState="true" >
        </telerik:RadDatePicker>
        <telerik:RadXmlHttpPanel ID="rxhp" runat="server" Value="" OnServiceRequest="serviceRequest"
            RenderMode="Block" EnableClientScriptEvaluation="true" Width="100%">
            <br />
            <input runat="server" id="test_input" type="text" />
        </telerik:RadXmlHttpPanel>
    </div>
    </form>
</body>
</html>

with this code:

using System;
using Telerik.Web.UI;
using Telerik.Web.UI.Calendar;
 
public partial class Default3 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        this.test_input.Attributes.Add("onclick", string.Format("someCallback('{0}');", this.rxhp.ClientID));
        if (!IsPostBack)
        {
            RadDatePicker1.SelectedDate = DateTime.Now;
        }
    }
    protected void datechanged(object sender, SelectedDateChangedEventArgs e)
    {  
    }
    protected void serviceRequest(object sender, RadXmlHttpPanelEventArgs e)
    {  
    }
}

My problem is that whenever the service request is made (in this case onclick on the input) also the SelectedDateChanged event of the date picker is raised and the selected date is null.
Can you possibly tell me what can cause this or how to fix this?
Vasil
Telerik team
 answered on 17 Apr 2013
2 answers
143 views
I'm not seeing functional support for IE10 drag-and-drop in 2013.1.  Specifically, the following test returns FALSE in IE10:

Telerik.Web.UI.RadAsyncUpload.Modules.FileApi.isAvailable()

Am I doing something wrong, or should I not expect this to work in IE10?
David
Top achievements
Rank 1
 answered on 17 Apr 2013
1 answer
110 views
I have an issue where I have a radcombobox on a web user control inside a radgrid. The radgrid is inside a radmultipage. I am using a radajaxpanel as well. I noticed that the selectedindexchanged event of the combobox is not triggering. Furthermore, once I move the radgrid outside of the multipage, it is working fine. Is this a bug? I do need to use a multipage so is there a way for me to get this to work? See code snippets below.

Thanks!

ASPX:


    <telerik:RadAjaxPanel ID="rpnlTest" runat="server" Width="100%">
        <telerik:RadTabStrip ID="rtabRegistration" runat="server" Skin="Windows7" MultiPageID="rmpTest">
            <Tabs>
                <telerik:RadTab Text="Step 1" PageViewID="rpvStep1" Value="Step1">
                </telerik:RadTab>
                <telerik:RadTab Text="Step 2" PageViewID="rpvStep2" Value="Step2">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
        <telerik:RadMultiPage ID="rmpTest" runat="server">
            <telerik:RadPageView ID="rpvStep1" runat="server" TabIndex="0" Selected="true" >
<asp:Panel ID="pnlTest" runat="server" Visible="false">
<telerik:RadGrid ID="rgrdTest" runat="server" AutoGenerateColumns="false">
                                <MasterTableView AutoGenerateColumns="false" CommandItemDisplay="Top">
                                    <Columns>
....
                                    </Columns>
    <EditFormSettings EditFormType="WebUserControl" UserControlName="test.ascx">
                                        <EditColumn UniqueName="EditCommandColumn1">
                                        </EditColumn>
                                        <PopUpSettings Modal="true" Width="800px" />
                                    </EditFormSettings>
                </asp:Panel>
            </telerik:RadPageView>

ASCX source:


            <telerik:RadComboBox ID="rcbTypeBusActivity" runat="server" AutoPostBack="True" MarkFirstMatch="true" 
                OnSelectedIndexChanged="rcbTypeBusActivity_SelectedIndexChanged" >
                <Items>
                    <telerik:RadComboBoxItem Text="Individual" Value="Individual" />
                    <telerik:RadComboBoxItem Text="Business Entity" Value="Business Entity" />
                    <telerik:RadComboBoxItem Text="Industry" Value="Industry" />
                    <telerik:RadComboBoxItem Text="Other" Value="Other" />
                </Items>
            </telerik:RadComboBox>

ASCX code:

    protected void rcbTypeBusActivity_SelectedIndexChanged1(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
    {
        pnlIndividual.Visible = false;
        pnlIndustry.Visible = false;
        pnlOther.Visible = false;
        if (e.Value == "Individual" || e.Value == "Business Entity")
            pnlIndividual.Visible = true;
        else if (e.Value == "Industry")
            pnlIndustry.Visible = true;
        else
            pnlOther.Visible = true;
    }
Maria Ilieva
Telerik team
 answered on 17 Apr 2013
1 answer
181 views
Hi.
I have the problem that the RadCombobox with Autocomplete has some strange behaviours. The dropdown is shown correctly when it is displayed below the input field but if there is not enough space and it jumps above the input field, I have the following problem which is shown in the attached picture. I know that the picture looks a bit strange but you can see that after some value was entered the dropdown is pinned to the top (which is not the right place!).
Is that a bug or did I something wrong in my code?
Thanks for your help.

All the best,
Jochen

Jochen
Top achievements
Rank 1
 answered on 17 Apr 2013
7 answers
150 views
Hi,

I have a paged RadGrid databound to a view. I catched the event ItemDataBound, and I translate fields in this method.

My filter works well, but with the non-translated label. How can I do to use the translation in my filter? I want to filter after databinding. Do I need to filter client side or can I do it server-side ?

Thanks in advance
Marin
Telerik team
 answered on 17 Apr 2013
25 answers
726 views
All comboboxes in my project result in above JScript exception with VS2010 final and RadControls_for_ASP.NET_AJAX_2010_1_415_dev.msi installed. The exception happens when I select a value and the combobox makes a ajax postback to the server for updating other fields at the same form.

Got any clues about what is happening ?

VS2010 points to this JScript function as beeing the bad guy:
_removeDropDown:function(){
var _3c=this.get_dropDownElement().parentNode;
_3c.parentNode.removeChild(_3c);
if(this._disposeChildElements&&typeof (Sys.WebForms)!="undefined"){
Sys.WebForms.PageRequestManager.getInstance()._destroyTree(_3c);
}

I have upgraded this project from VS2005 and RadControls_for_ASP.NET_AJAX_2009_2_826_dev.msi



Radoslav
Telerik team
 answered on 17 Apr 2013
2 answers
221 views
I'm working with a RadGrid that is databound on the Client Side through a Web Method.  I'm trying to get the Enter Key to fire the Filter command but without a postback. I have managed to hook the onkeypress event for the rgFilterBox class inputs. Is there a way that I can then trigger a Filter Command so that the OnCommand even is fired with the FilterExpression argument?

Thanks

Steve
Jayesh Goyani
Top achievements
Rank 2
 answered on 17 Apr 2013
1 answer
263 views
I have a RadButton on a user control.   When I run the site in the debugger, and click the button, it doesn't even cause a postback, because the Page_Init event doesn't fire.    I have even set AutoPostBack="true" and CausesValidation="false" to bypass those possible explanations.

Here is my Radbutton code:

 

 

<telerik:RadButton ID="ReturnButton" runat="server" Text="Return To Test" OnClick="ReturnButton_Click"

 CausesValidation="false" Skin="Telerik" CssClass="rbClearButton" Width="175px" AutoPostBack="true" >  

<Icon PrimaryIconCssClass="rbPrevious" PrimaryIconLeft="4" PrimaryIconTop="4"/> 
 </telerik:RadButton>

When I view source, here is is the HTML that is generated:

<a id="TestModuleDetails_ReturnButton" class="RadButton RadButton_Telerik rbSkinnedButton rbClearButton" href="javascript:void(0)" style="display:inline-block;width:175px;"><!-- 2011.3.1305.35 --><span class="rbPrimaryIcon rbPrevious" style="top:4px;left:4px;"></span><input class="rbDecorated rbPrimary" type="submit" name="TestModuleDetails$ReturnButton_input" id="TestModuleDetails_ReturnButton_input" value="Return To Test" style="width:100%;padding-left:0;padding-right:0;padding-left:4px;" /><input id="TestModuleDetails_ReturnButton_ClientState" name="TestModuleDetails_ReturnButton_ClientState" type="hidden" /></a>


I don't see why it doesn't cause postback, anybody see what I'm missing?

 

Danail Vasilev
Telerik team
 answered on 17 Apr 2013
3 answers
252 views
Hi,

I have a user control that contains a RadGrid and a RadToolBar control. The RadGrid uses the NeedDataSource event to populate its content. The RadToolBar contains a button that inits a postback to save the contents of the page (the page contains other controls such as drop down list , text box, etc. but none are related to the issue I am having). In its current state (code shown below) everything works fine (the RadToolBar ButtonClick event handler get called and the content on the page is saved). The problem occurs when I add an event handler for the RadGrid's ItemDataBound event. I use this handler to set the PostBackUrl of an Button control (I do it on this event because I need the ID of the RadGrid's row content). The problem is that the RadToolBar ButtonClick event handler doesn't get called anymore.

With everything working, the event sequence is: Load -> NeedDataSource -> ButtonClick. After adding the ItemDataBound event the sequence is Load -> NeedDataSource -> ItemDataBound (the ButtonClick event gets "ignored").

Why does adding the ItemDataBound event in the RadGrid affect the ButtonClick event in the RadToolBar? How can I get the ButtonClick event to "not be ignored" while still maintaining the ItemDataBound event?

Thanks. (Please see code below)


When Things Work Fine:

 

<telerik:RadToolBar ID="RadToolBar1" runat="server" Skin="Web20" style="width:100%;" OnButtonClick="RadToolBar1_ButtonClick">
    <Items>
        <telerik:RadToolBarButton ImageUrl="~/[path_omitted]/SaveRadToolBar1.png" Text="Save" ToolTip="Save" />
    </Items>
</telerik:RadToolBar>


 

 

 

<telerik:RadGrid   
ID="RadGrid1"   
runat="server"  
Skin="Vista"  
AutoGenerateColumns="false"  
OnNeedDataSource="RadGrid1_NeedDataSource">
  
    <MasterTableView CommandItemDisplay="None" Height="30" DataKeyNames="ID" ClientDataKeyNames="ID" GroupLoadMode="Client" NoMasterRecordsText="You do not have any data">
        <GroupByExpressions
            <telerik:GridGroupByExpression>
                <GroupByFields>
                    <telerik:GridGroupByField FieldName="Topic.Category.Name" />
                </GroupByFields>
  
                <SelectFields>
                      <telerik:GridGroupByField FieldName="Topic.Category.Name" HeaderText="Category" />
                </SelectFields>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>
  
        <Columns>
  
            <telerik:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="DataID" Visible="false" />
  
            <telerik:GridBoundColumn DataField="Topic.ID" UniqueName="DataTopicID" Visible="false" />
  
            <telerik:GridBoundColumn DataField="Topic.Category.Name" HeaderText="Name" UniqueName="DataCategoryName" Visible="false" />
  
            <telerik:GridBoundColumn DataField="Topic.Name" HeaderText="Topic" UniqueName="DataTopicName" />
  
            <telerik:GridTemplateColumn HeaderText="Go" UniqueName="DataGoTo" HeaderStyle-Width="50">
  
                <ItemTemplate>
  
                    <asp:Button ID="ButtonGoTo" runat="server" ToolTip="Go to data" Text="Go" />
  
                </ItemTemplate>
  
            </telerik:GridTemplateColumn>
  
        </Columns>
  
    </MasterTableView>
  
</telerik:RadGrid>


When the RadToolBar ButtonClick Event Gets Ignored:


<telerik:RadGrid 
ID="RadGrid1" 
runat="server"
Skin="Vista"
AutoGenerateColumns="false"
OnNeedDataSource="RadGrid1_NeedDataSource" 
OnItemDataBound="RadGrid1_ItemDataBound">
  
    <MasterTableView CommandItemDisplay="None" Height="30" DataKeyNames="ID" ClientDataKeyNames="ID" GroupLoadMode="Client" NoMasterRecordsText="You do not have any data">
  
        <GroupByExpressions>
            <telerik:GridGroupByExpression>
                <GroupByFields>
                    <telerik:GridGroupByField FieldName="Topic.Category.Name" />
                </GroupByFields>
                <SelectFields>
                    <telerik:GridGroupByField FieldName="Topic.Category.Name" HeaderText="Category" />
                </SelectFields>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>
  
        <Columns  
            <telerik:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="DataID" Visible="false" />
            <telerik:GridBoundColumn DataField="Topic.ID" UniqueName="DataTopicID" Visible="false" />
            <telerik:GridBoundColumn DataField="Topic.Category.Name" HeaderText="Name" UniqueName="DataCategoryName" Visible="false" />
            <telerik:GridBoundColumn DataField="Topic.Name" HeaderText="Topic" UniqueName="DataTopicName" />
            <telerik:GridTemplateColumn HeaderText="Go" UniqueName="DataGoTo" HeaderStyle-Width="50">
                <ItemTemplate>
                    <asp:Button ID="ButtonGoTo" runat="server" ToolTip="Go to data" Text="Go" />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
  
    </MasterTableView>
  
</telerik:RadGrid>

 

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridDataItem)
    {
        GridDataItem dataItem = e.Item as GridDataItem;
        (dataItem["DataGoTo"].FindControl("ButtonGoTo") as Button)
            .PostBackUrl = String.Format(
                "~/ShowData.aspx?id={0}",
                dataItem["DataTopicID"].Text);
    }
}

Maria Ilieva
Telerik team
 answered on 17 Apr 2013
1 answer
123 views
So I have pretty strange issue with the paging control of one of my grids. It will almost always be at the bottom of their screen, but for some reason when the page is built, and the relative radgrid IS at the lowest visible element, the dropdown would not expand up instead of down. So I followed another post I found on here to do this:

protected void UploadReportGrid_ItemCreated(object sender, GridItemEventArgs e)
        {
            // there is an issue with the paging RadComboBox drop down direction in the uploaded reports grid.
            // it apparently cannot determine that it is at the bottom of the screen like normal so we make
            // the drop down expand up hard coded.
            if (e.Item is GridPagerItem)
            {
                GridPagerItem pagerItem = e.Item as GridPagerItem;
                RadComboBox combo = pagerItem.FindControl("PageSizeComboBox") as RadComboBox;
                combo.EnableScreenBoundaryDetection = false;
                combo.ExpandDirection = RadComboBoxExpandDirection.Up;
                combo.DropDownCssClass = "UploadReportGrid_PagerDropDown";
            }
        }

This seemed to work, but then the dropdown height was 0, with only its borders rendering above the clickable area of the paging control. So then I used my little CssClass and wrote:

div.UploadReportGrid_PagerDropDown .rcbScroll {
    height: auto !important;
}

This seemed to do the trick, but the height is still rendering at 0 pixels in ie8, and I am assuming for ie7 also. I need to get this to work for both IE7 and IE8. The attached screenshot is IE8. Thats also what it looked like in modern browsers before the CssRule took affect, but doesn't seem to work for IE7 and 8.
Eyup
Telerik team
 answered on 17 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?