Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
59 views
I use RadEditor lite for MOSS2007 (free version) to edit list items.
Steps to reproduce:
- Click New button to start creating a new item
- use MOSSLinkManager to insert a link into one RTE. It works.
- Use Backspace key to delete the link (the RTE become blank)
- use MOSSLinkManager to insert a link. It does not work.
Truong Hong Thi
Top achievements
Rank 1
 answered on 10 Jun 2010
4 answers
391 views
I've just moved to the Telerik Ajax controls from standard .Net controls and am finding the page load times to be incredibly slow.

I've got a simple Rad Window popup box that contains a couple of text boxes and a combo box (5 records) and the page load time is around 5 seconds which is far too long.

I'm using the RadScriptManager, StyleSheetManager and AjaxManager, along with setting web config debug=false but still none of this has made a difference.  I've even removed all the controls but the load time is still extremelly slow...

Code below, hopefully you can tell me where I'm going wrong...

Cheers
Cliff

Master Page for popup:

<%

 

@ Master Language="C#"

 

 

 

AutoEventWireup="true"

 

 

 

CodeFile="MasterPageDialogs.master.cs"

 

 

 

Inherits="MasterPageDialogs"

 

%>

<%

 

@ Register Assembly="Telerik.Web.UI"

 

 

 

Namespace="Telerik.Web.UI"

 

 

 

TagPrefix="telerik"

 

%>

<!

 

 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<

 

 

html xmlns="http://www.w3.org/1999/xhtml">

 

<

 

 

head runat="server">

 

 

 

<asp:ContentPlaceHolder id="head" runat="server">

 

 

 

</asp:ContentPlaceHolder>

 

</

 

 

head>

 

<

 

 

body>

 

 

 

<form id="form1" runat="server">

 

 

 

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>

 

 

 

<telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Windows7"></telerik:RadSkinManager>

 

 

 

<telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server"></telerik:RadStyleSheetManager>

 

 

 

<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Windows7" />

 

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"></telerik:RadAjaxManager>

 

 

 

<div>

 

 

 

<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">

 

 

 

 

</asp:ContentPlaceHolder>

 

 

 

</div>

 

 

 

 

<!-- Popup Dialog/Windows, e.g. MessageBox -->

 

 

 

 

<telerik:RadWindowManager ID="RadWindowManager" runat="server"

 

 

 

Behavior="Default" InitialBehavior="None" EnableViewState="False">

 

 

 

<Windows>

 

 

 

<telerik:RadWindow runat="server" ID="RadWindowMessageBox" Behavior="Default" InitialBehavior="None"

 

 

 

NavigateUrl="~/Dialogs/MessageBox.aspx" ReloadOnShow="true" Animation="None"

 

 

 

Height="150px" Modal="true" Title="MessageBox" Width="350px" AnimationDuration="750" Behaviors="Close" Enabled="True" VisibleStatusbar="False" IconUrl="~/favicon.ico">

 

 

 

</telerik:RadWindow>

 

 

 

</Windows>

 

 

 

</telerik:RadWindowManager>

 

 

 

 

</form>

 

</

 

 

body>

 

</

 

 

html>

 



POPUP aspx:

<%

 

@ Page Title=""

 

 

 

Language="C#"

 

 

 

MasterPageFile="~/MasterPageDialogs.master"

 

 

 

AutoEventWireup="true"

 

 

 

CodeFile="CreateTask.aspx.cs"

 

 

 

Inherits="Dialogs_CreateTask"

 

%>

<%

 

@ MasterType VirtualPath="~/MasterPageDialogs.master" %>

 

<%

 

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<

 

 

asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"></asp:Content>

 

<

 

 

asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

 

<

 

 

telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"></telerik:RadAjaxManagerProxy>

 

 

 

 

<script type="text/javascript">

 

 

 

function GetRadWindow() {

 

 

 

var oWindow = null;

 

 

 

if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog

 

 

 

else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz az well)

 

 

 

return oWindow;

 

}

 

 

function CloseOnReload() {

 

GetRadWindow().close();

}

 

 

function RefreshParentPage() {

 

GetRadWindow().BrowserWindow.location.href = GetRadWindow().BrowserWindow.location.href;

}

 

 

</script>

 

 

 

<table cellpadding="1" cellspacing="1" border="0" width="100%">

 

 

 

<tr>

 

 

 

<td>

 

 

 

<asp:Label ID="lblTitle" runat="server" Text="Title:"></asp:Label>

 

 

 

</td>

 

 

 

<td>

 

 

 

<telerik:RadTextBox ID="txtTitle" runat="server" Width="290px"></telerik:RadTextBox>

 

 

 

</td>

 

 

 

</tr>

 

 

 

<tr>

 

 

 

<td>

 

 

 

<asp:Label ID="lblDescription" runat="server" Text="Description:"></asp:Label>

 

 

 

</td>

 

 

 

<td>

 

 

 

<telerik:RadTextBox ID="txtDescription" runat="server" Width="290px" ></telerik:RadTextBox>

 

 

 

</td>

 

 

 

</tr>

 

 

 

<tr>

 

 

 

<td>

 

 

 

<asp:Label ID="lblEvent" runat="server" Text="Event:"></asp:Label>

 

 

 

</td>

 

 

 

<td>

 

 

 

<telerik:RadComboBox ID="cboEvents" Runat="server" Width="290px"></telerik:RadComboBox>

 

 

 

</td>

 

 

 

</tr>

 

 

 

<tr>

 

 

 

<td>

 

 

 

<asp:Label ID="lblDueDate" runat="server" Text="Due Date:"></asp:Label>

 

 

 

</td>

 

 

 

<td>

 

 

 

<telerik:RadDatePicker runat="server" ID="RadDatePickerDueDate"></telerik:RadDatePicker>

 

 

 

</td>

 

 

 

</tr>

 

 

 

<tr>

 

 

 

<td colspan="2">

 

 

 

&nbsp;

 

 

 

</td>

 

 

 

</tr>

 

 

 

<tr align="center">

 

 

 

<td colspan="2">

 

 

 

<asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click"></asp:Button>

 

 

 

</td>

 

 

 

</tr>

 

 

 

</table>

 

</

 

 

asp:Content>

 

 

POPUP Code:

 

using

 

 

System;

 

 

 

 

using

 

 

Telerik.Web.UI;

 

 

 

 

public

 

 

partial class Dialogs_CreateTask : System.Web.UI.Page

 

 

 

 

 

{

 

 

 

#region

 

 

Events

 

 

 

protected void Page_Load(object sender, EventArgs e)

 

{

 

 

try

 

 

 

 

 

{

 

 

if (!IsPostBack)

 

{

LoadEvents();

}

}

 

 

catch (Exception ex)

 

{

Master.ShowMsgBoxPopup(

 

"Error Loading Page", Napp_ErrorTrapping.BuildExeceptionMessage(ex));

 

}

}

 

 

protected void btnSave_Click(object sender, EventArgs e)

 

{

 

 

try

 

 

 

 

 

{

 

 

string result = ControlsAreValid();

 

 

 

if (result == "Success")

 

{

 

 

string username = Page.User.Identity.Name;

 

 

 

string taskID = EM_Data.CreateTask(txtTitle.Text,

 

txtDescription.Text,

username,

RadDatePickerDueDate.SelectedDate.ToString(),

 

 

int.Parse(cboEvents.SelectedValue));

 

Session.Add(

 

"ACTION", "TASK ADDED");

 

Session.Add(

 

"TASK_ID", taskID);

 

 

 

RadScriptManager.RegisterStartupScript(this, this.GetType(), "closeWindow", "RefreshParentPage();", true);

 

 

 

RadScriptManager.RegisterStartupScript(this, this.GetType(), "closeWindow", "CloseOnReload();", true);

 

}

 

 

else

 

 

 

 

 

{

Master.ShowMsgBoxPopup(

 

"Cannot Save Task", result);

 

}

}

 

 

catch (Exception ex)

 

{

Master.ShowMsgBoxPopup(

 

"Cannot Save Task", Napp_ErrorTrapping.BuildExeceptionMessage(ex));

 

}

}

 

 

 

#endregion

 

 

 

 

#region

 

 

Methods

 

 

 

private string ControlsAreValid()

 

{

 

 

string result = "Success";

 

 

 

if (txtTitle.Text == "")

 

result =

 

"Please enter a 'Title' for this task.";

 

 

 

if (RadDatePickerDueDate.SelectedDate == null)

 

result =

 

"Please enter a 'Due Date' for this task.";

 

 

 

if (cboEvents.SelectedValue == "0")

 

result =

 

"Please select an 'Event' for this task.";

 

 

 

 

 

return result;

 

}

 

 

private void LoadEvents()

 

{

cboEvents.DataValueField =

 

"EventID";

 

cboEvents.DataTextField =

 

"EventTitle";

 

cboEvents.DataSource =

 

EM_Data.SearchEvents(Page.User.Identity.Name, true);

 

cboEvents.DataBind();

}

 

 

 

#endregion

 

 

 

 

}

T. Tsonev
Telerik team
 answered on 10 Jun 2010
8 answers
224 views
Hi All,

I have a problem. i have a page in which i have a button. and i have another page (user control) in which i have rad date picker named as rdDate. i show this page in div. now i want to do that by clicking on button i want to set date of rdDate. date which i provide. how can i do this.???


Please help. thanks

Radoslav
Telerik team
 answered on 10 Jun 2010
1 answer
104 views
Hi,
       I have a column in grid which I am hiding (Display="false") from users,and on click of a button I am accesing values from that column.I am using  HeaderContextMenu, form which user will be able to select and unselect the column(for personalization perpose i am giving this option to user).
                              The problem is that the hidden columns are also visible in  HeaderContextMenu.I want that those hidden columns should not come in  HeaderContextMenu. Please suggest me How to remove HeaderContextMenu - column values.

Regards,
Dheeraj         
Iana Tsolova
Telerik team
 answered on 10 Jun 2010
5 answers
1.2K+ views
Hi;

I'd found this thread (admittedly rather old), and tried what you'd suggested, but it did not work. 

I have a RadGrid with an image button in a GridTemplateColumn.  I am directing the click event for that button to an onClick event (see below).  I need to update another RadGrid within the onClick event for that button.  I tried changing from a template column to a button column and using the ItemCommand event as an AsyncPostBackTrigger to fire the update panel, but that didn't work either.  I've tried setting a PostBackTrigger also.

Thanks!

Here's the code:

Grid containing the GridTemplateColumn:

                <rad:RadGrid ID="Page3_DisplayPayables_rgPayables" runat="server"   
                    AlternatingRowStyle-BackColor="#ddeeee" AutoGenerateColumns="false"   
                    EnableAJAX="True" GridLines="None" HeaderStyle-HorizontalAlign="Left"   
                    Height="150" onitemcommand="Page3_DisplayPayables_rgPayables_ItemCommand"   
                                                                    onitemdatabound="Page3_DisplayPayables_rgPayables_ItemDataBound" > 
                    <HeaderStyle BackColor="Black" ForeColor="White" Height="15px" /> 
                    <ClientSettings> 
                        <Scrolling AllowScroll="True" SaveScrollPosition="True"   
                            UseStaticHeaders="True" /> 
                    </ClientSettings> 
                    <MasterTableView AlternatingItemStyle-BackColor="#ddeeee" Width="100%">  
                        <RowIndicatorColumn> 
                            <HeaderStyle Width="20px" /> 
                        </RowIndicatorColumn> 
                        <ExpandCollapseColumn> 
                            <HeaderStyle Width="20px" /> 
                        </ExpandCollapseColumn> 
                        <Columns> 
                            <rad:GridBoundColumn DataField="FileNumber" HeaderText="File Number"   
                                ItemStyle-Width="70">  
                                <ItemStyle Width="70" /> 
                            </rad:GridBoundColumn> 
                            <rad:GridBoundColumn DataField="VendorNumber" HeaderText="Vendor"   
                                ItemStyle-Width="40px">  
                                <ItemStyle Width="40px" /> 
                            </rad:GridBoundColumn> 
                            <rad:GridBoundColumn DataField="InvoiceDate" HeaderText="Date"   
                                ItemStyle-Width="50px">  
                                <ItemStyle Width="50px" /> 
                            </rad:GridBoundColumn> 
                            <rad:GridBoundColumn DataField="BillOfLading" HeaderText="B/L"   
                                ItemStyle-Width="80px">  
                                <ItemStyle Width="80px" /> 
                            </rad:GridBoundColumn> 
                            <rad:GridBoundColumn DataField="AmountUSD"   
                                DataFormatString="{0:###,###,###.00}" HeaderText="Amount USD"   
                                ItemStyle-HorizontalAlign="Right" ItemStyle-Width="80px">  
                                <ItemStyle HorizontalAlign="Right" Width="80px" /> 
                            </rad:GridBoundColumn> 
                            <rad:GridBoundColumn DataField="ProratedUSD"   
                                DataFormatString="{0:###,###,###.00}" HeaderText="Prorated Amount USD"   
                                ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px">  
                                <ItemStyle HorizontalAlign="Right" Width="100px" /> 
                            </rad:GridBoundColumn> 
                            <rad:GridBoundColumn DataField="DifferenceUSD"   
                                DataFormatString="{0:###,###,###.00}" HeaderText="Difference USD"   
                                ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px">  
                                <ItemStyle HorizontalAlign="Right" Width="100px" /> 
                            </rad:GridBoundColumn> 
                            <rad:GridTemplateColumn> 
                                <ItemTemplate> 
                                    <asp:ImageButton ID="ibtnDelete" runat="server"   
                                        CommandArgument='<%#Container.DataItem("VendorPayableID")%>'   
                                        ImageUrl="~/images/delete.png"   
                                        OnClick="Page3_DisplayPayables_ibtnDeletePayable_Click" /> 
                                </ItemTemplate> 
                            </rad:GridTemplateColumn> 
                        </Columns> 
                        <AlternatingItemStyle BackColor="#DDEEEE" /> 
                    </MasterTableView> 
                </rad:RadGrid> 
 


Update panel with grid and other controls that need to be updated (there are no trigger entries for the grid that needs to cause the update; I've taken out all the various attempts that I'd made):

 

                                                <asp:UpdatePanel ID="Page3_SearchPayables_upnlControls" runat="server" ChildrenAsTriggers="true" 
                                                    UpdateMode="conditional" OnInit="Page3_SearchPayables_upnlControls_Init">  
                                                    <Triggers> 
                                                    <asp:AsyncPostBackTrigger ControlID="Page3_EnterInvoice_btnAddInvoice" EventName="Click" /> 
                                                    <asp:AsyncPostBackTrigger ControlID="Page3_EnterInvoice_btnUpdateInvoice" EventName="Click" /> 
                                                        <asp:AsyncPostBackTrigger ControlID="Page3_EnterInvoice_btnClearForNewInvoice" EventName="Click" /> 
                                                        <asp:AsyncPostBackTrigger ControlID="Page3_EnterInvoice_btnDeleteInvoice" EventName="Click" /> 
                                                        <asp:AsyncPostBackTrigger ControlID="Page3_SearchPayables_btnCheckAll" EventName="Click" /> 
                                                        <asp:AsyncPostBackTrigger ControlID="Page3_SearchPayables_btnUncheckAll" EventName="Click" /> 
                                                        <asp:AsyncPostBackTrigger ControlID="Page3_SearchPayables_btnAddExistingPayable" 
                                                            EventName="Click" /> 
                                                    </Triggers> 
                                                    <ContentTemplate> 
                                                        <hr /> 
                                                        <table width="800px">  
                                                            <tr> 
                                                                <td colspan="2" valign="top" align="left" style="font-size: large; font-weight: bold;  
                                                                    height: 30px;"> 
                                                                    Search/Select Existing Payables &nbsp;  
                                                                </td> 
                                                            </tr> 
                                                            <tr> 
                                                                <td align="right" colspan="2">  
                                                                    File #:&nbsp;<asp:TextBox ID="Page3_SearchPayables_txtFileNumber" Width="75px" runat="server" 
                                                                        OnInit="Page3_SearchPayables_txtFileNumber_Init"></asp:TextBox> 
                                                                    &nbsp; Date from&nbsp;  
                                                                    <rad:RadDatePicker ID="Page3_SearchPayable_rdpStartDate" runat="server" Width="75px" 
                                                                        OnInit="Page3_SearchPayable_rdpStartDate_Init">  
                                                                        <DateInput Skin="">  
                                                                        </DateInput> 
                                                                    </rad:RadDatePicker> 
                                                                    &nbsp;to&nbsp;<rad:RadDatePicker ID="Page3_SearchPayable_rdpEndDate" runat="server" 
                                                                        Width="75px" OnInit="Page3_SearchPayable_rdpEndDate_Init">  
                                                                        <DateInput Skin="">  
                                                                        </DateInput> 
                                                                    </rad:RadDatePicker> 
                                                                    &nbsp;&nbsp; B/L:&nbsp;<asp:TextBox ID="Page3_SearchPayables_txtBL" Width="75px" 
                                                                        runat="server" OnInit="Page3_SearchPayables_txtBL_Init"></asp:TextBox> 
                                                                    &nbsp; Amount:&nbsp;<rad:RadNumericTextBox ID="Page3_SearchPayables_rntAmount" runat="server" 
                                                                        MaxValue="999999999.99" MinValue="0" Skin="WebBlue" Type="Number" NumberFormat-DecimalDigits="2" 
                                                                        Width="75px" OnInit="Page3_SearchPayables_rntAmount_Init">  
                                                                        <NumberFormat DecimalDigits="2" /> 
                                                                    </rad:RadNumericTextBox> 
                                                                    &nbsp;  
                                                                    <asp:Button ID="Page3_SearchPayables_btnSearch" CssClass="ButtonImageStyle" runat="server" 
                                                                        Text="Search" OnClick="Page3_SearchPayables_btnSearch_Click" OnInit="Page3_SearchPayables_btnSearch_Init" /> 
                                                                </td> 
                                                            </tr> 
                                                            <tr> 
                                                                <td colspan="2">  
                                                                        <rad:RadGrid ID="Page3_SearchPayables_rgSearchPayables" runat="server" 
                                                                            HeaderStyle-HorizontalAlign="Left" Height="150"   
                                                                            AlternatingRowStyle-BackColor="#ddeeee" AutoGenerateColumns="false" Width="800px" GridLines="None">  
                                                                      <HeaderStyle BackColor="Black" ForeColor="White" Height="15px" />    
                                                                    <ClientSettings> 
                                                                        <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" /> 
                                                                    </ClientSettings> 
                                                                      <MasterTableView Width="100%" AlternatingItemStyle-BackColor="#ddeeee"   
                                                                      DataKeyNames="FileNumber,Vendor,PayableDate,BL,InvoiceUSD">  
                                                                      <Columns> 
                                                                            <rad:GridTemplateColumn> 
                                                                                <ItemTemplate> 
                                                                                        <asp:CheckBox ID="Page3_SearchPayables_chkAddPayable" runat="server" AutoPostBack="true" 
                                                                                            OnCheckedChanged="Page3_SearchPayables_chkAddPayable_CheckChanged" /> 
                                                                                    </ItemTemplate> 
                                                                                </rad:GridTemplateColumn> 
                                                                                <rad:GridBoundColumn DataField="FileNumber" HeaderText="File #" ItemStyle-Width="100" /> 
                                                                                <rad:GridBoundColumn DataField="Vendor" HeaderText="Vendor" ItemStyle-Width="100" /> 
                                                                                <rad:GridBoundColumn DataField="PayableDate" HeaderText="Date" ItemStyle-Width="100" /> 
                                                                                <rad:GridBoundColumn DataField="BL" HeaderText="B/L" ItemStyle-Width="125" /> 
                                                                                <rad:GridBoundColumn DataField="InvoiceUSD" HeaderText="Amount USD" ItemStyle-Width="90" 
                                                                                    ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,###.00}" /> 
<%--            taken out because of divide by zero error (see stored proc for more info)        
                                                                                  <rad:GridBoundColumn DataField="ProratedUSD" HeaderText="Prorated USD" ItemStyle-Width="90" 
                                                                                    ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,###.00}" /> 
                                                                                <rad:GridBoundColumn DataField="DifferenceUSD" HeaderText="Difference USD" ItemStyle-Width="90" 
                                                                                    ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,###.00}" /> 
--%>                                                                      </Columns> 
                                                                      </MasterTableView> 
                                                                      </rad:RadGrid> 
                                                                </td> 
                                                            </tr> 
                                                            <tr> 
                                                                <td align="left">  
                                                                    <asp:Button ID="Page3_SearchPayables_btnCheckAll" CssClass="ButtonImageStyle" runat="server" 
                                                                        Text="Check All" OnClick="Page3_SearchPayables_btnCheckAll_Click" OnInit="Page3_SearchPayables_btnCheckAll_Init" /> 
                                                                    &nbsp; &nbsp;  
                                                                    <asp:Button ID="Page3_SearchPayables_btnUncheckAll" CssClass="ButtonImageStyle" runat="server" 
                                                                        Text="Uncheck All" OnClick="Page3_SearchPayables_btnUncheckAll_Click" OnInit="Page3_SearchPayables_btnUncheckAll_Init" /> 
                                                                </td> 
                                                                <td align="right">  
                                                                    <asp:Button ID="Page3_SearchPayables_btnAddExistingPayable" CssClass="ButtonImageStyle" 
                                                                        runat="server" Text="Add Checked Payables" OnClick="Page3_SearchPayables_btnAddExistingPayable_Click" 
                                                                        OnInit="Page3_SearchPayables_btnAddExistingPayable_Init" /> 
                                                                </td> 
                                                            </tr> 
                                                        </table> 
                                                    </ContentTemplate> 
                                                </asp:UpdatePanel> 
 

 

The code fired by the image button click:

 

    Protected Sub Page3_DisplayPayables_ibtnDeletePayable_Click(ByVal sender As ObjectByVal e As System.Web.UI.ImageClickEventArgs)  
 
        Dim ibtnDelete As ImageButton = CType(sender, ImageButton)  
        Dim intVendorInvoiceID As Integer = CType(Page3_DisplayInvoice_hdnInvoiceID.Value, Integer)  
        Dim intVendorPayableID As Integer = ibtnDelete.CommandArgument  
 
        Dim taPayable As New xsdVendorPayablesTableAdapters.QueriesTableAdapter()  
        taPayable.mar_spDeleteVendorPayable(intVendorPayableID, clsGlobalClass.strSessionUser)  
 
        Page3_DisplayInvoicePayables_FillControls(intVendorInvoiceID)  
        Page3_SearchPayables_FillPayablesGrid(intVendorInvoiceID)  
        Page3_SearchPayables_upnlControls.Update()  
 
    End Sub 
 

 


and the code recommended in the thread I linked to above:

    Protected Sub Page3_DisplayPayables_rgPayables_ItemDataBound(ByVal sender As ObjectByVal e As Telerik.WebControls.GridItemEventArgs)  
 
        If e.Item.ItemType <> Telerik.WebControls.GridItemType.Item Then Return 
 
        Dim ibtnDelete As ImageButton = CType(e.Item.FindControl("ibtnDelete"), ImageButton)  
 
        ScriptManager1.RegisterAsyncPostBackControl(ibtnDelete)  
 
    End Sub 
 
Pavlina
Telerik team
 answered on 10 Jun 2010
1 answer
45 views
Hi!

We're having a problem rendering the radmenu to expand upwards within internet explorer 7, you can see the problem by opening the link below in ie7, or in ie8 and setting the compatibility mode to internet explorer version 7

http://www.klosterusedcars.com.au/sitefiles/Klosters/templates/Tier1.aspx?pID=7&preview=1

Has anyone else come across this problem?
Yana
Telerik team
 answered on 10 Jun 2010
1 answer
96 views
I am trying to export a pdf from radgrid. Is there a way to set the export directory so GetCurrentDirectory() would not be called?
Daniel
Telerik team
 answered on 10 Jun 2010
3 answers
87 views
Hi,

I have a rad grid in which 2 pages. I am on first page and Scroll down through list on the first page to any position (ie. halfway) .
I move to 2nd page. The scroll bar will take the position as set in the previous page and do not default to top of the grid.

How do I default the scroll bar's position to the top when navigated betweeb pages in the radgrid?

Thanks & Regards,
Shruthi N

Pavlina
Telerik team
 answered on 10 Jun 2010
1 answer
119 views
Hi,
I have filtering turned on and using template for radcomboboxes.  I would like the filtering comboboxes to be related to each other.  I have a combox called dept and I filter it the other combox called employee should contain a list of employees belonging to the selected dept.

On page load, dept is correct with the selectedvalue being the user's home dept.  Employee is also correct because it only list the employees for that dept.  When I select a different dept, my employee combobox is now empty even though I see it hitting RadComboBoxSelectedIndexChangedEventArg

I would appreciate any help you can give.

Khanh

<FilterTemplate> 
  <telerik:RadComboBox ID="DeptID" runat="server" MarkFirstMatch="True" DataSourceID="SqlDept" 
      DataTextField="DeptName" DataValueField="DeptID" Width="200" AllowCustomText="false" 
      OnClientDropDownClosing="OnClientDropDownClosing" EnableItemCaching="false" EnableLoadOnDemand="false" 
      EnableVirtualScrolling="false" ShowMoreResultsBox="False"  
      AutoPostBack="false" OnSelectedIndexChanged="DeptLoadEmployee" 
      TabIndex="1" ToolTip="DeptID" AppendDataBoundItems="true" 
      OnClientSelectedIndexChanged="SelectedIndexChangedDeptID" 
      SelectedValue='<%# TryCast(Container, GridItem).OwnerTableView.GetColumn("DeptID").CurrentFilterValue %>'
      <Items> 
         <telerik:RadComboBoxItem Text="All" Value="" /> 
      </Items> 
  </telerik:RadComboBox> 
  <telerik:RadScriptBlock ID="RadScriptBlock3" runat="server"
    <script type="text/javascript"
      function SelectedIndexChangedDeptID(sender, args) { 
        var tableView = $find("<%# TryCast(Container, GridItem).OwnerTableView.ClientID %>"); 
        tableView.filter("DeptID", args.get_item().get_value(), "EqualTo"); 
      } 
    </script> 
  </telerik:RadScriptBlock> 
</FilterTemplate>
<FilterTemplate> 
  <telerik:RadComboBox ID="EmployeeID" runat="server" MarkFirstMatch="True" DataTextField="EmployeeName" 
    DataValueField="EmployeeID" Width="70" Height="203" AllowCustomText="false" 
    OnClientDropDownClosing="OnClientDropDownClosing" EnableItemCaching="false" EnableLoadOnDemand="false" 
    EnableVirtualScrolling="false" OnClientSelectedIndexChanged="SelectedIndexChangedEmployeeID" 
    ShowMoreResultsBox="False" AutoPostBack="false" ToolTip="EmployeeID" AppendDataBoundItems="true" 
    SelectedValue='<%# TryCast(Container, GridItem).OwnerTableView.GetColumn("EmployeeID").CurrentFilterValue %>'
  </telerik:RadComboBox> 
  <telerik:RadScriptBlock ID="RadScriptBlock4" runat="server"
    <script type="text/javascript"
      function SelectedIndexChangedEmployeeID(sender, args) { 
        var tableView = $find("<%# TryCast(Container, GridItem).OwnerTableView.ClientID %>"); 
        tableView.filter("EmployeeID", args.get_item().get_value(), "EqualTo"); 
      } 
    </script> 
  </telerik:RadScriptBlock> 
</FilterTemplate> 


code behind
Protected Sub DeptLoadEmployee(ByVal source As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) 
        Dim editedItem As GridFilteringItem = TryCast(TryCast(source, RadComboBox).NamingContainer, GridFilteringItem) 
 
        Dim DeptID As RadComboBox = TryCast(source, RadComboBox) 
        Dim EmployeeID As RadComboBox = TryCast(editedItem.FindControl("EmployeeID"), RadComboBox) 
        EmployeeID.Items.Clear() 
 
        EmployeeID.DataSource = LoadEmployeeID(e.Value) 
        EmployeeID.DataBind() 
        AddBlankItemtoCombo(EmployeeID) 
        EmployeeID.SelectedIndex = 0        
    End Sub 
Protected Function LoadEmployeeID(ByVal ID As String) As DataTable 
  Dim dt As New DataTable() 
  If Not ID = String.Empty Then 
    Dim connection As New SqlConnection(ConfigurationManager.ConnectionStrings("TEST").ConnectionString)             
    Dim cmd As New SqlCommand 
    cmd.CommandType = CommandType.StoredProcedure 
    cmd.CommandText = "P_S_EmployeeByDept" 
    cmd.Connection = connection 
    Dim adapter As New SqlDataAdapter() 
    adapter.SelectCommand = cmd 
    adapter.SelectCommand.Parameters.AddWithValue("@DeptID", ID) 
    adapter.Fill(dt) 
  End If 
  Return dt 
End Function 
Protected Sub AddBlankItemtoCombo(ByVal i As Object) 
  Dim blankItem As New RadComboBoxItem() 
  blankItem.Height = CType(10, Unit) 
  i.Items.Insert(0, blankItem) 
End Sub 

Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound 
  If TypeOf e.Item Is GridFilteringItem Then 
    Dim filter As GridFilteringItem = DirectCast(e.Item, GridFilteringItem) 
    Dim DeptID As RadComboBox = DirectCast(filter.FindControl("DeptID"), RadComboBox) 
    Dim EmployeeID As RadComboBox = DirectCast(filter.FindControl("EmployeeID"), RadComboBox) 
    If Not IsPostBack Then 
      If Session("DeptID") IsNot Nothing Then 
        DeptID.SelectedValue = Session("DeptID") 
        EmployeeID.DataSource = LoadUnitID(DeptID.SelectedValue) 
        EmployeeID.DataBind() 
        AddBlankItemtoCombo(EmployeeID) 
      End If 
      Dim columnID As GridColumn = RadGrid1.MasterTableView.GetColumnSafe("DeptID") 
      columnID.CurrentFilterValue = DeptID.SelectedValue 
    End If 
  End If         
End Sub 
Pavlina
Telerik team
 answered on 10 Jun 2010
3 answers
157 views
Hello,

I've created a Gridview strictly for as a user maitenance page. I'm trying to get one of the columns so that it automatically filters the disabled column to 'N'. I've looked through all the tutorials and documentation and followed them exactly. I'm still receiving an error out of know where. Can anyone help me with this? Here is my code.

.cs

 

protected void RadGrid1_PreRender(object sender, System.EventArgs e)

 

{

 

if (!Page.IsPostBack)

 

{

RadGrid1.MasterTableView.FilterExpression =

"([disabled_ind] LIKE \'%N%\')";

 

 

GridColumn column = RadGrid1.MasterTableView.GetColumnSafe("disabled_ind");

 

column.CurrentFilterFunction =

GridKnownFunction.Contains;

 

column.CurrentFilterValue =

"N";

 

RadGrid1.MasterTableView.Rebind();
}

}
I'm using a SqlDataSource didn't know if this might be an issue. Any help would be greatly appreciated because I keep getting the error "Expression needed" when its exactly as the documentation and tutorials say.

Tommy
Top achievements
Rank 1
 answered on 10 Jun 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?