Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
171 views
Hello,

I am observing a typical behavior on closing the RadSpell dialog box.

Steps to replicate the issue:
  1. Open the RadSpell dialog box.
  2. Ensure that the text box that it is trying to spell check has at least one invalid text entry (as per the dictionary used).
  3. Now, close the spell check dialog box before it shows the valid suggestions for the incorrect entry (as per the dictionary used).
  4. The browser would then show the following java script error: "Error: Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus."
I know why this is happening. Reason is simple: The HTML element that the RadSpell is trying to bring focus is no more visible because I closed the dialog box. Please let me know if I can tweak something somewhere to avoid the above thing from happening.

I am using RadControls Q3 2008. I have tried the above scenario on the IE8 browser.

Thanks.
~Abhay
Abhay Jain
Top achievements
Rank 1
 answered on 02 Feb 2011
10 answers
114 views
Hi, 

I'm using version 2010.2.826.40. 

My RadGrid exports work fine until I do a column sort or group. Then, when trying to export, the entire grid simply re-displays itself in the browser.

Here's my code.

Thanks much,
Dan Cogswell

<asp:EntityDataSource ID="edsEmployees" runat="server" ConnectionString="name=dbIT_Entities"
            DefaultContainerName="dbIT_Entities" EnableDelete="false" EnableInsert="False"
            EnableUpdate="False" EntitySetName="ActivePhoneLists" EnableFlattening="False"
            OrderBy="it.LastName, it.FirstName" />
        <asp:EntityDataSource ID="edsDepartments" runat="server" ConnectionString="name=dbIT_EmployeesEntities"
            DefaultContainerName="dbIT_EmployeesEntities" EntitySetName="Departments" EnableFlattening="False" />
        <telerik:RadGrid ID="rgEmployees" Skin="WebBlue" ShowGroupPanel="True" runat="server" DataSourceID="edsEmployees"
            AllowAutomaticDeletes="False" AllowAutomaticInserts="false" AllowAutomaticUpdates="false"
            AllowSorting="True" AllowFilteringByColumn="true" AutoGenerateColumns="False"
            GridLines="None" PagerStyle-Position="Top" AllowPaging="true" 
            ClientSettings-Scrolling-AllowScroll="false" ShowStatusBar="true" >
            <ClientSettings AllowGroupExpandCollapse="True" ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True">
                <Selecting AllowRowSelect="True" UseClientSelectColumnOnly="True" />
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            </ClientSettings>
            <GroupingSettings ShowUnGroupButton="true" />
            <ExportSettings HideStructureColumns="true" ExportOnlyData="true" IgnorePaging="true" 
            Pdf-PageLeftMargin=".5in"
            Pdf-PageRightMargin=".5in" Pdf-PageTitle="CMRP Phonebook" Pdf-PageHeight="8.5in" Pdf-PageWidth="11in"
            OpenInNewWindow="true"></ExportSettings>
            <MasterTableView DataKeyNames="EmployeeNumber" GroupLoadMode="Client" CommandItemDisplay="Top" >
                <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true" 
                    ShowExportToCsvButton="true" ShowExportToPdfButton="true" ShowAddNewRecordButton="false" />
                <HeaderStyle HorizontalAlign="Left" />
                <Columns>
                    <telerik:GridBoundColumn ReadOnly="true" DataField="EmployeeNumber" UniqueName="EmployeeNumber"
                        HeaderText="Employee Num" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="LastName" HeaderText="Last Name" ItemStyle-Width="80px"
                        HeaderStyle-Width="80px" FilterControlWidth="50px">
                        <HeaderStyle Width="80px" />
                        <ItemStyle Width="80px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" ItemStyle-Width="80px"
                        HeaderStyle-Width="80px" FilterControlWidth="50px">
                        <HeaderStyle Width="80px" />
                        <ItemStyle Width="80px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Phone" HeaderText="Phone" ItemStyle-Width="90px"
                        HeaderStyle-Width="90px" FilterControlWidth="50px">
                        <HeaderStyle Width="90px" />
                        <ItemStyle Width="90px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn UniqueName="DeptId" DataField="DeptId" HeaderText="Dept"
                        ItemStyle-Width="60px" HeaderStyle-Width="80px" FilterControlWidth="60px">
                        <FilterTemplate>
                            <telerik:RadComboBox ID="rcbDepartment" DataSourceID="edsDepartments" DataTextField="DeptId"
                                DataValueField="DeptId" AppendDataBoundItems="true" 
                                SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("DeptId").CurrentFilterValue %>'
                                runat="server" OnClientSelectedIndexChanged="DepartmentIndexChanged" Width="60px">
                                <Items>
                                    <telerik:RadComboBoxItem Text="All" />
                                </Items>
                            </telerik:RadComboBox>
                            <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
                                <script type="text/javascript">
                                    function DepartmentIndexChanged(sender, args) {
                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                        tableView.filter("DeptId", args.get_item().get_value(), "EqualTo");
                                    }
                                </script>
                            </telerik:RadScriptBlock>
                        </FilterTemplate>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Title" HeaderText="Title" MaxLength="250" ItemStyle-Width="150px"
                        HeaderStyle-Width="150px" FilterControlWidth="110px" ItemStyle-Wrap="false">
                        <HeaderStyle Width="150px" />
                        <ItemStyle Width="150px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Building" HeaderText="Building" ItemStyle-Width="125px"
                        HeaderStyle-Width="125px" FilterControlWidth="85px" ItemStyle-Wrap="false">
                        <HeaderStyle Width="125px" />
                        <ItemStyle Width="125px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Room" HeaderText="Room" ItemStyle-Width="100px"
                        HeaderStyle-Width="100px" FilterControlWidth="60px" ItemStyle-Wrap="false">
                        <HeaderStyle Width="100px" />
                        <ItemStyle Width="100px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CellPhone" HeaderText="CellPhone" ItemStyle-Width="90px"
                        HeaderStyle-Width="90px" FilterControlWidth="50px">
                        <HeaderStyle Width="90px" />
                        <ItemStyle Width="90px" />
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>

Daniel
Telerik team
 answered on 02 Feb 2011
2 answers
39 views
Hi,

I have a question regarding to the possibility of Microsoft office upgrade effects on RADcontrol?

We are using the following dll for our editor.
   - RadEditor Version = 5.6.4.0
   - RadSpell.dll Version = 2.6.1.0
We would like to upgrade our Microsoft office from 2003 to 2007.
Does it affect RADContorols?

Should we also retest our RADControl after upgrade or they are not using Microsoft office dlls?

Thank you in adavance,

Maryam
Top achievements
Rank 1
 answered on 02 Feb 2011
1 answer
117 views

I have to bind to Grid with huge data rows (List<customClsss) without paging.

this is my mission :<..
but when i tried this. the page is not work or too slowly display.
if i try to way to  client binding of web service, is it solve it? 
Daniel
Telerik team
 answered on 02 Feb 2011
12 answers
155 views
I have copied the VB code from the sample on Persisting the Grid state in a session.

however it is giving me compile errors when i try to view it. In Visual Studioacts like it builds but flags an erro on the User Control calling this class.

The Error Reported is
 
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
  
Compiler Error Message: BC30201: Expression expected.
  
Source Error:
  
Line 258:
Line 259:    Private Sub Grid_ColumnCreated(ByVal sender As Object, ByVal e As GridColumnCreatedEventArgs)
Line 260:        Dim colSettings As ColumnSettings = Settings.AutoGeneratedColumnSettings.Find(Function(cs) cs.UniqueName = e.Column.UniqueName)
Line 261:        Dim column As GridColumn = e.Column
Line 262:
  
  
Source File: C:\Documents and Settings\ddownie\My Documents\SasquatchV11\App_Code\GridSettingsPersister.vb    Line: 260

on this fuction:
Private Sub Grid_ColumnCreated(ByVal sender As Object, ByVal e As GridColumnCreatedEventArgs)
    Dim colSettings As ColumnSettings = Settings.AutoGeneratedColumnSettings.Find(Function(cs) cs.UniqueName = e.Column.UniqueName)
    Dim column As GridColumn = e.Column
    If colSettings IsNot Nothing Then
        SetColumnSettings(column, colSettings)
    End If
End Sub

can anyone see what i might have to change or is there an update for this call file ?

David
Top achievements
Rank 1
 answered on 02 Feb 2011
1 answer
51 views
I'm trying to show/hide a loading panel based on what control made the request.  My javascript is as follows:

var objLoadingPanel = "";
var objPageRequestManager = Sys.WebForms.PageRequestManager.getInstance();
objPageRequestManager.add_initializeRequest(RequestInitializing);
objPageRequestManager.add_endRequest(RequestEnding);
function RequestInitializing(sender, eventArgs) {
    objLoadingPanel = $find("<%=lpLoadingPanel.ClientID%>");
    if (eventArgs.get_eventTarget() == "<%=btnRefresh_SpendingStatus.ClientID%>") objUpdatedControl = "<%=lblChart_Status.ClientID%>";
    //show the loading panel over the updated control
    objLoadingPanel.show(objUpdatedControl);
    //objLoadingPanel.show("<%=lblChart_Status.ClientID%>");
}
function RequestEnding(sender, eventArgs) {
    if (objLoadingPanel) objLoadingPanel.hide(objUpdatedControl);
    objUpdatedControl = null;
    objLoadingPanel = null;
}

However, when I click the "btnRefresh_SpendingStatus" button, I get the following error: "Object doesn't support this property or method".  Am I missing something?  Thanks.
Ryan
Top achievements
Rank 1
 answered on 02 Feb 2011
2 answers
429 views
Hi,
i have a RadCalendar control on my page.
I am trying to set a RadCalendar selected date as March 15, 2011
but always shows February month
what i am doing wrong..?

here is my code
<telerik:RadCalendar runat="server" ID="RadCalendar1" ShowOtherMonthsDays="false" 
      EnableMonthYearFastNavigation="true" AutoPostBack="true">
</telerik:RadCalendar>

protected void Page_Load(object sender, EventArgs e)
  {          
     RadCalendar1.SelectedDate = DateTime.Parse("2011-03-15 11:02:00.000");
     //RadCalendar1.SelectedDate = DateTime.Parse("03/15/2011");
  }


can any one help me?
Venkata
Top achievements
Rank 1
 answered on 02 Feb 2011
2 answers
142 views
Hi,

I am trying to access the text box in a radgrid and pass the values of the selected row in the grid with the new value in the textbox to a radwindow which is opened when a button in the same row is clicked. 

I am using the following code

aspx:
function ShowDispatchNote(rowIndex, MediaID, ReferenceText) {
                var grid = $find("<%= rgBookoutMedia.ClientID %>");
                var firstDataItem = $find("<%=rgBookoutMedia.ClientID %>").get_masterTableView().get_dataItems()[rowIndex];
                var MediaID = firstDataItem.getDataKeyValue("MediaID");
                var masterTable = grid.get_masterTableView();
                for (var i = 0; i < masterTable.get_dataItems().length; i++) {
                    // to access the textbox in each row 
                    var txtbx = masterTable.get_dataItems()[i].findElement("rtbReference");
                    // set alert 
                }
                window.radopen("DispatchNote.aspx?MediaID=" + MediaID + "&ReferenceText=" + txtbx.Text, "RadWindow1");
                return false;
            }


cs:
if (e.Item is GridDataItem)
            {
                GridDataItem dataItem = rgBookoutMedia.NamingContainer as GridDataItem;
                Button btnConfirm = (Button)e.Item.FindControl("btnConfirm");
                RadTextBox rtbReference = (RadTextBox)e.Item.FindControl("rtbReference");
                btnConfirm.Attributes["onclick"] = String.Format("return ShowDispatchNote('{0}','{1}');", e.Item.ItemIndex, e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["MediaID"], rtbReference.Text);
            }

I am able to get the value of MediaID as I have specified it as DataKeyNames in the MasterTableView. The other query string ReferenceText shows up as undefined always. How do I get the value of the textbox with new values in the client side before opening the rad window.

The example in http://www.telerik.com/community/code-library/aspnet-ajax/grid/accessing-server-controls-in-a-grid-template-on-the-client.aspx doesn't satisfy my criteria. Can anyone show me a code sample on how to pass the new textbox value to the radwindow.

Thanks
Prithvi
Prithvi
Top achievements
Rank 1
 answered on 02 Feb 2011
1 answer
124 views
Hi Telerik,

So, I am creating a web portal and it is mainly composed of dynamically created controls. There is a RadSplitter which holds panes which are resizable through the use of the RadSplitBar.

The issue is this: If I have LiveResize turned on -- the user grabs aholds of the RadSplitBar and drags it around. This cause's the client-side OnClientResized event to fire...a lot, I believe. Yet, it looks all normal. No lag or anything after the resize finishes and nothing seems to be hanging. Then, I dynamically create a new control on the page and throw up a loading icon as it generates. The amount of movement of the RadSplitBar seems to be correlated to the amount of time it takes the control to appear on the screen. If LiveResize is off, I see no real issues. If I move the RadSplitBar only a little then the control is created in ~5 seconds. If I grab the RadSplitBar and drag around wildly -- the control never seems to create and the program hangs with a loading panel.

I'm looking for a solution to this as our web dashboard is fairly interactive and it would be nice to see the changes live.

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server" >
    <script type="text/javascript">
        function OnClientResized(pane, args) {
            var context = new Object();
            var paneIDandHeightandWidth = pane.get_id() + ',' + pane.get_height() + ',' + pane.get_width();
            //Context is just thrown away.
            CallSetDimensions(paneIDandHeightandWidth, context);
        }
 
        function CallbackOnSucceeded(result, context) {
        //Logging
        }
 
        function CallbackOnFailed(result, context) {
        //Logging
        }
    </script>
</telerik:RadCodeBlock>

The dynamically created RadPane's set their OnClientResized event to this OnClientResized function.

Server-side code:

protected void Page_Load(object sender, EventArgs e)
{
    RegisterCallBackReference();
}
 
private void RegisterCallBackReference()
{
    String callBack = Page.ClientScript.GetCallbackEventReference(this, "arg", "CallbackOnSucceeded", "context", "CallbackOnFailed", true);
    String clientFunction = "function CallSetDimensions(arg, context){ " + callBack + "; }";
    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "Call To Server", clientFunction, true);
}
 
#region ICallbackEventHandler Members
String returnValue;
string ICallbackEventHandler.GetCallbackResult()
{
    return returnValue;
}
 
void ICallbackEventHandler.RaiseCallbackEvent(string eventArgument)
{
    bool result = SetDimensions(eventArgument);
 
    if (result)
    {
        returnValue = "Success.";
    }
    else
    {
        returnValue = "Failure.";
    }
}
#endregion
 
private bool SetDimensions(string args)
{
    bool saveSuccessful = false;
 
    string[] paneIDandHeightandWidth = args.Split(',');
    string paneID = paneIDandHeightandWidth[0];
 
    int paneHeight = 0;
    int.TryParse(paneIDandHeightandWidth[1], out paneHeight);
 
    int paneWidth = 0;
    int.TryParse(paneIDandHeightandWidth[2], out paneWidth);
 
    RadPane pane = Utilities.FindControlRecursive(Page, paneID) as RadPane;
 
    if (!object.Equals(pane, null))
    {
        saveSuccessful = true;
        RadPaneSetting paneSetting = RadPaneSetting.GetSettings(pane);
        pane.Height = new Unit(paneHeight, UnitType.Pixel);
        pane.Width = new Unit(paneWidth, UnitType.Pixel);
        controlSave.SavePane(pane);
    }
 
    return saveSuccessful;
}


Sorry this code isn't exactly..standard. I need to be able to call SavePane after updating a pane's properties so that Session is aware of the updates. Then, when the page reinitializes I get pane's that maintain their resized-ness.

Does this all make sense? Is there anything I can do here? Something like... detect that more re-sizes have occurred (e.g. the user hasn't let go of the RadSplitBar yet) and only call my event after all the resizing is done? I only need to save the pane state at the end of all the movement. 
Dobromir
Telerik team
 answered on 02 Feb 2011
2 answers
135 views
Hi to all.

I'm trying to use the RadProgressArea, but I get an error alert message (attached screen).

I'm going to this help topic http://www.telerik.com/help/aspnet/upload/raduploadprogresshandler.html and I try to follow the instructions, but I'm still having errors, then in the web config (attached screen again). I have the 2010 Q1 version installed of ASP.NET AJAX controls and I only have the Telerik.Web.UI.dll and the Telerik.Web.Design.dll files.

What I have to do?

Thanks in advance and happy new year.

Jesús
Jesús
Top achievements
Rank 1
 answered on 02 Feb 2011
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?