Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
204 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
137 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
316 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
537 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
154 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
141 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
176 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
7 answers
162 views
I use grid in rtl mode whith resizible columns and AllowScroll=true.
When horizontal grid's scroll is visible it is impossible to do any action with columns - grouping , resizing,reordering - nothing working.
Any suggestion?
Pavlina
Telerik team
 answered on 20 Feb 2013
2 answers
274 views
I need to implement a control which looks like a good fit for PanelBar with the exception that it has to stack horizontally as opposed to vertically.  Is it possible to do this?

Thanks
Wadigzon
Top achievements
Rank 1
 answered on 20 Feb 2013
1 answer
128 views
Hi,

If I try and re-order grid columns by dragging IE8 freezes when in compatibility mode.  In normal mode its fine.  This also affects IE7.  This happens for both client and server side reordering - it seems there is some begin-drag stuff firing which kills the browser.  Has anyone alse experienced this issue?  I wouldnt care except that we have a big user base still on Ie7 - if I cant resolve this I cant use the telerik grid.  Thanks
MasterChiefMasterChef
Top achievements
Rank 2
 answered on 20 Feb 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?