Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
242 views
Hi;
I added all could cause the problem that i live. Here is the problem... I have a page that has a masterpage. In this page I'm calling a webUserControl. There is a listview in webUserControl. And plan to has 3 or more RadComboBox in this usercontrol that will be related combos. When i fill the first combo everything works fine. But When I Select an item the SelectedIndexChanged event of first combo doesn't fires and i loose the selectedValue. I couldn't find where did i made a mistake.. Could you help?
Here is the Codes...

 

MASTER PAGE
 
<telerik:RadScriptManager ID="rSManager" runat="server">
</telerik:RadScriptManager>
<telerik:RadAjaxManager ID="rAjaxManager" runat="server" DefaultLoadingPanelID="rLoadingPnl">
 <AjaxSettings>
  <telerik:AjaxSetting AjaxControlID="RadMenu1">
  </telerik:AjaxSetting>
 </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="rLoadingPnl" runat="server" Skin="WebBlue" RegisterWithScriptManager="true">
</telerik:RadAjaxLoadingPanel>
....
.....
PAGE
<asp:Content ID="Content1" ContentPlaceHolderID="cph_Main" runat="Server">
<%@ register tagprefix="Telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" %>
<link href="~/CSSClasses/CssForTelerikItems.css" type="text/css" rel="stylesheet" />
<link href="~/CSSClasses/vision.css" type="text/css" rel="stylesheet" />
<%@ register src="NewUserControls/Profile/KisiselBilgiler.ascx" tagname="Kisisel" tagprefix="ucKisisel" %>
<%@ register src="NewUserControls/Profile/EgitimBilgileri.ascx" tagname="Egitim" tagprefix="ucEgitim" %>
<%@ register src="NewUserControls/Profile/IsTecrubeleri.ascx" tagname="Tecrube" tagprefix="ucTecrube" %>
<%@ register src="NewUserControls/Profile/IsTercihleri.ascx" tagname="Tercihler" tagprefix="ucTercih" %>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
 <script type="text/javascript">
  function myContentClickHandler()
  {
   $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("content");
  }
 </script>
</telerik:RadCodeBlock>
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
 <AjaxSettings>
  <telerik:AjaxSetting AjaxControlID="ProfileDockLayout">
   <UpdatedControls>
    <telerik:AjaxUpdatedControl ControlID="ProfileDockLayout" LoadingPanelID="rLoadingPnl" />
   </UpdatedControls>
  </telerik:AjaxSetting>
 </AjaxSettings>
</telerik:RadAjaxManagerProxy>
<telerik:RadDockLayout ID="ProfileDockLayout" runat="server" Skin="WebBlue" StoreLayoutInViewState="True">
 <div style="float: left;">
  <telerik:RadDockZone ID="Zone1" runat="server" Width="970px" Orientation="Vertical" MinHeight="100px">
   <telerik:RadDock ID="dockProfil" runat="server" Width="970px" Height="185px" EnableAnimation="true"
   EnableRoundedCorners="true" Resizable="true" Title="Profil Bilgileri" DockMode="docked"
   DefaultCommands="None">
    <ContentTemplate>....
    </ContentTemplate>
   </telerik:RadDock>
  </telerik:RadDockZone>
 </div>
 <div>
  <telerik:RadTabStrip ID="tabsOzgecmis" runat="server" MultiPageID="mPageOzgecmis" Skin="WebBlue">
   <Tabs>
    <telerik:RadTab Text="Kiisel Bilgilerim" PageViewID="pViewKisisel">
    </telerik:RadTab>
    <telerik:RadTab Text="Eitim Bilgilerim" PageViewID="pViewEgitim">
    </telerik:RadTab>
    <telerik:RadTab Text=" Tecrbelerim" PageViewID="pViewTecrube">
    </telerik:RadTab>
    <telerik:RadTab Text=" Tercihlerim" PageViewID="pViewTercih">
    </telerik:RadTab>
   </Tabs>
  </telerik:RadTabStrip>
  <telerik:RadMultiPage ID="mPageOzgecmis" runat="server">
   <telerik:RadPageView ID="pViewKisisel" runat="server">
    <ucKisisel:Kisisel ID="uscKisisel" runat="server" />
   </telerik:RadPageView>
   <telerik:RadPageView ID="pViewEgitim" runat="server">
    <ucEgitim:Egitim ID="uscEgitim" runat="server" />
   </telerik:RadPageView>
   <telerik:RadPageView ID="pViewTecrube" runat="server">
    <ucTecrube:Tecrube ID="uscTecrube" runat="server" />
   </telerik:RadPageView>
   <telerik:RadPageView ID="pViewTercih" runat="server">
    <ucTercih:Tercihler ID="uscTercihler" runat="server" />
   </telerik:RadPageView>
  </telerik:RadMultiPage>
 </div>
</telerik:RadDockLayout>
</div>
</asp:Content>

USER CONTROL
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<link href="~/CSSClasses/CssForTelerikItems.css" type="text/css" rel="stylesheet" />
<link href="~/CSSClasses/vision.css" type="text/css" rel="stylesheet" />
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
 <script type="text/javascript">
  function myContentClickHandler()
  {
   $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("content");
  }
  function onKeyPressing(sender) {
   sender.allowOpenDropDown = true;
  }

  function onDropDownOpening(sender, eventArgs) {
   if (!sender.allowOpenDropDown || sender.get_text().length == 0)
    eventArgs.set_cancel(true);
  }

  function onItemsRequesting(sender, eventArgs) {
   if (sender.get_text().length == 0) {
    if (sender.get_dropDownVisible())
     sender.hideDropDown();
     eventArgs.set_cancel(true);
   }
  }

  function onBlur(sender) {
   sender.allowOpenDropDown =
   false;
  }

  </script>
</telerik:RadCodeBlock>
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
 <AjaxSettings>
  <telerik:AjaxSetting AjaxControlID="lViewOkul">
   <UpdatedControls>
    <telerik:AjaxUpdatedControl ControlID="lViewOkul" LoadingPanelID="rLoadingPnl" />
   </UpdatedControls>
  </telerik:AjaxSetting>
 </AjaxSettings>
</telerik:RadAjaxManagerProxy>

<telerik:RadListView ID="lViewOkul" runat="server" OnItemCommand="lViewOkul_ItemCommand"
DataKeyNames="KAYITNO" OnItemDataBound="lViewOkul_ItemDataBound" OnItemCreated="lViewOkul_ItemCreated">
 <InsertItemTemplate>
 </InsertItemTemplate>
 <EditItemTemplate>
 </EditItemTemplate>
 <EmptyDataTemplate>
  <div style="float: left">
  vs vs vs vs.
  <asp:LinkButton ID="btnOkul" runat="server" Text="Ekle" CommandName="InitInsert"></asp:LinkButton>
  </div>
 </EmptyDataTemplate>
 <EmptyItemTemplate>
 </EmptyItemTemplate>
 <ItemTemplate>
  <table class="itemLabels">
   <tr>
    <td>
    Seviyeniz
    </td>
    <td>
    :
    </td>
    <td>
     <telerik:RadComboBox ID="ctlOgrenimSeviyesi" runat="server" Width="190px" EnableLoadOnDemand="true"
     ShowToggleImage="false" LoadingMessage="..." OnClientKeyPressing="onKeyPressing"
     OnClientDropDownOpening="onDropDownOpening" OnClientItemsRequesting="onItemsRequesting"
     OnClientBlur="onBlur" AutoPostBack="true">
     </telerik:RadComboBox>
    </td>
   </tr>
   <tr>
    <td>
    Okul Ad
    </td>
    <td>
    :
    </td>
    <td>
     <telerik:RadComboBox ID="cmbOkulAdi" runat="server" ChangeTextOnKeyBoardNavigation="true"
     AllowCustomText="true" ItemsPerRequest="20" Width="190px" EnableItemCaching="True"
     Height="150px" LoadingMessage="Ykleniyor..." MarkFirstMatch="True" ShowWhileLoading="False">
     </telerik:RadComboBox>
    </td>
    </tr>
    <tr>
    <td colspan="3">
     <asp:LinkButton ID="btnDuzenle" runat="server" Text="Gncelle" CommandName="Edit"></asp:LinkButton>
    </td>
   </tr>
  </table>
 </ItemTemplate>
</telerik:RadListView>

UserControl cs

protected void Page_Load(object sender, EventArgs e)
{
RadProfile rp = new RadProfile();
 if (vwProfilData == null)
  vwProfilData = rp.ReadProfil(vwProfilData);
 lViewOkul.DataSource = vwProfilData.OgrGorduguOkulBE;
 lViewOkul.DataBind();
}

protected void lViewOkul_ItemCommand(object sender, RadListViewCommandEventArgs e)
{
}

protected void lViewOkul_ItemDataBound(object sender, Telerik.Web.UI.RadListViewItemEventArgs e)
{
 RadComboBox cmb = (RadComboBox)e.Item.FindControl("ctlOgrenimSeviyesi");
 cmb.ItemsRequested += ctlOgrenimSeviyesi_ItemsRequested;
 cmb.SelectedIndexChanged += ctlOgrenimSeviyesi_SelectedIndexChanged;
}

protected void lViewOkul_ItemCreated(object sender, RadListViewItemEventArgs e)
{
}

protected void ctlOgrenimSeviyesi_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)
{
 RadComboBox cmb = (RadComboBox)o;
 parameter = null;
 DataView dt1 = null;
 ParameterTableName = "PRMOGRENIMDURUM";
 cmb.DataSource = Parameter.GetListByFilter("ACIKLAMA LIKE '" + e.Text + "%'");
 cmb.DataTextField = "ACIKLAMA";
 cmb.DataValueField = "KAYITNO";
 cmb.DataBind();
}

protected void ctlOgrenimSeviyesi_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
{
 RadComboBox cbm = (RadComboBox)lViewOkul.FindControl("cmbOkulAdi");
 PrmOgrenimDurumConstants osKod = (PrmOgrenimDurumConstants)Convert.ToDecimal(ParameterList.GetParameter(ParameterConstants.PRMOGRENIMDURUM).GetKodByKayitNo(Convert.ToDecimal(e.Value)));
 cbm.DataSource = SchoolCacheBLL.ReadAllOkul(osKod);
 cbm.DataTextField = "AD";
 cbm.DataValueField = "KAYITNO";
 cbm.DataBind();
}
}

Radoslav
Telerik team
 answered on 12 May 2010
1 answer
78 views
Hello there,

I have a layout with three RadDockZone's put in a RadDockLayout which is placed in a RadAjaxPanel. I am adding a from a menu by calling a page method and then calling the ajaxRequest method of the RadAjaxPanel. Everything works almost correctly. The problem is the markup of all docks gets refreshed during the AJAX request which leads to:

  1. noticable slowdown when many docks are opened and/or lots of markup is loaded (because there are mainly grids in my docks);
  2. all docks get refreshed which in my case hides the data and reloads it (as I am using client-side databinding to populate the grids).

I have tried creating a hidden (display: none) RadDockZone, loading docks dynamically in it and then moving them to the target dock but it didn't work. Any ideas?

Best regards,
Valery.
Pero
Telerik team
 answered on 12 May 2010
1 answer
116 views

I using a RadDataPager with a list view, in the RadDataPager I have a RadComoBox that I want to load from Javascript. Can this be done my code is below. So I can’t get it to work.

 

<telerik:RadDataPager ID="Pager1" runat="server" PagedControlID="dlResult" PageSize="5"

                            Width="698px">

                            <fields>

                                <%--<telerik:RadDataPagerButtonField FieldType="FirstPrev" />--%>

                                <telerik:RadDataPagerButtonField FieldType="Numeric" PageButtonCount="5" />

                                <%--<telerik:RadDataPagerButtonField FieldType="NextLast" />--%>

                                <telerik:RadDataPagerPageSizeField PageSizeText="Page size:" />

                                <telerik:RadDataPagerTemplatePageField>

                                    <PagerTemplate>

                                         <%--<div style="float: right; height:20px; padding: 0px 55px 5px 0px;">

                                           <telerik:RadToolBar ID="RadToolBar1" runat="server">

                                                <Items>

                                                    <telerik:RadToolBarButton CommandName="Descending" PostBack="true" ImageUrl="../images/arrow1.png"    ToolTip="Sort in descending order" HoveredCssClass="rtbItemClicked" meta:resourcekey="btnDescendingResource1" />

                                                    <telerik:RadToolBarButton CommandName="Ascending" PostBack="true" ImageUrl="../images/arrow2.png"  HoveredCssClass="rtbItemClicked" ToolTip="Sort in ascending order" meta:resourcekey="btnAscendingResource1" />

                                                </Items>

                                             </telerik:RadToolBar>

                                         </div>--%>

                                         <div style="float: Left"> 

                                            <telerik:RadComboBox ID="ddSort1" OnSelectedIndexChanged="ddSort1_SelectedIndexChanged" OnClientSelectedIndexChanged="RadComboBoxOnClientSelected" AutoPostBack="true" runat="server" Width="95px" >

                                                 <%--<Items>

                                                    <telerik:RadComboBoxItem Text="Field to Sort" Value="" />

                                                    <telerik:RadComboBoxItem Text="Price" Value="Price" />

                                                    <telerik:RadComboBoxItem Text="Mileage" Value="Mileage" />

                                                    <telerik:RadComboBoxItem Text="Year" Value="VehicleYear" />

                                                      <telerik:RadComboBoxItem Text="Make" Value="VehicleMake" />

                                                    <telerik:RadComboBoxItem Text="Clear sort" Value="ClearSort" />

                                                </Items>--%>

                                            </telerik:RadComboBox>

                                         </div>

                                         <div style="float: left; height:30px; padding: 0px 0px 0px 2px;">

                                           <telerik:RadToolBar ID="RadToolBar2" OnButtonClick="RadToolBar2_ButtonClick" Height="20px" AutoPostBack="true"  OnClientButtonClicking="onButtonClicked" runat="server">

                                                <Items>

                                                    <telerik:RadToolBarButton CommandName="Sort" PostBack="true"  ImageUrl="../images/arrow1.png" Height="20px" Width="25" HoveredCssClass="rtbItemClicked" ToolTip="Sort in ascending order"  />

                                                    <telerik:RadToolBarButton CommandName="CompareChecked" PostBack="true" Text="Compare vehicles"  Height="20px" HoveredCssClass="rtbItemClicked" ToolTip="Compare checked vehicles" meta:resourcekey="btnCompareCheckedResource1" />

                                                    <telerik:RadToolBarButton CommandName="Download" PostBack="true" Text="Download"  Height="20px" ToolTip="Download" HoveredCssClass="rtbItemClicked" meta:resourcekey="btnExportResource1" />

                                                    <telerik:RadToolBarButton CommandName="EmailSearchResults" PostBack="true" Text="Email results"  Height="20px" HoveredCssClass="rtbItemClicked" ToolTip="Email search results" CheckOnClick="true"  meta:resourcekey="btnListViewResource1" />

                                                    <telerik:RadToolBarButton CommandName="GridView" PostBack="true" Text="List View"  Height="20px" HoveredCssClass="rtbItemClicked" ToolTip="Change to List View mode" meta:resourcekey="btnListViewResource1" />

                                                </Items>

                                             </telerik:RadToolBar>

                                         </div>

                                    </PagerTemplate>

                                </telerik:RadDataPagerTemplatePageField>

                            </fields>

                        </telerik:RadDataPager>

 

 

function GetSort(result, userContext, methodName)

         {

var Pager = $find("<%# Pager1.ClientID %>");

             var combo = Pager.findControl("ddSort1");

             if (combo)

              {

                var comboItem = new Telerik.Web.UI.RadComboBoxItem();

             combo.set_text("item");

                 combo.trackChanges();

                 combo.get_items().add(comboItem);

                 comboItem.select();

                 combo.commitChanges();

             }

         }

 

                   

Iana Tsolova
Telerik team
 answered on 12 May 2010
1 answer
288 views
Hi there,

I am using the rad Grid control in one of my applications and it is bound to a datatable. The Datatable is generated via a Stored Procedure containing a Dynamic SQL. In other words the fields returned by the Stored Proc may not have fixed names at every call and I have no control over this.

Having said the above, I would like each cell in the grid to be a hyperlink with a client or server side function. This function should populate a set of textboxes located on the same page as the Grid.

Can someone help me with this?

Thanks

Noel
Veli
Telerik team
 answered on 12 May 2010
3 answers
393 views
Hi,

I'm using RadNumericTextbox up to 15 decimal places right now and having some formatting and rounding problems. When I enter a value like 0.0000000008 into the textbox when it loses focuses it turns into 8. When I put it back into focus it turns into 8e-10. At this point if I defocus the textbox the value turns into a permanent 8. Is there any way where I can make it show 0.0000000008 for all cases? I'm trying not to show the exponential notation and not have it show it as a whole number when it is actually a very small number.

Also since numerictextbox uses double and goes up to 15 total digits I'm trying to truncate the excess digits rather than rounding it. e.g. 1.12345678901234567890 turns into 1.1234567890123457 on defocus and on postback it turns into 1.12345678901235. Is there any way to not get rounding for both these cases? This is what I have for my example:

<telerik:RadNumericTextBox runat="server" ID="rntbTest" Width="100">  
            <NumberFormat DecimalDigits="15" KeepNotRoundedValue="false" AllowRounding="false" />  
</telerik:RadNumericTextBox> 

Thanks!
Gilbert
Veli
Telerik team
 answered on 12 May 2010
1 answer
93 views

Please help!

I used rad grid grouping by expression.  I got an error when I clicked "X"  to ungroup.  I was able to drag a column field to the group header.  Thank you in advance for your help.

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

 

<

 

GroupByExpressions>

 

 

 

<telerik:GridGroupByExpression>

 

 

 

<SelectFields>

 

 

 

<telerik:GridGroupByField FieldAlias="Project_Title" FieldName="Project_Title"></telerik:GridGroupByField>

 

 

 

</SelectFields>

 

 

 

<GroupByFields>

 

 

 

<telerik:GridGroupByField FieldName="Project_Title" SortOrder="Ascending"></telerik:GridGroupByField>

 

 

 

</GroupByFields>

 

 

 

</telerik:GridGroupByExpression>

 

 

 

</GroupByExpressions>

 

 

<ClientSettings AllowDragToGroup="true" AllowColumnsReorder="True">

 

 

 

<Resizing AllowColumnResize="true" />

 

 

 

<Selecting AllowRowSelect="True"></Selecting>

 

 

 

</ClientSettings>

 

 

 

<GroupingSettings CaseSensitive="false" ShowUnGroupButton="true" />

 

Pavlina
Telerik team
 answered on 12 May 2010
1 answer
95 views
Hi,

I have a RadWindow in my page and I am trying to show this RadWindow in a javascript function. This javascript function is on click on a html button click.

I have the following code written for RadWindow:

<

 

telerik:RadWindowManager ID="rwmMyWindow" runat="server" />

<

 

telerik:RadWindow ID="rwUploadConfirmation" runat="server" Modal="True" Width="700" Height="400" KeepInScreenBounds="True" Overlay="True" VisibleStatusbar="false" VisibleTitlebar="false" Visible="false" >

 

 

<ContentTemplate>

 

 

   <asp:Label ID="lblUploadStatusMessage" runat="server" Font-Size="12px" ForeColor="Black" Font-Bold="true" />

 

  <

 

input type= button ID="SaveMsg_OK" value="Continue" style="width:75px" onclick="javascript:close_uploadWindow_dlg();" />

 

 

 

</ContentTemplate>

 

</

 

telerik:RadWindow>

 

In a javascript function, I need to show this RadWindow, assign some data to the label that I have inside this.

Would like to know how do I get this done.

Thanks in advance.

Shruthi

 

Bob van der Zinch
Top achievements
Rank 2
 answered on 12 May 2010
1 answer
137 views
Page has RadScriptManager and a RadWindowManager for separate functionality. I have added a div to get a jQuery fade-in effect (http://yensdesign.com/2008/09/how-to-create-a-stunning-and-smooth-popup-using-jquery/). Inside div is a user control MyUploader (http://www.c-sharpcorner.com/UploadFile/munnamax/bulkuploader03272007031417AM/bulkuploader.aspx) with ListBox for adding files and buttons for adding, removing and uploading (POST'ing) to UploadPost.aspx. When clicking buttons, the fade-in disappears--I want it to remain on screen when adding and removing. The "Add" and "Remove" asp:Button's have OnClick handlers in the code-behind. MyUploader control is surrounded by <form id="frmUpload action="UploadPost.aspx">...</form>

However, clicking the upload asp:Button behaves exactly as above. No post and the fade-in disappears. The ListBox manages to hang on to any files added, but the fade-in initially disappears. I don't think asp:UpdatePanel's are allowed with RadScriptManager, but is there some kind of UpdatePanel-equivalent to add around the MyUploader to make it async? What am I missing?

Thanks in advance!
Dimo
Telerik team
 answered on 12 May 2010
3 answers
149 views
Hi,

I am trying to use the grid with self referencing; however I am unable to solve some issues. The first and most important problem is, if I choose "AutoGenerateColumns" as true; it all works fine. However; I need to specify the columns during runtime on serverside; by adding columns to the grid. When "AutoGenerateColumns" is set to false and columns are added on the server side, grid does not display the hierarchy at all; but just lists the items.

Please let me know what to do to be able to add columns at serverside during page's load or init events; so that the self referencing hierarchy works.

I am exhausted of trying to solve this issue and tried everything I can; so any help is greatly appreciated.

Thanks.
Veli
Telerik team
 answered on 12 May 2010
1 answer
116 views
Hi,
I have a problem with a double columns layout.
The menu is placed in the left column, but it overlaps the column encroaching into the right one.
I tried to set a width for the menu but I found two problems:
- the width property does not work in IE6
- on other browsers the property is correctly applied, but menu items overdo the menu box. 

I really need a solution to make the menu work in IE6 and I need to know possibly how to make the menu items wrap.

Thanks in advance
Fabio
Top achievements
Rank 1
 answered on 12 May 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?