Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
76 views
Hi,
Can you please help me
How to find out Hierarchical grid Expanded Row Co-ordinates(X&Y) in client side or server side.
I Need to display Model popup on Expanded click with out using RowClick Client-event.

Thanks,

Madhavi
Top achievements
Rank 1
 answered on 21 Feb 2013
7 answers
120 views
I am trying to use the Export to Excel functionality on the RadGrid and I can not get it to work.  My Telerik controls are about 1 year old...I am not able to upgrade currently because our two legal departments are arguing over Eula crap.  Can anybody help me out?  Basically, when I hit the Export to Excel button, the grid refreshes(ajax), but nothing happens.  I have included my HTML below.  The version of my Telerik Controls are:  2012.1.411.40

ASP.NET 4.0, Windows 7

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" OnGridExporting="RadGrid1_GridExporting" ShowGroupPanel="true" OnNeedDataSource="RadGrid1_NeedDataSource" ItemStyle-Font-Size="Small" HeaderStyle-HorizontalAlign="Center" CellSpacing="0" PageSize="500" Height="500px" Width="1250" GridLines="None" Skin="WebBlue" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True"><br>        <ClientSettings AllowDragToGroup="True"><br>            <Scrolling AllowScroll="True" UseStaticHeaders="True" /><br><br>        </ClientSettings><br>        <ExportSettings ExportOnlyData="true" OpenInNewWindow="true"><br>        </ExportSettings><br>        <GroupingSettings ShowUnGroupButton="true" CaseSensitive="false"></GroupingSettings><br>        <MasterTableView Font-Size="Small" CommandItemDisplay="Top"><br>            <br>           <CommandItemSettings ShowExportToExcelButton="true"></CommandItemSettings><br>           <GroupByExpressions><br> <br>              <telerik:GridGroupByExpression><br>                <SelectFields><br>                  <telerik:GridGroupByField FieldName="InvoiceNumber" HeaderText="Invoice Number" /><br>                </SelectFields><br>                <GroupByFields><br>                  <telerik:GridGroupByField FieldName="InvoiceNumber" SortOrder="Ascending" /><br>                </GroupByFields><br>              </telerik:GridGroupByExpression><br> <br>            </GroupByExpressions><br>            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings><br>            <ItemStyle Font-Size="X-Small" /><br>            <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"><br>                <HeaderStyle Width="20px"></HeaderStyle><br>            </RowIndicatorColumn><br><br>            <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"><br>                <HeaderStyle Width="20px"></HeaderStyle><br>            </ExpandCollapseColumn><br><br>            <Columns> <br>                <telerik:GridBoundColumn FilterControlAltText="Filter column2 column" ItemStyle-Width="90" ItemStyle-Font-Size="Small" HeaderStyle-Width="90" UniqueName="column2" FilterControlWidth="50" DataField="InvoiceNumber" ItemStyle-HorizontalAlign="Center" HeaderText="Invoice #"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn FilterControlAltText="Filter column column" ItemStyle-Width="60" Visible="false" ItemStyle-Font-Size="Small" HeaderStyle-Width="60" UniqueName="column" FilterControlWidth="40" DataField="RecordType" HeaderText="Rec Type"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn FilterControlAltText="Filter column1 column" ItemStyle-Width="75" ItemStyle-Font-Size="Small" HeaderStyle-Width="75" UniqueName="column1" AllowFiltering="false" DataField="PostDate" HeaderText="Post Date"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn FilterControlAltText="Filter column3 column" ItemStyle-Width="40" ItemStyle-Font-Size="Small" HeaderStyle-Width="40" UniqueName="column3" ItemStyle-HorizontalAlign="Center" AllowFiltering="false" DataField="Sign" HeaderText="Sign"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn FilterControlAltText="Filter column4 column" ItemStyle-Width="85" ItemStyle-Font-Size="Small" HeaderStyle-Width="85" UniqueName="column4" FilterControlWidth="40" ItemStyle-HorizontalAlign="Center" DataFormatString="" DataField="Amount" HeaderText="Amount"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn FilterControlAltText="Filter column5 column" ItemStyle-Width="40" ItemStyle-Font-Size="Small" HeaderStyle-Width="40" AllowFiltering="false" UniqueName="column5" ItemStyle-HorizontalAlign="Center" DataField="Currency" HeaderText="Cur"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn FilterControlAltText="Filter column6 column" ItemStyle-Width="40" ItemStyle-Font-Size="Small" HeaderStyle-Width="40" AllowFiltering="false" UniqueName="column6" DataField="Geo" HeaderText="Geo"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn FilterControlAltText="Filter column7 column" ItemStyle-Width="50" ItemStyle-Font-Size="Small" HeaderStyle-Width="50" AllowFiltering="false" UniqueName="column7" DataField="UOM" ItemStyle-HorizontalAlign="Center" HeaderText="UOM"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn FilterControlAltText="Filter column8 column" ItemStyle-Width="80" ItemStyle-Font-Size="Small" HeaderStyle-Width="80" AllowFiltering="false" UniqueName="column8" DataField="GLAcct" ItemStyle-HorizontalAlign="Center" HeaderText="GL Acct"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn FilterControlAltText="Filter column9 column" ItemStyle-Width="55" ItemStyle-Font-Size="Small" HeaderStyle-Width="55" AllowFiltering="false" UniqueName="column9" DataField="APRef" HeaderText="AP Ref"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn FilterControlAltText="Filter column10 column" ItemStyle-Width="70" ItemStyle-Font-Size="Small" HeaderStyle-Width="70" ItemStyle-HorizontalAlign="Center" UniqueName="column10" FilterControlWidth="25" DataField="CustRef" HeaderText="Cust Ref"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn FilterControlAltText="Filter column11 column" ItemStyle-Width="70" ItemStyle-Font-Size="Small" HeaderStyle-Width="70" ItemStyle-HorizontalAlign="Center" UniqueName="column11" FilterControlWidth="30" DataField="SrcCo" HeaderText="Src Co"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn FilterControlAltText="Filter column12 column" ItemStyle-Width="70" ItemStyle-Font-Size="Small" HeaderStyle-Width="70" ItemStyle-HorizontalAlign="Center" UniqueName="column12" FilterControlWidth="30" DataField="ChgCo" HeaderText="Chg Co"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn FilterControlAltText="Filter column13 column" ItemStyle-Width="70" ItemStyle-Font-Size="Small" HeaderStyle-Width="70" ItemStyle-HorizontalAlign="Center" UniqueName="column13" FilterControlWidth="25" DataField="BusArea" HeaderText="Bus Area"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn FilterControlAltText="Filter column14 column" ItemStyle-Width="90" ItemStyle-Font-Size="Small" HeaderStyle-Width="90" UniqueName="column14" FilterControlWidth="50" DataField="CostCenter" ItemStyle-HorizontalAlign="Center" HeaderText="Cost Ctr"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn FilterControlAltText="Filter column15 column" ItemStyle-Width="85" ItemStyle-Font-Size="Small" HeaderStyle-Width="85" UniqueName="column15" FilterControlWidth="45" DataField="ProfitCenter" HeaderText="Profit Ctr"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn FilterControlAltText="Filter column16 column" ItemStyle-Width="85" ItemStyle-Font-Size="Small" HeaderStyle-Width="85" UniqueName="column16" FilterControlWidth="45" DataField="Order" HeaderText="Order"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn FilterControlAltText="Filter column17 column" ItemStyle-Width="115" ItemStyle-Font-Size="Small" HeaderStyle-Width="115" UniqueName="column17" FilterControlWidth="70" DataField="WBSElement" HeaderText="WBS Element"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn FilterControlAltText="Filter column18 column" ItemStyle-Width="85" ItemStyle-Font-Size="Small" HeaderStyle-Width="85" UniqueName="column18" FilterControlWidth="45" DataField="MPMIssue" HeaderText="MPM Issue"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn FilterControlAltText="Filter column19 column" ItemStyle-Width="70" ItemStyle-Font-Size="Small" HeaderStyle-Width="70" UniqueName="column19" Visible="false" DataField="TrdPartner" HeaderText="Trd Partner"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn DataField="TPBusinessArea" FilterControlAltText="Filter column20 column" ItemStyle-Font-Size="Small" ItemStyle-Width="70" HeaderStyle-Width="70" Visible="false" HeaderText="TP Busn Area" UniqueName="column20"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn DataField="DistChannel" FilterControlAltText="Filter column21 column" ItemStyle-Font-Size="Small" ItemStyle-Width="90" HeaderStyle-Width="90" FilterControlWidth="50" HeaderText="Dist Channel" UniqueName="column21"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn DataField="Material" FilterControlAltText="Filter column22 column" ItemStyle-Font-Size="Small" ItemStyle-Width="85" HeaderStyle-Width="85" FilterControlWidth="45" HeaderText="Material" UniqueName="column22"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn DataField="Description" FilterControlAltText="Filter column23 column" ItemStyle-Font-Size="Small" ItemStyle-Width="160" AllowFiltering="true" FilterControlWidth="120" HeaderStyle-Width="160" HeaderText="Description" UniqueName="column23"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn DataField="Quantity" FilterControlAltText="Filter column24 column" ItemStyle-Font-Size="Small" ItemStyle-Width="65" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="65" AllowFiltering="false" HeaderText="Quantity" UniqueName="column24"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn DataField="TaxCode" FilterControlAltText="Filter column25 column" ItemStyle-Font-Size="Small" ItemStyle-Width="55" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="55" AllowFiltering="false" HeaderText="Tax Code" UniqueName="column25"><br>                </telerik:GridBoundColumn><br>                <telerik:GridBoundColumn DataField="Attrib1" FilterControlAltText="Filter column26 column" ItemStyle-Font-Size="Small" ItemStyle-Width="50" HeaderStyle-Width="50" HeaderText="Attrib 1" Visible="false" UniqueName="column26"><br>                </telerik:GridBoundColumn><br>            </Columns><br><br>            <EditFormSettings><br>                <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn><br>            </EditFormSettings><br>        </MasterTableView><br><br>        <FilterMenu EnableImageSprites="False"></FilterMenu><br>    </telerik:RadGrid>

protected void RadGrid1_GridExporting(object sender, Telerik.Web.UI.GridExportingArgs e)
{
       RadGrid1.ExportSettings.OpenInNewWindow = true;
       RadGrid1.MasterTableView.ExportToExcel();
}
Shinu
Top achievements
Rank 2
 answered on 21 Feb 2013
6 answers
825 views
I have an image gallery setup using a Rotator control.  I'd like to add/remove a "seleccted" CSS class to highlight the currently selected image in my strip of thumbnails.

The documentation shows that I can add an OnClientItemClicked JavaScript event which I should be able to use to handle this.  I need to get the currently clicked item which should be something like args.get_item().  Is there a list somewhere of properties and methods of the args and sender items?  The documentation seems to only show the event names.

Any help would be appreciated.

Thanks
Princy
Top achievements
Rank 2
 answered on 21 Feb 2013
1 answer
174 views
how do I find a PlaceHolder in a DetailItemTemplate

I have added  OnItemDataBound="RadGrid1_ItemDataBound" to RadGrid1

I have tried many different variations.

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        Label lbl = new Label();
        lbl.Text = "Proofs:";
        lbl.CssClass = "cLabel";
 
        if (e.Item is GridDataItem)
        {
            GridDataItem item = (GridDataItem)e.Item;
            PlaceHolder PlaceHolderProof = (PlaceHolder)item["PlaceHolderProof"].Controls[0];
//PlaceHolder PlaceHolderProof = (PlaceHolder)item.FindControl("PlaceHolderProof");
            PlaceHolderProof.Controls.Add(lbl);
        }
 
    }

i was able to do the following:

GridDataItem item = e.Item as GridDataItem;
        if (item != null)
        {
            RadButton ProofButton = item.DetailTemplateItemDataCell.FindControl("ProofButton") as RadButton;
            string ID = item["Approved"].Text;
 
            if (ID == "0")
            {
                ProofButton.Visible = false;
            }
            else
            {
                ProofButton.Visible = true;
            }
        }


Shinu
Top achievements
Rank 2
 answered on 21 Feb 2013
0 answers
117 views

I use RadEditor in SharePoint 2013 and problems like this link: http://www.telerik.com/help/aspnet-ajax/editor-unregistered-handler-for-radasyncupload-breaks-the-file-browser-dialogs.html
I do not want to add httphandlers and handler in web.config root application folder that I want to create web.config in the child folder (ex: Web Server Extensions \ wpresources).
When I do this, this error still occurs
web.config
<? Xml version = "1.0" encoding = "UTF-8" standalone = "yes"?>
<configuration>
  <system.web>
    <httpHandlers>
<Add name = "ChartImage_.axd" path = "ChartImage.axd" verb = "*" type = "Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Version = 2012.3.1016.35, Culture = neutral, PublicKeyToken = 121fae78165ba3d4 "/>
<Add name = "Telerik.Web.UI.SpellCheckHandler_.axd" path = "Telerik.Web.UI.SpellCheckHandler.axd" verb = "*" type = "Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Culture = neutral, PublicKeyToken = 121fae78165ba3d4 "/>
<Add name = "Telerik.Web.UI.DialogHandler_.aspx" path = "Telerik.Web.UI.DialogHandler.aspx" verb = "*" type = "Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Culture = neutral, PublicKeyToken = 121fae78165ba3d4 "/>
<add name="Telerik.RadUploadProgressHandler_.ashx" path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI" />
<Add verb = "*" name = "Telerik.Web.UI.WebResource_.axd" path = "Telerik.Web.UI.WebResource.axd" type = "Telerik.Web.UI.WebResource, Telerik.Web.UI, Version = 2012.3.1016.35, Culture = neutral, PublicKeyToken = 121fae78165ba3d4 "/>
    </ HttpHandlers>
  </ System.web>

  <system.webServer>
    <modules>
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI" preCondition="managedHandler" />
    </ Modules>
    <handlers>
      <Add name = "ChartImage.axd" path = "ChartImage.axd" verb = "*" type = "Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Version = 2012.3.1016.35, Culture = neutral, PublicKeyToken = 121fae78165ba3d4 "preCondition =" integratedMode "/>
      <Add name = "Telerik.Web.UI.SpellCheckHandler.axd" path = "Telerik.Web.UI.SpellCheckHandler.axd" verb = "*" type = "Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Culture = neutral, PublicKeyToken = 121fae78165ba3d4 "preCondition =" integratedMode "/>
      <Add name = "Telerik.Web.UI.DialogHandler.aspx" path = "Telerik.Web.UI.DialogHandler.aspx" verb = "*" type = "Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Culture = neutral, PublicKeyToken = 121fae78165ba3d4 "preCondition =" integratedMode "/>
      <Add name = "Telerik.RadUploadProgressHandler.ashx" path = "Telerik.RadUploadProgressHandler.ashx" verb = "*" type = "Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI" preCondition = "integratedMode" / >
<Add verb = "*" name = "Telerik.Web.UI.WebResource.axd" path = "Telerik.Web.UI.WebResource.axd" type = "Telerik.Web.UI.WebResource, Telerik.Web.UI, Version = 2012.3.1016.35, Culture = neutral, PublicKeyToken = 121fae78165ba3d4 "preCondition =" integratedMode "/>
    </ Handlers>
    <validation validateIntegratedModeConfiguration="false" />
  </ System.webServer>
</ Configuration>
So, please just let me know way to RadEditor run in Sharepoint 2013?

Pham Dinh Vinh
Top achievements
Rank 1
 asked on 21 Feb 2013
4 answers
287 views
Hi,

I have a rad grid with a rad date picker inside the edit item template.  The problem is that the calendar for the rad date picker does not show correctly.  See attached screen shot.  I have a RadAjaxManager on the page and when I remove it the calendar is displayed correctly but I need to keep the RadAjaxManager.

I had this same problem using a text box and calendar extender but was not able to get it to work correctly either.

I created a simple sample page with just a date field in the  grid to demonstrate the problem.   There is nothing in the code behind.
I am using version 2012.3.1205.35 of the rad controls.

Any help would be appreciated.

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WBF Rad Grid DatePicker.aspx.vb" Inherits="IPS_Gateway.WBF_Rad_Grid_DatePicker" %>
 
<!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>
<body>
    <form id="form1" runat="server">
  <act:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnablePartialRendering="true" AsyncPostBackTimeOut="600"/>
    <telerik:RadWindowManager ID="rwmManager" runat="server"/>
    
    <telerik:RadAjaxManager ID="ajaxManager" runat="server" >   
            <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="Telerik"  EnableEmbeddedSkins="true" />
        <asp:SqlDataSource ID="SQLDS_ProjectMilestones"     runat="server"  ConnectionString="<%$ ConnectionStrings:IPSDataConnectionString %>" SelectCommandType="StoredProcedure" SelectCommand="[Project].[DSP_Milestones-Sel-Ins-Upd-Del]" />
      
            <telerik:RadGrid ID="rgvMainGrid"        runat="server"  DataSourceID="SQLDS_ProjectMilestones"
                                 EnableEmbeddedSkins="true"             Skin="Office2010Silver"             Height="370px"  Width="1230px"
                                 EnableViewState="true"                 AutoGenerateColumns="false"         AllowMultiRowSelection="false"      
                                 AllowAutomaticDeletes="false"          AllowAutomaticInserts="false"       AllowAutomaticUpdates="false"        EnableLinqExpressions="false"                                                                       
                                 AllowSorting="true"                    AllowPaging ="true"                 EnableAjaxSkinRendering="true">                      
                    <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" />
                    <EditItemStyle BackColor="LightBlue" />                          
                    <ClientSettings AllowColumnsReorder="true"   AllowDragToGroup="false"   AllowColumnHide="false"  EnablePostBackOnRowClick="false"  >                                          
                        <Selecting  AllowRowSelect="true"  />                               
                        <Scrolling  AllowScroll="True"          UseStaticHeaders="True"         SaveScrollPosition="true"       />
                    </ClientSettings>
                    <ExportSettings  HideStructureColumns="true"    ExportOnlyData="true"      Excel-Format="ExcelML"    IgnorePaging="true"              OpenInNewWindow="true"  />                        
                    <MasterTableView    DataSourceID="SQLDS_ProjectMilestones"  Name="MasterGrid"               PageSize="100"                        EnableNoRecordsTemplate="true"   ShowHeadersWhenNoRecords="true"   
                                        EnableViewState="true"                  AllowMultiColumnSorting="true"                    
                                        EditMode="InPlace"                      CommandItemDisplay="Top"        DataKeyNames="MilestoneUniqueId">
                     
                    <CommandItemTemplate>
                        <asp:Table ID="tblCommandTemplate" runat="server" Width="1230px" CellSpacing="0" CellPadding="0">
                            <asp:TableRow ID="trowCommandTemplate1" Height="25px" runat="server" style="display:block;"  >
                                <asp:TableCell ID="tcell1" runat="server">
                                    <telerik:RadButton ID="rbtAdd"              runat="server" CommandName="InitInsert"       Skin="Transparent" Text="Add"     Icon-PrimaryIconURL="<%$ Resources:Images,AddRecord16%>"    style="position:absolute;left:10px;font-size:10px;"  ToolTip="Add New Record"     Visible='<%# rgvMainGrid.EditIndexes.Count=0 and Not rgvMainGrid.MasterTableView.IsItemInserted %>'   /> 
                                    <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 %>' />  
                                    <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 %>' /> 
                                    <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:Table>
                    </CommandItemTemplate>
                    <NoRecordsTemplate> <div>There are no records to display. </div></NoRecordsTemplate>
                            <Columns>  
                            <telerik:GridTemplateColumn     UniqueName="gtcMilestoneDate"       DataField="MilestoneDate"       HeaderText="Date"       HeaderStyle-Width="90px"  HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <asp:Label ID="lblMilestoneDate"      runat="server"  Text='<%# Bind("MilestoneDate", "{0:MM-dd-yy}" ) %>'   />
                                </ItemTemplate>
                                <EditItemTemplate>
                                            <telerik:RadDatePicker ID = "rdpEditMilestoneDate"         runat="server" Width="85px"  EnableEmbeddedSkins="true" Skin="Telerik" DbSelectedDate='<%# Bind("MilestoneDate") %>'   DatePopupButton-Visible="false"  ShowPopupOnFocus="true"  ></telerik:RadDatePicker>
                                </EditItemTemplate>
                                <InsertItemTemplate>
                                            <telerik:RadDatePicker ID = "rdpInsertMilestoneDate"         runat="server" Width="95px"   DatePopupButton-Visible="false" ShowPopupOnFocus="true" ></telerik:RadDatePicker>
                                </InsertItemTemplate>
                             </telerik:GridTemplateColumn>
                        </Columns>         
                    </MasterTableView>
                </telerik:RadGrid>
    
    </form>
</body>
</html>


Tracy
Top achievements
Rank 1
 answered on 21 Feb 2013
3 answers
476 views
I've seen many posts that are similar to my issue but none of the suggestions work in my specific case.  I've already seen topics such as this one (http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=grid) and this one (http://www.telerik.com/help/aspnet-ajax/window-programming-calling-functions.html), however both of those solutions seem to be for when you are refreshing the entire page, not a Parent RadWindow from a Child RadWindow.

I have a master page that opens a RadWindow with a RadGrid.  This RadWindow is dynamically added so I do not know the sepecific ID because there might be other RadWindows that are open from the master page.  There is also a button on that page that executes code behind, then based on certain criteria, it opens another RadWindow through a RegisterStartupScript that calls the following JavaScript:

function GetRadWindow() {
                    var oWindow = null;
 
                    if (window.radWindow)
                        oWindow = window.radWindow;
                    else if (window.frameElement.radWindow)
                        oWindow = window.frameElement.radWindow;
 
                    return oWindow;
                }
 
function OpenModalRadWin(args) {
                    if (args == null)
                        alert("There was no URL supplied by the code.  Please contact the system administrator.");
                    else {
                        var RadWinManager = GetRadWindow().get_windowManager();
                        var newWin = RadWinManager.open(args);
                        newWin.setSize(250, 250);
                        newWin.set_modal(true);
                        setTimeout(function() { newWin.setActive(true); }, 0);
                    }
 
                    return false;
                }

The original window was opened in a similar JavaScript function except it is not modal.

The modal window takes user input and stores that in a database, then closes itself using GetRadWindow().Close(); in JavaScript.  I've tried to get the parent page (the first RadWindow) to either refresh or rebind the grid but all of the samples and other posts seem to not have a RadWindow within a RadWindow.  The JavaScript in the Parent RadWindow is not getting called by the Child RadWindow.  Below is some of the code commented out of what I've tried (it uses the same GetRadWindow() function as above:
function CloseWin() {
            //GetRadWindow().BrowserWindow.document.RefreshGrid();
            //GetRadWindow().get_contentFrame().contentWindow.RefreshGrid();
            GetRadWindow().Close();
            //GetRadWindow().BrowserWindow.RefreshGrid();
            //__doPostBack("<%=btnCancel.UniqueID %>", "");
            return true;
        }

I know that it isn't even calling the function on the Parent RadWindow because all I have it doing right now is calling alert('test'); and the alert is not coming up and the Child is not closing.

How do I call a function on a Parent RadWindow from a Child RadWindow?  More importantly, how do I only refresh the Parent RadWindow from a Child RadWindow without refreshing the entire page (master page).
Kyle
Top achievements
Rank 1
 answered on 20 Feb 2013
1 answer
136 views
Hi,

It took me some time to discover correct version data for the BIFF export feature.

I think it would be good to alter page http://www.telerik.com/help/aspnet-ajax/grid-binary-excel-export.html

from

The newest addition to the RadGrid export formats is based on the binary Excel format BIFF.

to

 From version 2012 Q... the export format based on the binary Excel format BIFF is added.

Thanks,
Marc
Daniel
Telerik team
 answered on 20 Feb 2013
1 answer
123 views
I'm trying to implement client-side binding to a JSON array via the following JS:

var tableView = $find("<%= gridView.ClientID %>").get_masterTableView();
tableView.set_dataSource(GridData);
tableView.dataBind();

My columns are dynamic since they are controlled via configuration, so I have to create them on the server during Page_Load by creating GridBoundColumn instances and adding them to the grid's Columns collection (see simplified example):

GridBoundColumn column = new GridBoundColumn();
gridView.Columns.Add(column);
column.DataField = fieldBinding;
 column.UniqueName = uniquename;
column.SortExpression = fieldBinding;
column.HeaderText = fieldLabel;
gridView.Columns.Add(column);

I've found that to get any data to show up, I also have to do a preliminary data binding on Page_Load:
gridView.MasterTableView.DataSource = new string[] { };
gridView.DataBind();

Overall this works and my binding does populate, but I end up with an extra "Items" column on the right side that I cannot hide.  Getting rid of the server-side preliminary binding eliminates the extra column, but at the cost of preventing the client-side binding from occurring.  There doesn't seem to be any way to hide this extra column since it doesn't show up in the Columns collection during the lifespan of Page_Load.

Any ideas? 
David
Top achievements
Rank 1
 answered on 20 Feb 2013
1 answer
151 views
I've got two asp panels, one visible at any given time.  Visibility is toggled between the two by clicking the "Show/Hide Report" button.  Pretty straightforward but I'd like to add some visual flair.  The second panel should "slide" in from the right when Show Report is clicked (which also populates the ReportViewer) and slide back and disappear when Hide Report is clicked.  I looked at various controls but they all have UI chrome I don't need.  Is there a control that fits my needs?
MasterChiefMasterChef
Top achievements
Rank 2
 answered on 20 Feb 2013
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?