Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
104 views
I have two the same select tags in my html that generate different results after rendering;

selectbox 1:

original html:

<select id="ctl00_ctrlLocaleList" name="ctl00$ctrlLocaleList" onchange="javascript:setTimeout('__doPostBack(\'ctl00$ctrlLocaleList\')') ">
<option value="nl-NL" selected="selected">Nederlands</option>
<option value="de-DE">Deutsch</option>
<option value="en-US">United Kingdom</option>
</select>




output:


 <a style="width: 122px;" class="rfdSelect rfdSelect_mt" tabindex="-1" unselectable="on" id="Skinnedctl00_ctrlLocaleList" href="javascript:void(0)">
 <span class="rfdSelectOuter">
 <span class="rfdSelectText">Nederlands</span>
 </span>
 </a>
 <select _rfddecoratedid="Skinnedctl00_ctrlLocaleList" class="rfdRealInput" id="ctl00_ctrlLocaleList" name="ctl00$ctrlLocaleList" onchange="javascript:setTimeout('__doPostBack(\'ctl00$ctrlLocaleList\')') ">
 <option value="nl-NL" selected="selected">Nederlands</option>
 <option value="de-DE">Deutsch</option><option value="en-US">United Kingdom</option>
 </select>




Selectbox 2

original html:

<select size="1" id="Color_3185_3234" name="Color_3185_3234" onchange="">
<option value="-,-">Kleur</option>
<option value="Blauw,Blauw">Blauw</option>
<option value="Geel,Geel">Geel</option>
<option value="Groen,Groen">Groen</option>
<option value="Oranje,Oranje">Oranje</option>
<option value="Roze,Roze">Roze</option>
<option value="Wit,Wit">Wit</option>
</select>




output:

<div style="overflow-y: auto; width: 67px; height: 20px;" class="rfdSelectBox rfdSelectBox_mt" id="SkinnedColor_3185_3234">
<ul>
<li class="rfdSelect_selected" unselectable="on">Kleur</li>
<li unselectable="on">Blauw</li>
<li unselectable="on">Geel</li>
<li unselectable="on">Groen</li>
<li unselectable="on">Oranje</li>
<li unselectable="on">Roze</li>
<li unselectable="on">Wit</li>
</ul>
</div>
<select _rfddecoratedid="SkinnedColor_3185_3234" class="rfdRealInput" size="1" id="Color_3185_3234" name="Color_3185_3234" onchange="">
<option value="-,-">Kleur</option>
<option value="Blauw,Blauw">Blauw</option>
<option value="Geel,Geel">Geel</option>
<option value="Groen,Groen">Groen</option>
<option value="Oranje,Oranje">Oranje</option>
<option value="Roze,Roze">Roze</option>
<option value="Wit,Wit">Wit</option>
</select>



Any idea why this renders different results? Option 1 seems to be correct, the second one fails (visually).
Using IE9 and 2012-1.411.35.
Fit2Page
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 11 Jun 2012
4 answers
236 views
I've just implemented a timezone drop down for my scheduler like your online demo shows. That works fine. When I select the timezone from the drop down, I'm able to create appointments according to the timezone selected.

The problem I'm running into is exporting the appointment to ICal. I've used the code from the online example 'How to preserve the time of the appointment when exporting to iCalendar' It works fine locally on my development machine. The file exports to outlook with the same time/date shown on the scheduler. However, when I run the page from our web server, which is in the Central Time Zone, when I export the appointment from my machine in the eastern time zone, the times on the export file are an hour ahead of the appointment time shown on the scheduler.

Any ideas on what could be causing this issue?
Plamen
Telerik team
 answered on 11 Jun 2012
1 answer
60 views
Hi Team,

We are currently migrating an application developed as sharepoint farm solution to sandboxed solution. I have used update panels to avoid the postbacks in my farm solution. Knowing that ajax/telerik controls are not supported in sandboxed solution, do i have any alternative to replace the update panels functionality in sandboxed environment. I want to avoid un necessary post backs.

Thanks,
Bhanu.
Marin
Telerik team
 answered on 11 Jun 2012
6 answers
118 views

Find enclosed an example website where the autopostback of a RadComboBox isn’t fired anymore after a couple of times. Most of the time it works, but when you follow this scenario it stops working:

 

Select items 1, 2 and 3 of the first ComboBox and wait for postback

Deselect items 2 and 3 and wait for postback

Select items 2 and 3 again => No postback anymore

 

Could anyone explain me why this is, if it can be solved by us, or if it is a bug ?

 

We’re using Telerik version 2011.2.915.40

Link to demo project:
http://www.gildebt.nl/ComboBox.rar

Frank
Top achievements
Rank 1
 answered on 11 Jun 2012
3 answers
175 views
Dear Telerik Team,
I'm implemeting 2 Radlistboxes for item transfer.if i select 1 item in source listbox then transfer to Destination listbox that time the scroll bar position occupying randomly some where and recently transferred item is not able to view.but i want to view recently just transferred items at destination list box.Also if user transfer all items then scroll bar position will be on top of list box.

Please support.

Thanks & Regards,
Santhosh Naik


Bozhidar
Telerik team
 answered on 11 Jun 2012
1 answer
60 views
I have an nHibernate object returning 225 objects, when I bind it nothing is displayed.

EmployeeSupervisor.cs
    public class EmployeeSupervisor
    {
        public virtual int EmployeeId { getset; }
        public virtual string Employee { getset; }
        public virtual int ManagerId { getset; }
        public virtual string Manager { getset; }
      
        public EmployeeSupervisor()
        {
           
        }
    }
OrgChart.aspx
    <telerik:RadOrgChart ID="RadOrgChart1" runat="server" DataFieldID="EmployeeId" 
        DataFieldParentID="ManagerId" DataTextField="Employee" 
        DisableDefaultImage="False" MaxDataBindDepth="5">
    </telerik:RadOrgChart>

OrgChart.aspx.cs
        UserDAO dao = new UserDAO();
        List<EmployeeSupervisor> coList = dao.GetOrgChart();
        RadOrgChart1.DataSource = coList;
        RadOrgChart1.DataBind();
thank you in advance. Jeff
Peter Filipov
Telerik team
 answered on 11 Jun 2012
1 answer
104 views
Hello Support,

I have a RadGrid that manually exports to Excel via ItemCommand (RadGrid1.MasterTableView.ExportToExcel()). The RadGrid has a RadComboBox in every row. When I export (using ExportOnlyData = True), the RadComboBox columns are ignored and do not show in the exported Excel file.

How do you suggest to print each combo SelectedText to the excel sheet? In which event shoudl I handle it?


Thanks for your help.
Mosart
Princy
Top achievements
Rank 2
 answered on 11 Jun 2012
2 answers
69 views

Hi,
i wish to reduce my filter options on my grid view control... i need only "contain" and "start with" option inside my filter option.. please help me soon..

Regards,
Prassin 
Prassin
Top achievements
Rank 1
 answered on 11 Jun 2012
1 answer
429 views
Hi,

I have a textbox that is inside the commanditemtemplate of a rad grid.  I am trying to change the value of this textbox client side when a row is clicked in the rad grid.  My problem is that the value is not being displayed.   I placed an alert in the script and the value returned is the correct value it just isn't displayed on the screen.
If I place a textbox outside the radgrid and change the value client side it works.

Thanks for your help.

        function RowSelected(sender, eventArgs) {

            var radGrid = $get('rgvMainGrid')

            var dataItem = $get(eventArgs.get_id());

            var grid = sender;

            var MasterTable = grid.get_masterTableView();

            var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];

            var txtJob = $telerik.findControl(radGrid, 'rtxJob');

//Text Box That Is Outside The Grid – Value Is Changed

            var txtText = document.getElementById('txtTest');

            txtText.value = MasterTable.getCellByColumnUniqueName(row, "Job").innerHTML;

//Text Box That Is Inside The Grid – Value Is Not Changed

            txtJob.value = MasterTable.getCellByColumnUniqueName(row, "Job").innerHTML;

            alert(txtJob.value);

          

        }


<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WBF PRJ Forecasting.aspx.vb" Inherits="IPS_Gateway.WBF_PRJ_Forecasting" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
    <script src="../../Scripts/GridScroll.js" type="text/javascript"></script>
    <script src="../../Scripts/GridFunctions.js" type="text/javascript"></script>
    <script src="../../Scripts/GridTemplateToolbar.js" type="text/javascript"></script>
    <script src="../../Scripts/ControlSelectOnFocus.js" type="text/javascript"></script>
    <script  type="text/javascript" >
        function RowSelected(sender, eventArgs) {
            var radGrid = $get('rgvMainGrid')
            var dataItem = $get(eventArgs.get_id());
            var grid = sender;
            var MasterTable = grid.get_masterTableView();
            var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];
 
            var txtJob = $telerik.findControl(radGrid, 'rtxJob');
            var txtText = document.getElementById('txtTest');
            txtText.value = MasterTable.getCellByColumnUniqueName(row, "Job").innerHTML;
            txtJob.value = MasterTable.getCellByColumnUniqueName(row, "Job").innerHTML;
            alert(txtJob.value);
            
 
        }
  
 
 
        /*2 functions needed because $find("<%=rgvMainGrid.ClientID %>")/$get('rgvMainGrid') will not return the client id
        when in an exeternal js file, therefore the client id value must be passed to the function from the calling page*/
        function pageLoad() { HideButtonsExternal($find("<%=rgvMainGrid.ClientID %>")); }
        function ShowHideFilterFields(sender, args) { ShowHideFilterFieldsExternal(sender, args, $find("<%=rgvMainGrid.ClientID %>")); }
        function ShowHideCommandTemplate(sender, args) { ShowHideCommandTemplateExternal(sender, args, $get('rgvMainGrid')); }
        function GridTemplateOnSelectedIndexChanged(sender, args) { GridTemplateOnSelectedIndexChangedExternal(sender, args, $get('rgvMainGrid')); }
        function DeleteOnClientClicking(sender, args) { DeleteOnClientClickingExternal(sender, args, $find("<%=rgvMainGrid.ClientID %>")); }
        function EditOnClientClicking(sender, args) { EditOnClientClickingExternal(sender, args, $find("<%=rgvMainGrid.ClientID %>")); }
        function TemplateDeleteOnClientClicking(sender, args) { TemplateDeleteOnClientClickingExternal(sender, args, $find("<%=rgvMainGrid.ClientID %>")); }
    </script>
    
 
<body>
    <form id="form1" runat="server">
 <act:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnablePartialRendering="true" AsyncPostBackTimeOut="600"/>
    <telerik:RadWindowManager ID="rwmManager" runat="server"></telerik:RadWindowManager
    <telerik:RadAjaxManager ID="ajaxManager" runat="server" DefaultLoadingPanelID="loading">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="rgvMainGrid"  >
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rgvMainGrid" LoadingPanelID="loading" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
          
        <telerik:RadAjaxLoadingPanel ID="loading" runat="server" Skin="Windows7"  EnableEmbeddedSkins="true"  />
        <asp:SqlDataSource ID="SQLDS_ForecastedCostSummary"   runat="server"  ConnectionString="<%$ ConnectionStrings:IPSDataConnectionString %>" SelectCommandType="StoredProcedure" SelectCommand="[Project].[DSP_ForecastedCost-Sel]" />
        <asp:SqlDataSource ID="SQLDS_ForecastedCostEntry"     runat="server"  ConnectionString="<%$ ConnectionStrings:IPSDataConnectionString %>" SelectCommandType="StoredProcedure" SelectCommand="[Project].[DSP_ForecastedHoursEntry-Sel]" />
 
    <asp:panel ID="pnlPage"   runat="server"  cssClass="css_GPC01_Panel_MainContent">     
    <wuc:PageHeader id="wucPageHeader" runat="server"></wuc:PageHeader>           
            <asp:Panel ID="pnlPageContent"         runat="server"     cssClass="css_GPC01_Panel_PageContent" >
 
            <asp:Panel ID="Panel1" runat="server" cssClass="css_GPC01_Panel_PageContent" >   
            <asp:UpdatePanel ID="uppSelection" runat="server" >
            <ContentTemplate>
                <asp:Table ID="tblSelection" runat="server" style=" border-collapse:collapse; margin-top:0px;" cellspacing="0" cellpadding="0"   Width="1200px">
                    <asp:TableRow   runat="server" CssClass="css_GFS01_TableHeading_Blue" >
                        <asp:TableCell ID="tcLblLastPayroll"            runat="server" Width="100px" ><asp:Label ID="lblLastPayroll"         runat="server" Text="Last Payroll Date"          CssClass="css_GFS01_Heading_Small_Center" Width="100px"  /> </asp:TableCell>
                        <asp:TableCell ID="tcLblBeginDate"              runat="server" Width="100px" ><asp:Label ID="lblBeginDate"           runat="server" Text="Begin Date"            cssClass="css_GFS01_Heading_Small_Center"  Width="100px"/></asp:TableCell>
                        <asp:TableCell ID="tcLblActivityDate"           runat="server" Width="100px"><asp:Label ID="lblActivityDate"        runat="server" Text="Activity Date"         cssClass="css_GFS01_Heading_Small_Center" Width="100px" /> </asp:TableCell>
                        <asp:TableCell ID="tcLblTrxType"                runat="server" Width="200px"><asp:Label ID="lblTrxType"             runat="server" Text="Transaction Type"      CssClass="css_GFS01_Heading_Small_Center" Width="200px"/> </asp:TableCell>
                        <asp:TableCell ID="tcLblJob"                    runat="server" Width="100px"><asp:Label ID="lblJob"                 runat="server" Text="Job"                   CssClass="css_GFS01_Heading_Small_Center" Width="100px"/> </asp:TableCell>
                        <asp:TableCell ID="tcLblEmployeeName"           runat="server" Width="200px"><asp:Label ID="lblEmployeeName"        runat="server" Text="Employee"              CssClass="css_GFS01_Heading_Small_Center" Width="200px"/> </asp:TableCell>
                        <asp:TableCell ID="tcLblCostcLblodeDiscipline"  runat="server" Width="120px"><asp:Label ID="lblCostCodeDiscipline"  runat="server" Text="Cost Code Discipline"  CssClass="css_GFS01_Heading_Small_Center" Width="120px"/> </asp:TableCell>
                        <asp:TableCell ID="tcLblEmployeeDiscipline"     runat="server" Width="100px"><asp:Label ID="lblEmployeeDiscipline"  runat="server" Text="Employee Discipline"   CssClass="css_GFS01_Heading_Small_Center" Width="100px"/> </asp:TableCell>
                    
                    </asp:TableRow>
                    <asp:TableRow ID="trSelection" runat="server" style="border-style:solid;border-width:thin;" Width="1200px">
                        <asp:TableCell ID="tcLastPayroll"               runat="server" Width="100px"><asp:TextBox ID="txtLastPayroll"                        runat="server" CssClass="css_GFS01_Text_Small_Center" Width="100px"  EnableViewState="true" Enabled="false"/> </asp:TableCell>
                        <asp:TableCell ID="tcBeginDate"                 runat="server" Width="100px"><asp:TextBox ID="txtBeginDate"                          runat="server" CssClass="css_GFS01_Text_Small_Center"  Width="100px" EnableViewState="true"/><act:CalendarExtender ID="clnBeginDae" runat="server" TargetControlID="txtBeginDate" /></asp:TableCell>
                        <asp:TableCell ID="tcActivityDate"              runat="server" Width="100px"><asp:TextBox ID="txtActivityDate"                      runat="server" CssClass="css_GFS01_Text_Small_Center" Width="100px"  EnableViewState="true"/>   <act:CalendarExtender ID="clnActivityDate" runat="server" TargetControlID="txtActivityDate" /></asp:TableCell>
                        <asp:TableCell ID="tcTrxType"                   runat="server" Width="200px"><telerik:RadComboBox ID="rcbTrxType"                   runat="server"   Width="200px" EnableViewState="true"  HighlightTemplatedItems="true" EnableEmbeddedSkins="true" Skin="WebBlue" OnClientFocus="OnClientFocus"/></asp:TableCell>
                        <asp:TableCell ID="tcJob"                       runat="server" Width="100px"><ucf25:JobNumber ID="rcbJobNumber"                      runat="server" OnIndexChangedJobNumberHandler="JobNumber_OnSelectedIndexChanged"  EnableViewState="true" /> </asp:TableCell>
                        <asp:TableCell ID="tcEmployeeName"              runat="server" Width="200px"><ucf16:EmployeeName ID="rcbEmployeeName"               runat="server" OnIndexChangedEmployeeNameHandler="EmployeeName_OnSelectedIndexChanged"  EnableViewState="true"/> </asp:TableCell>
                        <asp:TableCell ID="tcCostCodeDiscipline"        runat="server" Width="120px"><ucf26:CostCodeDiscipline ID="rcbCostCodeDiscipline"   runat="server" OnIndexChangedCostCodeDisciplineHandler="CostCodeDiscipline_OnSelectedIndexChanged"  EnableViewState="true"/> </asp:TableCell>
                        <asp:TableCell ID="tcEmployeeDiscipline"        runat="server" Width="100px"><ucf20:EmployeeDiscipline ID="rcbEmployeeDiscipline"   runat="server" OnIndexChangedEmployeeDisciplineHandler="EmployeeDiscipline_OnSelectedIndexChanged"  EnableViewState="true"/> </asp:TableCell>
                    </asp:TableRow>
                </asp:Table>  
               </ContentTemplate>
            </asp:UpdatePanel>
<telerik:RadTextBox ID="txtTest" runat="server" EnableViewState= "true" Text="* />
                <telerik:RadAjaxPanel ID="rapUpdateGrid"        runat="server"  >
             
 
                    <telerik:RadGrid ID="rgvMainGrid"          runat="server"  DataSourceID="SQLDS_ForecastedCostEntry"
                                         EnableEmbeddedSkins="true"         Skin="Office2010Silver"            Height="460px"  Width="1200px"
                                         EnableViewState="true"             AutoGenerateColumns="false"     AllowMultiRowSelection="false"     
                                         AllowAutomaticDeletes="false"       AllowAutomaticInserts="true"    AllowAutomaticUpdates="true"        EnableLinqExpressions="false"                                                                       
                                         EnableHeaderContextMenu="true"     EnableHeaderContextFilterMenu="true"      
                                         AllowFilteringByColumn="false"      AllowSorting="true"              AllowPaging="true"                  PageSize="1000">                                 
                             
                            <HeaderStyle Font-Bold="true" HorizontalAlign ="Center"  VerticalAlign="Middle" Wrap="false" font-size="10px"/>
                            <ItemStyle HorizontalAlign="Right" />
                            <AlternatingItemStyle HorizontalAlign="Right" />
                            <HeaderStyle HorizontalAlign="Center"  Width="40px"/>
                            <PagerStyle AlwaysVisible="true"    Mode="NextPrevNumericAndAdvanced"/>
                            <ExportSettings  IgnorePaging="true"  OpenInNewWindow="true" />
                            <FooterStyle HorizontalAlign="Right" />
                            <GroupingSettings GroupContinuedFormatString="" GroupContinuesFormatString=""  />
                            <ClientSettings AllowColumnsReorder="true"  AllowDragToGroup="false"  AllowColumnHide="false" ReorderColumnsOnClient="true" EnablePostBackOnRowClick="false"  AllowExpandCollapse="true" EnableRowHoverStyle="true" ClientEvents-OnRowClick="RowSelected"
 
                                <Selecting  AllowRowSelect="true" />                               
                                <Resizing   AllowColumnResize="True"    AllowRowResize="False"          EnableRealTimeResize="True"     ResizeGridOnColumnResize="true" ></Resizing>                                     
                                <Scrolling  AllowScroll="True"          UseStaticHeaders="True"         SaveScrollPosition="true"       FrozenColumnsCount="2" />
                            </ClientSettings>
                            <ExportSettings  HideStructureColumns="true"    ExportOnlyData="true"       IgnorePaging="true"             OpenInNewWindow="true"  />
                            <MasterTableView    DataSourceID="SQLDS_ForecastedCostEntry"           Name="MasterGrid"
                                                EnableViewState="true"                  AllowMultiColumnSorting="true"       ShowFooter="true"  ShowGroupFooter="true" ShowHeadersWhenNoRecords="true"                             
                                                EditMode="InPlace"                      CommandItemDisplay="Top"  GroupLoadMode="Client" >                                                               
                                    <CommandItemTemplate>
                                    <asp:Table ID="tblCommandTemplate" runat="server" Width="1220px" CellSpacing="0" CellPadding="0">
                                        <asp:TableRow ID="trowCommandTemplate1" Height="25px" runat="server" style="display:block;"  >
                                        <asp:TableCell >
                                            <telerik:RadButton ID="rbtAdd"             runat="server" CommandName="InitInsert"       Skin="Transparent" Text="Add"              Icon-PrimaryIconURL="<%$ Resources:Images,AddRecord16%>"    style="position:absolute;left:10px;font-size:12px;"  ToolTip="Add New Record"       />  
                                             <telerik:RadButton ID="rbtEdit"            runat="server" CommandName="EditSelected"     Skin="Transparent" Text="Edit"             Icon-PrimaryIconURL="<%$ Resources:Images,EditRecord16%>"   style="position:absolute;left:70px;font-size:12px;"  ToolTip="Edit Record"        Visible='<%# rgvMainGrid.EditIndexes.Count=0 and Not rgvMainGrid.MasterTableView.IsItemInserted %>' OnClientClicking="EditOnClientClicking" />   
                                            <telerik:RadButton ID="rbtDelete"          runat="server" CommandName="DeleteSelected"   Skin="Transparent" Text="Delete"           Icon-PrimaryIconURL="<%$ Resources:Images,DeleteRecord16%>" style="position:absolute;left:129px;font-size:12px;" ToolTip="Delete Record"      Visible='<%# rgvMainGrid.EditIndexes.Count=0 and Not rgvMainGrid.MasterTableView.IsItemInserted %>' OnClientClicking="DeleteOnClientClicking" />    
                                           
                                            <telerik:RadButton ID="rbtCancel"          runat="server" CommandName="CancelAll"        Skin="Transparent" Text="Cancel"           Icon-PrimaryIconURL="<%$ Resources:Images,CancelRecord16%>" style="position:absolute;left:10px;font-size:12px;"  ToolTip="Cancel Add/Edit"    Visible='<%# rgvMainGrid.EditIndexes.Count > 0 Or rgvMainGrid.MasterTableView.IsItemInserted %>'    />  
                                            <telerik:RadButton ID="rbtSaveNew"         runat="server" CommandName="PerformInsert"    Skin="Transparent" Text="Save"             Icon-PrimaryIconURL="<%$ Resources:Images,SaveRecord16%>"   style="position:absolute;left:80px;font-size:12px;"  ToolTip="Save New Record"    Visible='<%# rgvMainGrid.MasterTableView.IsItemInserted%>'                                           />   
                                            <telerik:RadButton ID="rbtSave"            runat="server" CommandName="UpdateEdited"     Skin="Transparent" Text="Save"             Icon-PrimaryIconURL="<%$ Resources:Images,SaveRecord16%>"   style="position:absolute;left:80px;font-size:12px;"  ToolTip="Save Edited Record" Visible='<%# rgvMainGrid.EditIndexes.Count > 0 AND Not rgvMainGrid.MasterTableView.IsItemInserted%>'/>  
                                            </asp:TableCell>
                                        </asp:TableRow>
                                        <asp:TableRow>
                                            <asp:TableCell>
                                                <telerik:RadTextBox ID="rtxJob"                     runat="server" Width="25px"  Text="Job" EnableViewState="true"  />
                                                <telerik:RadTextBox ID="rtxJobName"                 runat="server" Width="100px" />
                                                <telerik:RadTextBox ID="rtxExtra"                   runat="server" Width="25px" />
                                                <telerik:RadTextBox ID="rtxCostCode"                runat="server" Width="35px" />
                                                <telerik:RadTextBox ID="rtxCostCodeDescription"     runat="server" Width="100px" />
                                                <telerik:RadTextBox ID="rtxCostCodeDiscipline"      runat="server" Width="50px" />
                                                <telerik:RadTextBox ID="rtxContractType"            runat="server" Width="50px" />
                                                <telerik:RadTextBox ID="rtxProjectManager"          runat="server" Width="75px" />
                                                <telerik:RadTextBox ID="rtxLaborRateTable"          runat="server" Width="50px" />
                                                 
                                            </asp:TableCell>
                                        </asp:TableRow>
                                       
                                               </asp:Table>   
                                    </CommandItemTemplate>
                                    <Columns>  
                                                 
                                        <telerik:GridBoundColumn    DataField="ArgusDBID"       UniqueName="ArgusDBID"      HeaderText="DBID" Visible="false" >
                                        </telerik:GridBoundColumn>
 
                                        <telerik:GridBoundColumn    DataField="Job"           UniqueName="Job"          HeaderText="Job"     HeaderStyle-Width="60px"  ItemStyle-HorizontalAlign="Left" >                                   
                                        </telerik:GridBoundColumn>                               
 
                                        <telerik:GridBoundColumn    DataField="JobName"           UniqueName="JobName"          HeaderText="Job Name"     HeaderStyle-Width="150px"  ItemStyle-HorizontalAlign="Left" />                                   
                                        <telerik:GridBoundColumn    DataField="ContractType"           UniqueName="ContractType"          HeaderText="Type"     HeaderStyle-Width="50px"  ItemStyle-HorizontalAlign="Left" />                                   
                                        <telerik:GridBoundColumn    DataField="ProjectManager"           UniqueName="ProjectManager"          HeaderText="Project Manager"     HeaderStyle-Width="50px"  ItemStyle-HorizontalAlign="Left" />                                   
                                        <telerik:GridBoundColumn    DataField="LaborRateTable"           UniqueName="LaborRateTable"          HeaderText="Rate Table"     HeaderStyle-Width="50px"  ItemStyle-HorizontalAlign="Left" />                                   
                                         
                                        <telerik:GridBoundColumn    DataField="Extra"      UniqueName="Extra"     HeaderText="Extra"  HeaderStyle-Width="50px" ReadOnly="true" ItemStyle-HorizontalAlign="Left" />
  
                                        <telerik:GridBoundColumn    DataField="CostCode"        UniqueName="CostCode"       HeaderStyle-Width="50px"  HeaderText="Cost Code"  ItemStyle-HorizontalAlign="Left"   />                                   
                                        <telerik:GridBoundColumn    DataField="CostCodeDescription"        UniqueName="CostCodeDescription"       HeaderStyle-Width="150px"  HeaderText="Description"  ItemStyle-HorizontalAlign="Left"   />                                   
                                        <telerik:GridBoundColumn    DataField="CostCodeDiscipline"        UniqueName="CostCodeDiscipline"       HeaderStyle-Width="100px"  HeaderText="Description"  ItemStyle-HorizontalAlign="Left"   />                                   
                                                                                                             
                                        <telerik:GridBoundColumn    DataField="EmployeeName"         UniqueName="EmployeeName"      HeaderStyle-Width="110px"   HeaderText="Employee" ItemStyle-HorizontalAlign="Left"            ReadOnly="true"/>
 
                                        <telerik:GridBoundColumn    DataField="Misc1"         UniqueName="Misc1"      HeaderStyle-Width="110px"   HeaderText="Emp Discipline" ItemStyle-HorizontalAlign="Left"            ReadOnly="true"/>
                                         
                                        <telerik:GridBoundColumn    DataField="BeginningHours"     UniqueName="BeginningHours"    HeaderText="JTD"        DataFormatString="{0:F2}" Aggregate="Sum"/>
                                        <telerik:GridBoundColumn    DataField="HoursWeek1"         UniqueName="HoursWeek1"        HeaderText="Week1"      DataFormatString="{0:F2}" Aggregate="Sum"/>
                                        <telerik:GridBoundColumn    DataField="HoursWeek2"         UniqueName="HoursWeek2"        HeaderText="Week2"      DataFormatString="{0:F2}" Aggregate="Sum"/>
                                        <telerik:GridBoundColumn    DataField="HoursWeek3"         UniqueName="HoursWeek3"        HeaderText="Week3"      DataFormatString="{0:F2}" Aggregate="Sum"/>
                                        <telerik:GridBoundColumn    DataField="HoursWeek4"         UniqueName="HoursWeek4"        HeaderText="Week4"      DataFormatString="{0:F2}" Aggregate="Sum"/>
                                        <telerik:GridBoundColumn    DataField="HoursWeek5"         UniqueName="HoursWeek5"        HeaderText="Week5"      DataFormatString="{0:F2}" Aggregate="Sum"/>
                                        <telerik:GridBoundColumn    DataField="HoursWeek6"         UniqueName="HoursWeek6"        HeaderText="Week6"      DataFormatString="{0:F2}" Aggregate="Sum"/>
                                        <telerik:GridBoundColumn    DataField="HoursWeek7"         UniqueName="HoursWeek7"        HeaderText="Week7"      DataFormatString="{0:F2}" Aggregate="Sum"/>
                                        <telerik:GridBoundColumn    DataField="HoursWeek8"         UniqueName="HoursWeek8"        HeaderText="Week8"      DataFormatString="{0:F2}" Aggregate="Sum"/>
                                        <telerik:GridBoundColumn    DataField="HoursWeek9"         UniqueName="HoursWeek9"        HeaderText="Week9"      DataFormatString="{0:F2}" Aggregate="Sum"/>
                                        <telerik:GridBoundColumn    DataField="HoursWeek10"        UniqueName="HoursWeek10"       HeaderText="Week10"     DataFormatString="{0:F2}" Aggregate="Sum"/>
                                        <telerik:GridBoundColumn    DataField="HoursWeek11"        UniqueName="HoursWeek11"       HeaderText="Week11"     DataFormatString="{0:F2}" Aggregate="Sum"/>
                                </Columns>                               
                            </MasterTableView>
                        </telerik:RadGrid>
                       </telerik:RadAjaxPanel>
            </asp:Panel>
      
        </asp:Panel>
    </asp:panel>
    </form>
</body>
</html>
Shinu
Top achievements
Rank 2
 answered on 11 Jun 2012
1 answer
125 views
Hi everyone,
Please response to Kassaiefarshad@yahoo.com .

I am using RadGrid in a webpart in Sharepoint 2010.What I want is to export grid's content to Pdf/Excel.
I don't use Ajax in my webpart.
What I have written in RadGrid is as follow:
  <telerik:RadGrid ID="RadGridKnowledgeTopViewed" runat="server"
            AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" 
            CellSpacing="0" GridLines="None">
<ClientSettings>
<Selecting CellSelectionMode="None"></Selecting>
</ClientSettings>
<MasterTableView AllowPaging="False" AllowSorting="False" DataKeyNames="Guid">
<CommandItemSettings ExportToPdfText="PDF خروجی" ExportToExcelText="Excel خروجی" ShowAddNewRecordButton="false"
 RefreshText="" ShowExportToExcelButton="true" ShowExportToPdfButton="true"></CommandItemSettings>
     
    <Columns>
        <telerik:GridBoundColumn DataField="KnowledgeTitle"
            FilterControlAltText="Filter KnowledgeTitle column" HeaderText="عنوان دانش"
            SortExpression="KnowledgeTitle" UniqueName="KnowledgeTitle">
            <HeaderStyle Width="500px" />
            <ItemStyle Width="500px" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Views"
            FilterControlAltText="Filter Views column" HeaderText="مشاهده ها"
            SortExpression="Views" UniqueName="Views">
            <HeaderStyle Width="70px" />
            <ItemStyle Width="70px" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Score"
            FilterControlAltText="Filter Score column" HeaderText="امتیاز"
            SortExpression="Score" UniqueName="Score">
            <HeaderStyle Width="70px" />
            <ItemStyle Width="70px" />
        </telerik:GridBoundColumn>
    </Columns>
 
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
<ExportSettings FileName="KMSTest" IgnorePaging="true" OpenInNewWindow="true">
                <Pdf Author="سیستم مدیریت دانش" Creator="گروه مشاورین هوژان"
                    PageHeight="297mm" PageWidth="210mm" PaperSize="A4" />
</ExportSettings>
<FilterMenu EnableImageSprites="False"></FilterMenu>
</telerik:RadGrid>
However, I can not see any button in Grid to export to PDF/Excell.

Any help appreciated.
Farshad Kassaie.
Shinu
Top achievements
Rank 2
 answered on 11 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?