Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
300 views
Hi,
I have this requirement of displaying the LoadingPanel  for all post backs in the website's content pages. So what I did is to add the RadAjaxLoadingPanel  on top of the ContentPlaceHolder of the master page as shown below. This is working for even user control's post back in the content page in my test application. So I wanted to know if the approach is correct or in future I will get some issues with this approach not working for some controls or something? Can you please point out any disadvantages of this approach ?

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>

<%@ 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">
    <title></title>
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
     <telerik:RadAjaxManager ID="RadAjaxManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1" runat="server">
        </telerik:RadAjaxManager>
       <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Office2007"
   IsSticky="true" style="position:absolute; top:0; left:0; height:100%; width:100%" >
   Loading...
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1" runat="server" Height="200px" Width="300px">
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
        
        </asp:ContentPlaceHolder>
        </telerik:RadAjaxPanel>
    </div>
    
    </form>
</body>
</html>
Maria Ilieva
Telerik team
 answered on 30 May 2012
8 answers
257 views

Followed the instructions provided in the following link, http://www.telerik.com/help/aspnet-ajax/moss-sp2010-different-configuration-files-for-different-webs.html, however the RadEditor does not display the appropriate css classes in the dropdown.  I'm pretty certain I've missed something, but am not sure what.
Rumen
Telerik team
 answered on 30 May 2012
5 answers
203 views

 

 

 

I would really appreciate assistance with this one I'm have an issue to dynamically updating the dropdown in the FormTemplate. I need to wire up the events and retrieve the values.

Thanks in advance.

<

 

 

telerik:RadGrid ID="radgvLocation" runat="server" CssClass="RadGrid" GridLines="None"

 

 

 

 

 

 

 

AllowPaging="True" PageSize="15" AllowSorting="True" AutoGenerateColumns="False"

 

 

 

 

 

 

 

ShowStatusBar="true" AllowAutomaticDeletes="false" AllowAutomaticInserts="false"

 

 

 

 

 

 

 

AllowAutomaticUpdates="false" HorizontalAlign="NotSet" Skin="Vista" OnInsertCommand="radgvLocation_InsertCommand"

 

 

 

 

 

 

 

OnNeedDataSource="radgvLocation_NeedDataSource" OnUpdateCommand="radgvLocation_UpdateCommand"

 

 

 

 

 

 

 

OnDeleteCommand="radgvLocation_DeleteCommand" OnItemDataBound="radgvLocation_ItemDatabound" OnDetailTableDataBind="radgvLocation_DetailTableDataBind">

 

 

 

 

 

 

 

 

<MasterTableView CommandItemDisplay="Top" DataKeyNames="LocationID" EditMode="PopUp">

 

 

 

 

 

 

 

<CommandItemTemplate>

 

 

 

 

 

 

 

<telerik:RadToolBar ID="RadToolBar1" OnButtonClick="RadToolBar1_ButtonClick" runat="server"

 

 

 

 

 

 

 

Skin="Vista" Visible='<%# radgvLocation.EditIndexes.Count == 0 %>' CommandName="EditSelected"

 

 

 

 

 

 

 

OnClientButtonClicking="onToolBarClientButtonClicking">

 

 

 

 

 

 

 

<Items>

 

 

 

 

 

 

 

<telerik:RadToolBarButton Text="Add new" CommandName="InitInsert" ImageUrl="~/Images/AddRecord.gif"

 

 

 

 

 

 

 

Visible='<%# !radgvLocation.MasterTableView.IsItemInserted %>'>

 

 

 

 

 

 

 

</telerik:RadToolBarButton>

 

 

 

 

 

 

 

<telerik:RadToolBarButton Text="Edit selected" CommandName="EditSelected" ImageUrl="~/Images/Edit.gif">

 

 

 

 

 

 

 

</telerik:RadToolBarButton>

 

 

 

 

 

 

 

<telerik:RadToolBarButton Text="Delete" CommandName="DeleteSelected" ImageUrl="~/Images/Delete.gif">

 

 

 

 

 

 

 

</telerik:RadToolBarButton>

 

 

 

 

 

 

 

<telerik:RadToolBarButton Text="Refresh" CommandName="RebindGrid" ImageUrl="~/Images/Refresh.gif">

 

 

 

 

 

 

 

</telerik:RadToolBarButton>

 

 

 

 

 

 

 

</Items>

 

 

 

 

 

 

 

</telerik:RadToolBar>

 

 

 

 

 

 

 

</CommandItemTemplate>

 

 

 

 

 

 

 

<SortExpressions>

 

 

 

 

 

 

 

<telerik:GridSortExpression FieldName="LocationID" SortOrder="Descending" />

 

 

 

 

 

 

 

</SortExpressions>

 

<

 

 

CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>

 

 

 

 

 

 

 

<Columns>

 

 

 

 

 

 

 

<telerik:GridTemplateColumn UniqueName="SNo" HeaderText="SNo.">

 

 

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

 

 

<asp:Label ID="lblSno" runat="server"></asp:Label>

 

 

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

 

 

<HeaderStyle Width="30px" />

 

 

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

 

 

<telerik:GridBoundColumn UniqueName="LocationCode" HeaderText="LocationCode" DataField="LocationCode">

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

<telerik:GridBoundColumn UniqueName="LocationName" HeaderText="LocationName" DataField="LocationName">

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

<telerik:GridBoundColumn UniqueName="Address1" HeaderText="Address1" DataField="Address1">

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

<telerik:GridBoundColumn UniqueName="Address2" HeaderText="Address2" DataField="Address2">

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

<telerik:GridBoundColumn UniqueName="City" HeaderText="City" DataField="CityName">

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

<telerik:GridBoundColumn UniqueName="State" HeaderText="State" DataField="StateName">

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

<telerik:GridBoundColumn UniqueName="ZipCode" HeaderText="ZipCode" DataField="ZipCodeName">

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

<telerik:GridBoundColumn UniqueName="Phone" HeaderText="Phone" DataField="Phone">

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

<telerik:GridBoundColumn UniqueName="Fax" HeaderText="Fax" DataField="Fax">

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

</Columns>

 

 

 

 

 

 

 

<EditFormSettings InsertCaption="Add new item" CaptionFormatString="Edit Location ID: {0}"

 

 

 

 

 

 

 

CaptionDataField="LocationID" PopUpSettings-Width="560" EditFormType="Template"

 

 

 

 

 

 

 

PopUpSettings-Modal="true">

 

 

 

 

 

 

 

<FormTemplate>

 

 

 

 

 

 

 

<table id="Table1" cellspacing="1" cellpadding="1" class="popuptbl" width="520" border="0">

 

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

 

<td>

 

 

 

 

 

Location Code :

 

 

</td>

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

<telerik:RadTextBox Width="160px" ID="radtxtLocationCode" runat="server" Text='<%# Bind( "LocationCode") %>'

 

 

 

 

 

 

 

EmptyMessage="type here" >

 

 

 

 

 

 

 

</telerik:RadTextBox>

 

 

 

 

 

 

 

</td>

 

 

 

 

 

 

 

<td>

 

 

 

 

 

Location Name :

 

 

</td>

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

<telerik:RadTextBox Width="160px" ID="radtxtLocationName" runat="server" Text='<%# Bind( "LocationName") %>'

 

 

 

 

 

 

 

EmptyMessage="type here" >

 

 

 

 

 

 

 

</telerik:RadTextBox>

 

 

 

 

 

 

 

</td>

 

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

 

<td>

 

 

 

 

 

Address 1 :

 

 

</td>

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

<telerik:RadTextBox Width="160px" ID="radtxtAddress1" runat="server" Text='<%# Bind( "Address1") %>'

 

 

 

 

 

 

 

EmptyMessage="type here" >

 

 

 

 

 

 

 

</telerik:RadTextBox>

 

 

 

 

 

 

 

</td>

 

 

 

 

 

 

 

<td>

 

 

 

 

 

Address 2 :

 

 

</td>

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

<telerik:RadTextBox Width="160px" ID="radtxtAddress2" runat="server" Text='<%# Bind( "Address2") %>'

 

 

 

 

 

 

 

EmptyMessage="type here" >

 

 

 

 

 

 

 

</telerik:RadTextBox>

 

 

 

 

 

 

 

</td>

 

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

 

<td>

 

 

 

 

 

Country :

 

 

</td>

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

<telerik:RadComboBox ID="radcmbCountry" Width="160px"

 

 

 

DataTextField="CountryName" SelectedValue='<%# Bind( "CountryID") %>'

 

 

 

 

 

 

 

DataValueField="CountryID" AppendDataBoundItems="true" DataSourceID="DsCountrySelect"

 

 

 

 

 

 

 

AllowCustomText="false" AutoCompleteSeparator="" MarkFirstMatch="true"

 

 

 

runat="server" onselectedindexchanged="radcmbCountry_SelectedIndexChanged">

 

 

 

 

 

 

 

</telerik:RadComboBox>

 

 

 

 

 

 

 

 

</td>

 

 

 

 

 

 

 

<td>

 

 

 

 

 

State :

 

 

</td>

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

 

<telerik:RadComboBox ID="radcmbState" oncontextmenu="return false"

 

 

 

Width="160px" SelectedValue='<%# Bind( "StateID") %>'

 

 

 

 

 

 

 

runat="server" DataTextField="Name" DataValueField="StateID"

 

 

 

 

 

 

 

AppendDataBoundItems="true" DataSourceID="DsStateSelect" AllowCustomText="false"

 

 

 

 

 

 

 

AutoCompleteSeparator="" MarkFirstMatch="true"

 

 

 

onselectedindexchanged="radcmbState_SelectedIndexChanged" >

 

 

 

 

 

 

 

</telerik:RadComboBox>

 

 

 

 

 

 

 

</td>

 

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

 

<td>

 

 

 

 

 

City :

 

 

</td>

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

 

<telerik:RadComboBox ID="radcmbCity" Width="163px" DataTextField="CityName" SelectedValue='<%# Bind( "CityID") %>'

 

 

 

 

 

 

 

DataValueField="CityID" AppendDataBoundItems="true" DataSourceID="DsCitySelect"

 

 

 

 

 

 

 

AllowCustomText="false" AutoCompleteSeparator="" MarkFirstMatch="true" runat="server">

 

 

 

 

 

 

 

</telerik:RadComboBox>

 

 

 

 

 

 

 

</td>

 

 

 

 

 

 

 

<td>

 

 

 

 

 

ZipCode :

 

 

</td>

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

 

<telerik:RadComboBox ID="radcmbZipCode" Width="163px" DataTextField="ZipCodeName" SelectedValue='<%# Bind( "ZipcodeID") %>'

 

 

 

 

 

 

 

DataValueField="ZipCodeID" AppendDataBoundItems="true" DataSourceID="DsZipCodeSelect"

 

 

 

 

 

 

 

AllowCustomText="false" AutoCompleteSeparator="" MarkFirstMatch="true" runat="server">

 

 

 

 

 

 

 

</telerik:RadComboBox>

 

 

 

 

 

 

 

</td>

 

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

 

<td>

 

 

 

 

 

Phone :

 

 

</td>

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

<telerik:RadTextBox Width="160px" ID="RadTextBox1" runat="server" Text='<%# Bind( "Phone") %>'

 

 

 

 

 

 

 

EmptyMessage="type here" >

 

 

 

 

 

 

 

</telerik:RadTextBox>

 

 

 

 

 

 

 

</td>

 

 

 

 

 

 

 

<td>

 

 

 

 

 

Fax :

 

 

</td>

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

<telerik:RadTextBox Width="160px" ID="RadTextBox2" runat="server" Text='<%# Bind( "Fax") %>'

 

 

 

 

 

 

 

EmptyMessage="type here" >

 

 

 

 

 

 

 

</telerik:RadTextBox>

 

 

 

 

 

 

 

</td>

 

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

 

</table>

 

 

 

 

 

 

 

<table style="width: 100%">

 

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

 

<td align="right">

 

 

 

 

 

 

 

<asp:Button ID="Button1" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'

 

 

 

 

 

 

 

runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>

 

 

 

 

 

 

 

</asp:Button>&nbsp;

 

 

 

 

 

 

 

<asp:Button ID="Button2" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel">

 

 

 

 

 

 

 

</asp:Button>

 

 

 

 

 

 

 

</td>

 

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

 

</table>

 

 

 

 

 

 

 

</FormTemplate>

 

 

 

 

 

<

 

 

PopUpSettings Modal="True" Width="560px"></PopUpSettings>

 

 

 

 

 

 

 

</EditFormSettings>

 

 

 

 

 

 

 

</MasterTableView>

 

 

 

 

 

 

 

<ClientSettings>

 

 

 

 

 

 

 

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

 

 

 

 

 

 

 

</ClientSettings>

 

 

 

 

 

 

 

</telerik:RadGrid>

 

 

 

 







protected

 

 

void radgvLocation_ItemCommand(object source, GridCommandEventArgs e)

 

{

 

 

 

switch (e.CommandName)

 

{

 

 

case "UpdateCountry":

 

 

 

RadComboBox radcmbCountry = (RadComboBox)e.Item.FindControl("radcmbCountry");

 

 

 

break;

 

 

 

 

case "UpdateState":

 

 

 

RadComboBox radcmbState = (RadComboBox)e.Item.FindControl("radcmbState");

 

 

 

break;

 

 

}

radgvLocation.Rebind();

}

 

 

 

protected void radgvLocation_ItemCreated(object sender, GridItemEventArgs e)

 

{

 

 

 

// GridEditFormItem editForm = e.Item as GridEditFormItem;

 

 

 

 

if (e.Item is GridEditFormItem && e.Item.IsInEditMode)

 

{

 

 

RadComboBox radcmbCountry = (e.Item as GridEditFormItem)["radcmbCountry"].Controls[0] as RadComboBox;

 

radcmbCountry.AutoPostBack =

 

true;

 

radcmbCountry.SelectedIndexChanged +=

 

new System.EventHandler(this.radcmbCountry_SelectedIndexChanged);

 

 

 

 

 

RadComboBox radcmbState = (e.Item as GridEditFormItem)["radcmbState"].Controls[0] as RadComboBox;

 

radcmbState.AutoPostBack =

 

true;

 

radcmbState.SelectedIndexChanged +=

 

new System.EventHandler(this.radcmbState_SelectedIndexChanged);

 

 //// above line causes error

 

}

}

 

 

protected void radcmbCountry_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)

 

{

}

 

 

protected void radcmbState_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)

 

{

}

Elliott
Top achievements
Rank 2
 answered on 30 May 2012
5 answers
295 views
Hi, I have a radgrid with GridTemplateColumn whic has checkbox 2 textboxes and datepicker.
Is there a way to know if user has edited a value in one of those controls ? 
I need to know which row is updated and get old/new values.

Thanks 
Avetik
Top achievements
Rank 1
 answered on 30 May 2012
8 answers
1.2K+ views

I'm using an EntityDataSource with the RadGrid. Everything was working fine until I added a GridCalculatedColumn. Suddenly, I'm getting this error:

No property or field 'RecordID' exists in type 'EntityDataSourceWrapper'

As you see in the markup at the end of the message, I'm declaring the EntityDataSource declaratively. I encountered a similar problem with the EntityDataSourceWrapper previously in the code behind  and managed to find a fix that I posted here:
 
http://weblogs.asp.net/kencox/archive/2009/07/16/fixing-entitydatasourcewrapper-error-in-ef-vb-version.aspx

Does anyone know a workaround for this when using the EntityDataSource declaratively?

Ken

        <telerik:RadGrid ID="RadGridSalesDetail" runat="server" AutoGenerateDeleteColumn="True" 
            AutoGenerateEditColumn="True" AllowAutomaticUpdates="True" AllowAutomaticDeletes="True" 
            AllowAutomaticInserts="True" DataSourceID="EntityDataSource1" GridLines="None">  
            <MasterTableView AutoGenerateColumns="False" DataKeyNames="RecordID" DataSourceID="EntityDataSource1">  
                <RowIndicatorColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </RowIndicatorColumn> 
                <ExpandCollapseColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </ExpandCollapseColumn> 
                <Columns> 
                    <telerik:GridBoundColumn DataField="RecordID" DataType="System.Int32" HeaderText="RecordID" 
                        ReadOnly="True" SortExpression="RecordID" UniqueName="RecordID">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridDropDownColumn DataField="PartNumber" DataSourceID="edsPartNumberLookup" 
                        HeaderText="Part Number" ListTextField="PartNumber" ListValueField="PartNumber" 
                        UniqueName="DetailPartNumber" ColumnEditorID="GridDropDownColumnEditor1">  
                    </telerik:GridDropDownColumn> 
                    <telerik:GridNumericColumn DataField="Qty" HeaderText="Quantity" DataType="System.Int32" 
                        UniqueName="DetailQty" ColumnEditorID="GridNumericColumnEditor1">  
                    </telerik:GridNumericColumn> 
                    <telerik:GridBoundColumn DataField="SoldPrice" DataType="System.Double" HeaderText="SoldPrice" 
                        SortExpression="SoldPrice" UniqueName="SoldPrice">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridCalculatedColumn HeaderText="Total Price" UniqueName="TotalPrice" DataType="System.Double" 
                        DataFields="Qty, SoldPrice" Expression="{0}*{1}" FooterText="Total : " Aggregate="Sum" /> 
                </Columns> 
            </MasterTableView> 
        </telerik:RadGrid> 
        <telerik:GridDropDownListColumnEditor ID="GridDropDownColumnEditor1" runat="server" 
            DropDownStyle-Width="110px" /> 
        <telerik:GridNumericColumnEditor ID="GridNumericColumnEditor1" runat="server" NumericTextBox-Width="40px" /> 
    </div> 
    <asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=OfficeBookDBEntities1" 
        DefaultContainerName="OfficeBookDBEntities1" EntitySetName="CMS_SaleDetail" EnableDelete="True" 
        EnableInsert="True" EnableUpdate="True"  EntityTypeFilter="CMS_SaleDetail">  
    </asp:EntityDataSource> 
Chun
Top achievements
Rank 1
 answered on 30 May 2012
7 answers
384 views
I have been having problems with a RadAsyncUpload control that was previously working in ASP.NET 3.5 after I converted imy app to ASP.NET 4.0.  I confirmed that all my web.config settings were correct.  When I selected a valid file, I would get the exclamation point as if I had chosen a file that failed validation.  I did not see any javascript errors in Firebug, and I had no error messages coming out of it.  I knew that the file I selected wasn't the problem, and no changes had happened in the code since the upgrade to .NET 4.0.  Changing IIS 7 to "classic mode" made it go away, but that was not an option for me.  Plus I knew that integrated mode shouldn't be the issue since I had all the appropriate web.config settings.  After a bit of trial and error, I found that if I set "controlRenderingCompatibilityVersion" in the web.config to 3.5, the error went away.

I wanted to post this to share it with the rest of the community, and alert Telerik to a potential bug.
Pátria
Top achievements
Rank 1
 answered on 30 May 2012
1 answer
128 views
I have a problem with toolTip and Rotator.
The CSS file is changing the style of tooltip (munual closer) and the buttons on the Rotator.

  
PrtScn




How can I solve this problem? 
The CSS is in the Master Page. 

CSS : 
a
{
      
}
  
a:hover
{
    color: #fff;
    text-decoration: overline;
    background-image: url('../imagens/boton1.gif');
}

Rotator code:
<telerik:RadRotator ID="RadRotator1" runat="server" Width="950px" Height="160px"
                                                                ScrollDuration="2000" FrameDuration="1" ItemHeight="137"
                                                                ItemWidth="227" RotatorType="Buttons"
                                                                ScrollDirection="Left,Right"  Skin="Vista" OnClientItemClicked="viewCamp">
    <ItemTemplate>
             <div id="div_campanhas" style="  vertical-align: middle; text-align: center;"  runat="server" align="center">
                                                        <asp:Image ID="Image1" runat="server" AlternateText='<%# Eval("cod_campanha") %>' ImageUrl='<%# "comum/imagens/catalogo1/" + Eval("cod_campanha")+".gif"%>'
                                                                   ImageAlign="Middle" />
                </div>
        </ItemTemplate>
 
</telerik:RadRotator>
rdmptn
Top achievements
Rank 1
 answered on 30 May 2012
1 answer
200 views
I have designed my page with Tabstrip and Multipage as follows

<telerik:RadWindowManager ID="RadWindowManager1" runat="server" VisibleOnPageLoad="false">
            <Shortcuts>
                <telerik:WindowShortcut CommandName="CloseAll" Shortcut="Esc" />
            </Shortcuts>
        </telerik:RadWindowManager>
        <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="rdmpPersonal">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rdtabEmployee" />
                        <telerik:AjaxUpdatedControl ControlID="rdmpPersonal" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="rdtabEmployee">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rdtabEmployee" />
                        <telerik:AjaxUpdatedControl ControlID="rdmpPersonal" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
 
 <telerik:RadTabStrip ID="rdtabEmployee" runat="server" MultiPageID="rdmpPersonal"
            UnSelectChildren="True" Skin="Vista" EnableEmbeddedSkins="False" ClickSelectedTab="True"
            AutoPostBack="True" SelectedIndex="0">
            <Tabs>
                <telerik:RadTab runat="server" Text="Personal" PageViewID="rdpgPersonal">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Contact" PageViewID="rdpgContact">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Salary">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Bank">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
<telerik:RadMultiPage ID="rdmpPersonal" runat="server" SelectedIndex="0">
            <telerik:RadPageView ID="rdpgPersonal" runat="server">
                <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
                    <telerik:RadPanelBar runat="server" ID="rdpnlPersonal" ExpandMode="FullExpandedItem"
                        Skin="Vista" EnableEmbeddedSkins="false" Width="550px">
                        <Items>
                            <telerik:RadPanelItem Expanded="true" Text="Employee Personal Information" runat="server"
                                Selected="true">
                                <Items>
                                    <telerik:RadPanelItem Value="AccountInformation" runat="server">
                                        <ItemTemplate>
                                            <div class="text" style="background-color: #edf9fe">
                                                <ul class="formList" id="accountInfo">
                                                    <li>
                                                        <asp:Label Width="150px" runat="server" ID="lblFirstName" AssociatedControlID="accountName">First Name</asp:Label>
                                                        <asp:TextBox ID="accountName" CssClass="textInput" TabIndex="1" runat="server" ValidationGroup="accountValidation"
                                                            Width="200px"></asp:TextBox>
                                                        <asp:RequiredFieldValidator runat="server" ID="rqrdName" ValidationGroup="accountValidation"
                                                            ForeColor="Red" ControlToValidate="accountName" ErrorMessage="First name is required"></asp:RequiredFieldValidator>
                                                    </li>
                                                    <li>
                                                        <asp:Label runat="server" Width="150px" ID="lblMiddle" AssociatedControlID="txtMiddle">Middle Initial</asp:Label>
                                                        <asp:TextBox ID="txtMiddle" TabIndex="2" CssClass="textInput" runat="server" Width="200px"></asp:TextBox>
                                                    </li>
                                                    <li>
                                                        <asp:Label runat="server" Width="150px" ID="lblLastName" AssociatedControlID="txtLastName">Last Name</asp:Label>
                                                        <asp:TextBox CssClass="textInput" ValidationGroup="accountValidation" ID="txtLastName"
                                                            runat="server" Width="200px" TabIndex="3"></asp:TextBox>
                                                        <asp:RequiredFieldValidator runat="server" ValidationGroup="accountValidation" ID="rqrdLast"
                                                            ForeColor="Red" ControlToValidate="txtLastName" ErrorMessage="LastName is required"></asp:RequiredFieldValidator>
                                                    </li>
                                                    <li>
                                                        <asp:Label runat="server" ID="lblSSN" AssociatedControlID="txtSSN" Width="150px">Social Security Number</asp:Label>
                                                        <telerik:RadMaskedTextBox Mask="###-##-####" runat="server" ID="txtSSN" Width="200px"
                                                            ValidationGroup="accountValidation" TabIndex="4">
                                                        </telerik:RadMaskedTextBox>
                                                        <asp:RequiredFieldValidator Display="Dynamic" ValidationGroup="accountValidation"
                                                            ID="mskdrqrdSSN" runat="server" ErrorMessage="Please, enter SSN number." ForeColor="Red"
                                                            ControlToValidate="txtSSN"></asp:RequiredFieldValidator>
                                                        <asp:RegularExpressionValidator Display="Dynamic" ID="mskdregvdSSN" runat="server"
                                                            ErrorMessage="Format is ###-##-####" ControlToValidate="txtSSN" ValidationGroup="accountValidation"
                                                            ForeColor="Red" ValidationExpression="^\d{3}-\d{2}-\d{4}$" />
                                                    </li>
                                                    <li>
                                                        <asp:Label runat="server" ID="lblHireDate" AssociatedControlID="radDtHiredate" Width="150px">Hire Date</asp:Label>
                                                        <telerik:RadDatePicker ID="radDtHiredate" Width="200px" runat="server" MinDate="1900-01-01"
                                                            AutoPostBack="true" TabIndex="5">
                                                            <Calendar ID="calHire" RangeMinDate="1900-01-01" runat="server">
                                                            </Calendar>
                                                        </telerik:RadDatePicker>
                                                        <asp:RequiredFieldValidator ID="rqrdcontactHireDate" runat="server" Display="Dynamic"
                                                            ValidationGroup="accountValidation" ControlToValidate="radDtHiredate" ForeColor="Red"
                                                            ErrorMessage="Select a Date"></asp:RequiredFieldValidator>
                                                    </li>
                                                    <li>
                                                        <asp:Label runat="server" ID="lblGender" AssociatedControlID="rdcbGender" Width="150px">Gender</asp:Label>
                                                        <telerik:RadComboBox ID="rdcbGender" TabIndex="6" AutoPostBack="true" CssClass="ComboBox"
                                                            runat="server" Width="200px">
                                                        </telerik:RadComboBox>
                                                        <asp:RequiredFieldValidator ID="rqrdGender" runat="server" Display="Dynamic" ValidationGroup="accountValidation"
                                                            ControlToValidate="rdcbGender" ForeColor="Red" InitialValue="--select--" ErrorMessage="Select Gender"></asp:RequiredFieldValidator>
                                                    </li>
                                                    <li>
                                                        <asp:Label runat="server" ID="lblDob" AssociatedControlID="radDtDOB" Width="150px">Date Of Birth</asp:Label>
                                                        <telerik:RadDatePicker ID="radDtDOB" Width="200px" runat="server" MinDate="1900-01-01"
                                                            AutoPostBack="true" TabIndex="7">
                                                            <Calendar ID="calDob" RangeMinDate="1900-01-01" runat="server">
                                                            </Calendar>
                                                        </telerik:RadDatePicker>
                                                        <asp:RequiredFieldValidator ID="rqrdcontactDobDate" runat="server" Display="Dynamic"
                                                            ValidationGroup="accountValidation" ControlToValidate="radDtDOB" ForeColor="Red"
                                                            ErrorMessage="Select a Date"></asp:RequiredFieldValidator>
                                                    </li>
                                                    <li>
                                                        <asp:Label runat="server" ID="lblPayFrequency" AssociatedControlID="radPayFrequency"
                                                            Width="150px">Pay Frequency</asp:Label>
                                                        <telerik:RadComboBox ID="radPayFrequency" TabIndex="8" AutoPostBack="true" CssClass="ComboBox"
                                                            runat="server" Width="200px">
                                                        </telerik:RadComboBox>
                                                    </li>
                                                </ul>
                                                <br />
                                                <asp:ValidationSummary runat="server" ID="validationSummary" CssClass="validationSummary" />
                                                <table style="margin-left: 50px;">
                                                    <tr>
                                                        <td>
                                                            <telerik:RadButton ID="rdbtnpersonalSaveExit" ValidationGroup="accountValidation"
                                                                OnClick="rdbtnpersonalSaveExit_Click" TabIndex="9" runat="server" Text="Save & Exit">
                                                            </telerik:RadButton>
                                                              
                                                            <telerik:RadButton ID="rdbtnpersonalCancel" OnClick="rdbtnpersonalCancel_Click" TabIndex="10"
                                                                runat="server" Text="Cancel">
                                                            </telerik:RadButton>
                                                              
                                                            <telerik:RadButton ID="rdbtnpersonalSaveNext" ValidationGroup="accountValidation"
                                                                OnClick="rdbtnpersonalSaveNext_Click" TabIndex="11" runat="server" Text="Save & Next">
                                                            </telerik:RadButton>
                                                              
                                                            <telerik:RadButton ID="rdbtnpersonalNext" TabIndex="12" runat="server" Text="Next"
                                                                OnClick="rdbtnpersonalNext_Click">
                                                            </telerik:RadButton>
                                                            <br />
                                                        </td>
                                                    </tr>
                                                </table>
                                                <br />
                                            </div>
                                        </ItemTemplate>
                                    </telerik:RadPanelItem>
                                </Items>
                            </telerik:RadPanelItem>
                        </Items>
                    </telerik:RadPanelBar>
                </telerik:RadAjaxPanel>
            </telerik:RadPageView>
            <telerik:RadPageView ID="rdpgContact" runat="server">
                <telerik:RadAjaxPanel ID="rdpanleContact" runat="server">
                    <telerik:RadPanelBar runat="server" ID="rdpbContact" ExpandMode="FullExpandedItem"
                        Skin="Vista" EnableEmbeddedSkins="false" Width="550px">
                        <Items>
                            <telerik:RadPanelItem Expanded="true" Text="Employee Contact Information" runat="server"
                                Selected="true">
                                <Items>
                                    <telerik:RadPanelItem Value="ContactInformation" runat="server">
                                        <ItemTemplate>
                                            <div class="text" style="background-color: #edf9fe">
                                                <ul class="formList" id="contactInfo">
                                                    <li>
                                                        <asp:Label Width="150px" runat="server" ID="lblcontactAddress" AssociatedControlID="rdcmbAddress">Address</asp:Label>
                                                        <telerik:RadComboBox ID="rdcmbAddress" AutoPostBack="true" CssClass="ComboBox" runat="server"
                                                            ValidationGroup="contactValidation" Width="200px">
                                                        </telerik:RadComboBox>
                                                        <asp:RequiredFieldValidator runat="server" ID="rqrdcontactAddress" ValidationGroup="contactValidation"
                                                            ControlToValidate="rdcmbAddress" ErrorMessage="Select Address" ForeColor="Red"></asp:RequiredFieldValidator>
                                                    </li>
                                                    <li>
                                                        <asp:Label runat="server" Width="150px" ID="lblcontactAddress1" AssociatedControlID="txtcontactAddressLine1">Address Line 1</asp:Label>
                                                        <asp:TextBox ID="txtcontactAddressLine1" CssClass="textInput" runat="server" Width="200px"
                                                            ValidationGroup="contactValidation"></asp:TextBox>
                                                        <asp:RequiredFieldValidator runat="server" ID="rqrdcontactAdreesLine" ValidationGroup="contactValidation"
                                                            ControlToValidate="txtcontactAddressLine1" ErrorMessage="Address Line 1 is required"
                                                            ForeColor="Red"></asp:RequiredFieldValidator>
                                                    </li>
                                                    <li>
                                                        <asp:Label runat="server" Width="150px" ID="lblcontactAddress2" AssociatedControlID="txtcontactAddressLine2">Address Line 2 </asp:Label>
                                                        <asp:TextBox ID="txtcontactAddressLine2" CssClass="textInput" runat="server" Width="200px"></asp:TextBox>
                                                    </li>
                                                    <li>
                                                        <asp:Label runat="server" Width="150px" ID="lblcontactCity" AssociatedControlID="txtcontactCity">City</asp:Label>
                                                        <asp:TextBox CssClass="textInput" ValidationGroup="accountValidation" ID="txtcontactCity"
                                                            runat="server" Width="200px"></asp:TextBox>
                                                        <asp:RequiredFieldValidator runat="server" ValidationGroup="contactValidation" ID="rqrdcontactCity"
                                                            ControlToValidate="txtcontactCity" ErrorMessage="City is required" ForeColor="Red"></asp:RequiredFieldValidator>
                                                    </li>
                                                    <li>
                                                        <asp:Label runat="server" ID="lblcontactState" AssociatedControlID="rdcmbcontactState"
                                                            Width="150px">State</asp:Label>
                                                        <telerik:RadComboBox ID="rdcmbcontactState" CssClass="ComboBox" runat="server" Width="200px">
                                                        </telerik:RadComboBox>
                                                    </li>
                                                    <li>
                                                        <asp:Label runat="server" ID="lblcontactZipCode" AssociatedControlID="txtcontactZipCode"
                                                            Width="150px">Zip Code</asp:Label>
                                                        <asp:TextBox CssClass="textInput" ValidationGroup="contactValidation" ID="txtcontactZipCode"
                                                            runat="server" Width="200px"></asp:TextBox>
                                                        <asp:RequiredFieldValidator runat="server" ID="rqrdcontactZipCode" ValidationGroup="contactValidation"
                                                            ForeColor="Red" ControlToValidate="txtcontactZipCode" ErrorMessage="Zip Code is required"></asp:RequiredFieldValidator>
                                                    </li>
                                                    <li>
                                                        <asp:Label runat="server" ID="lblcontactCountry" AssociatedControlID="txtcontactCountry"
                                                            Width="150px">Country</asp:Label>
                                                        <asp:TextBox CssClass="textInput" ValidationGroup="contactValidation" ID="txtcontactCountry"
                                                            runat="server" Width="200px"></asp:TextBox>
                                                        <asp:RequiredFieldValidator runat="server" ID="rqrdcontactCountry" ValidationGroup="contactValidation"
                                                            ControlToValidate="txtcontactCountry" ForeColor="Red" ErrorMessage="Country is required"></asp:RequiredFieldValidator>
                                                    </li>
                                                    <li>
                                                        <asp:Label runat="server" ID="lblcontactPhoneType" AssociatedControlID="rdcmbcontactPhoneType"
                                                            Width="150px">Phone Number Type</asp:Label>
                                                        <telerik:RadComboBox ID="rdcmbcontactPhoneType" CssClass="ComboBox" runat="server"
                                                            Width="200px">
                                                        </telerik:RadComboBox>
                                                    </li>
                                                    <li>
                                                        <asp:Label runat="server" ID="lblcontactPhoneNo" AssociatedControlID="txtcontactPhoneNumber"
                                                            Width="150px">Phone Number</asp:Label>
                                                        <telerik:RadMaskedTextBox Mask="###-###-####" runat="server" ID="txtcontactPhoneNumber"
                                                            Width="200px" ValidationGroup="contactValidation">
                                                        </telerik:RadMaskedTextBox>
                                                        <asp:RequiredFieldValidator Display="Dynamic" ID="mskdrqrdPhoneNo" runat="server"
                                                            ValidationGroup="contactValidation" ErrorMessage="Please, enter a phone number."
                                                            ForeColor="Red" ControlToValidate="txtcontactPhoneNumber"></asp:RequiredFieldValidator>
                                                        <asp:RegularExpressionValidator Display="Dynamic" ID="mskdregPhoneNo" runat="server"
                                                            ValidationGroup="contactValidation" ErrorMessage="Format is ###-###-####" ControlToValidate="txtcontactPhoneNumber"
                                                            ForeColor="Red" ValidationExpression="^\d{3}-\d{3}-\d{4}$" />
                                                    </li>
                                                    <li>
                                                        <asp:Label runat="server" ID="lblcontactFaxType" AssociatedControlID="rdcmbcontactFaxType"
                                                            Width="150px">Fax Number Type</asp:Label>
                                                        <telerik:RadComboBox ID="rdcmbcontactFaxType" CssClass="ComboBox" runat="server"
                                                            Width="200px">
                                                        </telerik:RadComboBox>
                                                    </li>
                                                    <li>
                                                        <asp:Label runat="server" ID="lblcontactFaxNo" AssociatedControlID="txtcontactFaxNumber"
                                                            Width="150px">Fax Number</asp:Label>
                                                        <telerik:RadMaskedTextBox Mask="###-###-####" runat="server" ID="txtcontactFaxNumber"
                                                            Width="200px" ValidationGroup="contactValidation" TabIndex="4">
                                                        </telerik:RadMaskedTextBox>
                                                        <asp:RequiredFieldValidator Display="Dynamic" ID="rqrdcontactFaxNo" runat="server"
                                                            ValidationGroup="contactValidation" ErrorMessage="Please, enter a Fax number."
                                                            ControlToValidate="txtcontactFaxNumber" ForeColor="Red"></asp:RequiredFieldValidator>
                                                        <asp:RegularExpressionValidator Display="Dynamic" ID="regexpcontactFaxNo" runat="server"
                                                            ValidationGroup="contactValidation" ErrorMessage="Format is ###-###-####" ControlToValidate="txtcontactFaxNumber"
                                                            ForeColor="Red" ValidationExpression="^\d{3}-\d{3}-\d{4}$" />
                                                    </li>
                                                    <li>
                                                        <asp:Label runat="server" ID="lblcontactEmailType" AssociatedControlID="rdcmbcontactEmailType"
                                                            Width="150px">Email Address Type</asp:Label>
                                                        <telerik:RadComboBox ID="rdcmbcontactEmailType" CssClass="ComboBox" runat="server"
                                                            Width="200px">
                                                        </telerik:RadComboBox>
                                                    </li>
                                                    <li>
                                                        <asp:Label runat="server" ID="lblcontactEmailAddress" AssociatedControlID="txtcontactEmailAddress"
                                                            Width="150px">Email Address</asp:Label>
                                                        <telerik:RadTextBox ID="txtcontactEmailAddress" Width="200px" runat="server" ValidationGroup="contactValidation">
                                                        </telerik:RadTextBox>
                                                        <asp:RegularExpressionValidator ID="regexpcontactEmail" runat="server" Display="Dynamic"
                                                            ValidationGroup="contactValidation" ErrorMessage="Please, enter valid e-mail address."
                                                            ValidationExpression="^[\w\.\-]+@[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]{1,})*(\.[a-zA-Z]{2,3}){1,2}$"
                                                            ControlToValidate="txtcontactEmailAddress" ForeColor="Red">
                                                        </asp:RegularExpressionValidator>
                                                        <asp:RequiredFieldValidator ID="rqrdcontactEmail" runat="server" Display="Dynamic"
                                                            ValidationGroup="contactValidation" ControlToValidate="txtcontactEmailAddress"
                                                            ErrorMessage="Please, enter an e-mail!" ForeColor="Red" />
                                                    </li>
                                                    <li>
                                                        <asp:Label runat="server" ID="Label1" AssociatedControlID="chkcontactGenLoginID"
                                                            Width="150px">Generate Login Id To Employee</asp:Label>
                                                        <telerik:RadButton ID="chkcontactGenLoginID" CssClass="RadButton" runat="server"
                                                            ToggleType="CustomToggle" ButtonType="LinkButton">
                                                            <ToggleStates>
                                                                <telerik:RadButtonToggleState Text="UnChecked" PrimaryIconCssClass="rbToggleCheckbox" />
                                                                <telerik:RadButtonToggleState Text="Checked" PrimaryIconCssClass="rbToggleCheckboxChecked"
                                                                    CssClass="rbSkinnedButtonChecked" />
                                                            </ToggleStates>
                                                        </telerik:RadButton>
                                                    </li>
                                                </ul>
                                                <br />
                                                <asp:ValidationSummary runat="server" ID="validationSummary1" CssClass="validationSummary" />
                                                <table style="margin-left: 50px;">
                                                    <tr>
                                                        <td>
                                                            <telerik:RadButton ID="rdbtncontactBack" runat="server" Text="Back" OnClick="rdbtncontactBack_Click">
                                                            </telerik:RadButton>
                                                              
                                                            <telerik:RadButton ID="rdbtncontactSaveExit" runat="server" Text="Save & Exit" OnClick="rdbtncontactSaveExit_Click">
                                                            </telerik:RadButton>
                                                              
                                                            <telerik:RadButton ID="rdbtncontactCancel" runat="server" Text="Cancel" OnClick="rdbtncontactCancel_Click">
                                                            </telerik:RadButton>
                                                              
                                                            <telerik:RadButton ID="rdbtncontactSaveNext" runat="server" Text="Save & Next" OnClick="rdbtncontactSaveNext_Click">
                                                            </telerik:RadButton>
                                                              
                                                            <telerik:RadButton ID="rdbtncontactNext" runat="server" Text="Next" OnClick="rdbtncontactNext_Clcik">
                                                            </telerik:RadButton>
                                                            <br />
                                                        </td>
                                                    </tr>
                                                </table>
                                                <br />
                                            </div>
                                        </ItemTemplate>
                                    </telerik:RadPanelItem>
                                </Items>
                            </telerik:RadPanelItem>
                        </Items>
                    </telerik:RadPanelBar>
                </telerik:RadAjaxPanel>
            </telerik:RadPageView>
 </telerik:RadMultiPage>
This is how I am passing my information to radwindow

string message = "'You must save Employee Information to proceed further..'";
            string javaScriptCode = "Sys.Application.add_load(function() {showRadConfirm(" + message + ");});";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "RadConfirmStart", javaScriptCode, true);

This is the script

<script type="text/javascript">
        function showRadConfirm(text) {
            function callbckFunc(arg) {
                if (arg) {
                    __doPostBack("PostBackAfterRadConfirm", "this is a parameter");
                }
            }
            radalert(text, 300, 80, "Information");
        }
    </script>

This is what I am doing. If I click on Save & Next or Save & Exit on Contact with out saving Personal Information I am showing radwindow with corresponding message. But once the window gets opened if any post back event occurs the radwindow is displaying ..
rdmptn
Top achievements
Rank 1
 answered on 30 May 2012
1 answer
136 views
Hi,
I have a radgrid with edit links to open radwindow to update a record.
It is a modified copy of your code Edit dialog for RadGrid
The differences are:
My Rad Grid is on UserControl
I'm using LinqDataSource for selecting record.

On the "Update", call is made to refreshGrid function call ajaxRequest to rebind the grid.

This works the first time, the second time I cannot open the RadWindow.
The error is "grid is null" in the following function

        function ShowEditForm(id, rowIndex) {
            var grid = $find("<%= RadGrid1.ClientID %>");
            var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();
            grid.get_masterTableView().selectItem(rowControl, true);

            window.radopen("../FileStorage/Pages/ClientMnt.aspx?ClientId=" + id, "ClientMntDialog");
            return false;
        }


Anyone any ideas?

Thanks
Peter
Marin Bratanov
Telerik team
 answered on 30 May 2012
7 answers
160 views
Hi,

I am trying to build the ExportToPdf functionality as in http://demos.telerik.com/aspnet-ajax/editor/examples/pdfexport/defaultvb.aspx

On pressing the button there is only a postback of the page, nothing happens further...no pdf export.

Suggestions?

Regards,
Marc

Rumen
Telerik team
 answered on 30 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?