Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
356 views
Hi,

I am working on a rather large web app that has separate instances of the same web user control used on multiple steps of an ASP.NET Wizard control.

I am triggering an ajax postback via javascript:

 

var manager = $find("<%=RadAjaxManager.GetCurrent(Page).ClientID %>");
var textBoxId = "<%= txtSearchFilter.UniqueID %>";
if (manager && textBoxId) {
    manager.ajaxRequestWithTarget(textBoxId, searchText);
}

 

 

 

The web user control's markup contains the following:

 

<telerik:RadAjaxManagerProxy ID="radAjaxManagerListSelections" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="txtSearchFilter">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="lstBxAvailableItems" LoadingPanelID="radLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="lstBxAvailableItems">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="lstBxSelectedItems" LoadingPanelID="radLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="lstBxAvailableItems" LoadingPanelID="radLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="lstBxSelectedItems">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="lstBxSelectedItems" LoadingPanelID="radLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="lstBxAvailableItems" LoadingPanelID="radLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
  
<telerik:RadAjaxLoadingPanel ID="radLoadingPanel1" runat="server" Skin="Sitefinity" MinDisplayTime="1000">
</telerik:RadAjaxLoadingPanel>

The problem I'm experiencing is that the loading panel shows up correctly in the first step of the wizard, but on subsequent steps that utilize the same web user control, the loading panel does not show up.

All data posts correctly on the subsequent steps, but the loading panels do not display. My first thought was that the code was getting confused with the control clientIDs, but it appears as if the rendering for each step is putting the right id values into my javascript server blocks. I'm not sure how to verify that the loading panel is targeted to the correct clientID values though when looking at the source for the rendered page.

I am removing the loading panels for now to keep the look and feel uniform for each step, but I would really like to solve this problem as the loading panels definitely add something to the user experience.

Thanks,

Charlie

Charles
Top achievements
Rank 1
 answered on 01 Jun 2012
1 answer
85 views
I am having an Ajax Loading Panel display on sorting a RadGrid and put a MinDisplayTime on the Loading Panel. When I sort, the loading image starts to animates, stops briefly when the request is finished then restarts to complete the MinDisplayTime. Is there anyway to prevent the slight shutter from occurring when the request is complete?
Andrey
Telerik team
 answered on 01 Jun 2012
1 answer
276 views
1.index.aspx

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
<title>WebForm Editor Customize Content Area</title>
<style type="text/css">html, body, form { height:100%; margin:0px; padding:0px; }</style>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
function OnClientLoaded() {
var pane = $find("<%=RadSplitter1.ClientID%>");
var editor = $find("<%=RadEditor1.ClientID %>");
var newHeight = pane.get_height();
var newWidth = pane.get_width()-4;
editor.setSize(newWidth, newHeight);
}
</script>
</telerik:RadCodeBlock>
<telerik:RadSplitter ID="RadSplitter1" runat="server" VisibleDuringInit="false" Width="100%" Height="100%" OnClientLoaded="OnClientLoaded" OnClientResized="OnClientLoaded">
<telerik:RadPane ID="RadPane1" runat="server" Scrolling="None">
<telerik:RadEditor ID="RadEditor1" runat="server" NewLineMode="P" Width="100%" Height="100%" ContentAreaMode="Iframe" style="display:inline-block;"
ContentAreaCssFile="~/css/EditorContentAreaStyles.css">
<Modules>
<telerik:EditorModule Name="RadEditorDomInspector" Enabled="false" />
<telerik:EditorModule Name="RadEditorHtmlInspector" Enabled="false" />
<telerik:EditorModule Name="RadEditorNodeInspector" Enabled="false" />
<telerik:EditorModule Name="RadEditorStatistics" Enabled="false" />
<telerik:EditorModule Name="RadEditorTrackChangesInfo" Enabled="false" />
</Modules>
<Content></Content>
</telerik:RadEditor>
</telerik:RadPane>
</telerik:RadSplitter>
</form>
</body>
</html>

2.EditorContentAreaStyles.css


html {
background-color: #555 !important; }
body {
background-color: #FFFFFF !important; margin: 20px !important; padding: 20px !important; }
  • Problem:

in index.aspx file, when html, body, form { height:100% }, and Radeditor1's ContentAreaCssFile: EditorContentAreaStyles.css, its height will be inherited as default value from index.aspx.
so in iframe, body's height is less than length of the text in editor.
when i remove height:100% from index.aspx, it work fine.
thanks.
Rumen
Telerik team
 answered on 01 Jun 2012
3 answers
839 views
I have a Javascript function that opens a radwindow and then tries to call a function in that window.  It seems liek this should be pretty easy, but I can't get it to call that function.  Here's the calling function:

function openNewWindow(agentID, contractID, company)
            {
                var tabs = tabStrip.get_tabs();
                var tabval = 0;
                var tabFound = false;
                // loop through the tabs looking for existing agent
                for (var i = 0; i < tabs.get_count(); i++) {
                    tabval = tabs.getTab(i).get_value();
                    if (tabval == agentID) {
                        tabFound = true;
                        var oWnd = tabs.getTab(i).correspondingWnd;
                        break;
                    }
                }
                // if agent is already open, alert user and don't open again
                if (tabFound == false) {
                    var oWnd = radopen("AgentWin.aspx?HeaderID=" + agentID, null);
                    oWnd.set_title(agentID);
                    oWnd.maximize();
                    tabStrip.trackChanges();
                    //create a new tab
                    var tab = new Telerik.Web.UI.RadTab();
                    //set the text of the tab
                    tab.set_text(agentID);
                    oWnd.correspondingTab = tab;
                    //add the tab to the tabstrip
                    tabStrip.get_tabs().add(tab);
                    tabStrip.repaint();
                    tab.correspondingWnd = oWnd;
                    tabStrip.commitChanges();
                    //Select this tab
                    tab.select();
                    
                    oWnd.get_contentFrame().contentWindow.CallContractsWindow(agentID, contractID, company);
                }
            }


Since I open the radwindow in this function, I already have have the reference to it (oWnd), so I thought I could just use that last line to call a function in the opened window.  But that last line gives me - "Error: Object doesn't support this property or method"

Can anyone tell me what I'm doing wrong?  Thanks!


Marin Bratanov
Telerik team
 answered on 01 Jun 2012
1 answer
64 views
Hi,

We have a RadGrid with Groupable columns, when the user group all the GroupHeaders has a white background with more height of usual like the first picture (CorrectLayout.jpg). When i Turn off the "AllowScroll=False" the GroupHeader layout behavior is correct for all the groups.

RadGrid aspx code:
<telerik:RadGrid ID="gridProductStore" runat="server" Skin="Windows7" AutoGenerateColumns="False"
             AllowPaging="True" AllowSorting="True" PageSize="8" 
             OnNeedDataSource="gridProductStore_NeedDataSource"
             ShowGroupPanel="true">
            <ExportSettings ExportOnlyData="True" IgnorePaging="True" HideStructureColumns="true"
                FileName="ProductStoreReport">
            </ExportSettings>
            <ClientSettings EnableRowHoverStyle="true"
                AllowDragToGroup="true"
                AllowGroupExpandCollapse="True">
                <Scrolling AllowScroll="False" UseStaticHeaders="True"></Scrolling>
            </ClientSettings>
            <GroupingSettings ShowUnGroupButton="true" />
            <MasterTableView CommandItemDisplay="Top"
                TableLayout="Auto"
                BorderStyle="None"
                ClientDataKeyNames="ProductStoreID"
                HeaderStyle-Wrap="true"
                HeaderStyle-HorizontalAlign="Center"
                ItemStyle-HorizontalAlign="Center"
                AlternatingItemStyle-HorizontalAlign="Center" >
                <CommandItemSettings ShowAddNewRecordButton="false" ShowExportToExcelButton="true">
                </CommandItemSettings>
                <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                </RowIndicatorColumn>
                <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="ProductStoreID" DataType="System.Int64" Visible="false"
                        FilterControlAltText="Filter ProductStoreID column" HeaderText="ProductStoreID"
                        SortExpression="ProductStoreID" UniqueName="ProductStoreID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ProductID" DataType="System.Int32" Visible="false"
                        FilterControlAltText="Filter ProductID column" HeaderText="ProductID"
                        SortExpression="ProductID" UniqueName="ProductID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="BatchID" DataType="System.Int64" HeaderStyle-Width="70px"
                        FilterControlAltText="Filter BatchID column" HeaderText="Batch N°"
                        SortExpression="BatchID" UniqueName="BatchID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ProductName" HeaderStyle-Width="180px"
                        FilterControlAltText="Filter ProductName column" HeaderText="Product Name"
                        SortExpression="ProductName" UniqueName="ProductName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ClaimCode" Groupable="false" HeaderStyle-Width="100px"
                        FilterControlAltText="Filter ClaimCode column" HeaderText="Claim Code"
                        SortExpression="ClaimCode" UniqueName="ClaimCode">
                    </telerik:GridBoundColumn>
                    <telerik:GridCheckBoxColumn DataField="IsSold" DataType="System.Boolean" Groupable="false" HeaderStyle-Width="70px"
                        FilterControlAltText="Filter IsSold column" HeaderText="Is Sold"
                        SortExpression="IsSold" UniqueName="IsSold">
                    </telerik:GridCheckBoxColumn>
                    <telerik:GridBoundColumn DataField="ExpirationDate" DataType="System.DateTime" Groupable="false"
                        FilterControlAltText="Filter ExpirationDate column" HeaderText="Expiration Date"
                        SortExpression="ExpirationDate" UniqueName="ExpirationDate">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="UploadedDate" DataType="System.DateTime" Groupable="false"
                        FilterControlAltText="Filter UploadedDate column" HeaderText="Uploaded Date"
                        SortExpression="UploadedDate" UniqueName="UploadedDate">
                    </telerik:GridBoundColumn>
                </Columns>
                <EditFormSettings>
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                    </EditColumn>
                </EditFormSettings>
                <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" Position="Bottom" />
                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                <AlternatingItemStyle HorizontalAlign="Center"></AlternatingItemStyle>               
                <HeaderStyle HorizontalAlign="Center" Wrap="True"></HeaderStyle>
            </MasterTableView>
        </telerik:RadGrid>


Hope you can help me with this.

Best Regards,
Eyup
Telerik team
 answered on 01 Jun 2012
5 answers
151 views
I am using Visual Studio 2008.  I have several projects using Telerik TabStrips with multipage controls.  I always work on designing the page in "Split" mode where the source is at the top of the screen and the design view is at the bottom.

One thing I find annoying is when I am working on a project, and I want to select a particular button, label, table row, or whatever within one of the PageViews.  Instead of the Source jumping me to that element and highlighting it as expected, instead I am jumped to the top of the PageView that element is contained within and the entire PageView is highlighted.  I then have to manually scroll down and find the element I was trying to access by sight.

Is there a setting or something I can do so Visual Studio will select the element contained within the PageView and not the entire PageView itself?
Kevin
Top achievements
Rank 1
 answered on 01 Jun 2012
6 answers
323 views
Hey everyone

I am using a radgrid and some GridDropDownColumns for displaying possible values when the user selects the edit command button. The problem is that the grid is displaying some values as it is supposed and others not, I am binding the grid programmatically at the code behind and sending a dataset with the values for the Master Table and for the drop down columns. The problem is only in the display, in edit mode the grid is working fine, I'm able to show the possible values in the columns as wondered.

here is the code...

aspx:

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"

        GridLines="None" MasterTableView-NoMasterRecordsText="No hay registros que mostrar">

        <MasterTableView DataKeyNames="ProductoId" Name="Productos" EditMode="InPlace">

        <Columns>

        <telerik:GridNumericColumn UniqueName="columnProductoId" HeaderText="ProductoId" DataField="ProductoId" Visible="false"></telerik:GridNumericColumn>

       

        <telerik:GridDropDownColumn UniqueName="columnTipoProducto"></telerik:GridDropDownColumn>

        <telerik:GridDropDownColumn UniqueName="columnPaisMoneda"></telerik:GridDropDownColumn>

        <telerik:GridDropDownColumn UniqueName="columnEstado"></telerik:GridDropDownColumn>

        <telerik:GridDropDownColumn UniqueName="columnOperador"></telerik:GridDropDownColumn>

       

        <telerik:GridBoundColumn UniqueName="columnDescripcion" HeaderText="Descripcion" DataField="Descripcion">

        </telerik:GridBoundColumn>

        <telerik:GridNumericColumn  UniqueName="columnValor" HeaderText="Valor" DataField="Valor">

        </telerik:GridNumericColumn>

       

        <telerik:GridDateTimeColumn UniqueName="columnFechaRegistro" HeaderText="Fecha de Registro" DataField="FechaRegistro">

        </telerik:GridDateTimeColumn>

        <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" EditText="Editar">

        </telerik:GridEditCommandColumn>

        <telerik:GridButtonColumn CommandName="Delete" ConfirmDialogType="RadWindow" ConfirmText="Está seguro de que desea eliminar este producto?" Text="Eliminar" UniqueName="DeleteColumn">

        </telerik:GridButtonColumn>

        </Columns>

            <RowIndicatorColumn>

                <HeaderStyle Width="20px" />

            </RowIndicatorColumn>

            <ExpandCollapseColumn>

                <HeaderStyle Width="20px" />

            </ExpandCollapseColumn>

        </MasterTableView>

    </telerik:RadGrid>

vb code behind:

Private Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource

        Try

            Me.RadGrid1.DataSource = Me.FuenteDatosGrillaPinesProducto

            'here is where i send the dataset with all the DataTable               needed

            Me.RadGrid1.DataMember = "Tabla Pines Producto"

            Dim columna As GridDropDownColumn

 

            columna = Me.RadGrid1.Columns(1)

            With columna

                .DataSourceID = Me.RadGrid1.DataSourceID

                .HeaderText = "Tipo de producto"

                .DataField = "TipoProductoId"

                .ListTextField = "Descripcion"

                .ListValueField = "TipoProductoId"

                .DataSourceID = "Pines Productos"

                .ListDataMember = "Tabla Tipos Producto"

            End With

 

            columna = Me.RadGrid1.Columns(2)

            With columna

                .DataSourceID = Me.RadGrid1.DataSourceID

                .HeaderText = "Pais"

                .DataField = "PaisMonedaId"

                .ListTextField = "Descripcion"

                .ListValueField = "PaisId"

                .DataSourceID = "Pines Productos"

                .ListDataMember = "Tabla Paises"

            End With

 

            columna = Me.RadGrid1.Columns(3)

            With columna

                .DataSourceID = Me.RadGrid1.DataSourceID

                .HeaderText = "Estado"

                .DataField = "EstadoId"

                .ListTextField = "Descripcion"

                .ListValueField = "EstadoId"

                .DataSourceID = "Pines Productos"

                .ListDataMember = "Estados"

            End With

 

            columna = Me.RadGrid1.Columns(4)

            With columna

                .DataSourceID = Me.RadGrid1.DataSourceID

                .HeaderText = "Operador"

                .DataField = "OperadorId"

                .ListTextField = "Descripcion"

                .ListValueField = "OperadorID"

                .DataSourceID = "Pines Productos"

                .ListDataMember = "Tabla Operadores"

            End With

 

        Catch ex As Exception

 

        End Try

    End Sub

the result is something like this:
Tipo de producto   Pais            Estado                 Operador     Descripcion   Valor   Fecha Registro
PINEs                     Colombia    Producto Activo   Operador1   Pin de 500     500     13/03/2009
                                                                                                 Pin de 1000  1000    13/03/2009
PINEs                     Venezuela   Producto Activo   Operador1  Pin de 500     500     13/03/2009

as you can see the second row doesn't show anything on the columns that are grid drop down columns.

I don't know if you got the idea of my problem so far, thanks for your time
Tsvetoslav
Telerik team
 answered on 01 Jun 2012
4 answers
310 views
Hello team

I've the following code for exporting a grid in various formats.

            if (ddlRBExportFormat.SelectedValue.Equals("MSExcel", StringComparison.InvariantCultureIgnoreCase)) 
            { 
                rgReportBuilder.MasterTableView.ExportToExcel(); 
            } 
            else if (ddlRBExportFormat.SelectedValue.Equals("MSWord", StringComparison.InvariantCultureIgnoreCase)) 
            { 
                rgReportBuilder.MasterTableView.ExportToWord(); 
            } 
            else if (ddlRBExportFormat.SelectedValue.Equals("PDF", StringComparison.InvariantCultureIgnoreCase)) 
            { 
                rgReportBuilder.MasterTableView.ExportToPdf(); 
            } 
            else if (ddlRBExportFormat.SelectedValue.Equals("CSV", StringComparison.InvariantCultureIgnoreCase)) 
            { 
                rgReportBuilder.MasterTableView.ExportToCSV(); 
            } 

I've huge number of records in the grid. When i do an export i get OutOfMemoryException. Is there a workaround to eliminate this error?

Thank you

Regards
NLV

Jayesh Goyani
Top achievements
Rank 2
 answered on 01 Jun 2012
1 answer
74 views
Hi,

From the example on this page http://demos.telerik.com/aspnet-ajax/scheduler/examples/optimizedqueries/defaultcs.aspx# 

SELECT * FROM [Appointments] WHERE ([Start] < @RangeEnd AND [End] > @RangeStart) OR ([RecurrenceRule] <> '') OR ([RecurrenceParentID] IS NOT NULL) 

I see that the select statement retrieved recurring events events using [RecurrenceRule] <> '' which is good. My question is why do you need the "OR ([RecurrenceParentID] IS NOT NULL)" ? From what I understand, an appointment has RecurrenceParentID only when it's modified from a recurring series and then a new row in Appointments table will be created. The first where clause (start < @rangeEnd...) should already retrieve those in the visible start/end. If you include the RecurrenceParentID IS NOT NULL wouldn't that unnecessary retrieve more appointments than needed?

Thanks
 

Plamen
Telerik team
 answered on 01 Jun 2012
1 answer
79 views
Hi,
I am binding ResourceType  from code behind

ResourceType rt = new ResourceType("UserCalender");          
rt.ForeignKeyField = "UserTypeId";
rt.KeyField = "UserTypeId";
rt.TextField = "UserTypeName";         
rt.DataSource = GetUserTypes();
RadScheduler1.ResourceTypes.Add(rt);

on my New Appointment window shows extra "-" item.
I do not want that Extra  "-" item in my combobox.  
How do i remove that?

Plamen
Telerik team
 answered on 01 Jun 2012
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?