Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
159 views
Hello Sir,

i am using Rad Scheduler Control. im want to show time view Display Time Slot Like 7:00 , 7:15, 7:30, 7:45, 8:00 In Scheduler Control.

how can i achive. Please help Me.

Thanks
Chandan kumar
Chip
Top achievements
Rank 1
 answered on 08 Apr 2010
3 answers
201 views
Hello,
My company has recently started using Telerik. Following your posts regarding RAD controls for MOSS 2007 integration, I was successfully able to deploy a webpart which has only Telerik RADGrid and other non standard asp.net controls.
It works fine with MOSS 2007 and WSS 3.0.

The problem is with Integrating your controls in SharePoint 2010. As you know, SharePoint 2010 already has AJAX support, so should I include the ajax settings manually in web.config still ? What about the telerik configuration in web.config, is it changed for sharepoint 2010? I tried to integrate in the same was as I did for moss 2007 but got lot of JS errors.

If there's a post regarding SharePoint 2010 configuration, please let me know.

Regards,
Bhavyesh
Tsvetoslav
Telerik team
 answered on 08 Apr 2010
3 answers
430 views

My application produces a very large report that has the requirement of being exported (Excel, PDF, CSV).  From reading several threads here about problems with exporting large files and running into the issue myself, I took the approach to limit what is being exported by changing the page size and setting Ignorepaging to false.  What I'd like to do is post back an message/alert something to the user to let them know that what they tried to export was too large and the records were limited to x number.  My problem is that no matter what I've tried a message doesn't get displayed.  My app has  user control on the page that is meant to display messages that isn't working (pgMessage in code). I've tried adding a literal control to the bottom of the Grid as suggested in a form thread.  That didn't work,  I've tried using RegisterStartupscript with an alert.  That hasn't worked.   I've moved all of the above to different events like ItemCommand, Exporting, Pre_Render but I haven't found any that works.  My grid is ajaxified and I've followed the manuals approach on exporting an ajaxified grid.

Any one have any suggestions?

ASPX:

    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">    
        <AjaxSettings> 
           <telerik:AjaxSetting AjaxControlID="lnkbtnSave">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="rcbRptSettings"   
                        LoadingPanelID="" /> 
                </UpdatedControls>                  
            </telerik:AjaxSetting>   
            <telerik:AjaxSetting AjaxControlID="lnkbtnSaveAs">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="rcbRptSettings"   
                        LoadingPanelID="" /> 
                </UpdatedControls>                  
            </telerik:AjaxSetting>                     
            <telerik:AjaxSetting AjaxControlID="rcbRptSettings">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="rcbRptSettings" /> 
                    <telerik:AjaxUpdatedControl ControlID="rdpbegin" UpdatePanelRenderMode="Inline" /> 
                    <telerik:AjaxUpdatedControl ControlID="rdpend" UpdatePanelRenderMode="Inline" /> 
                    <telerik:AjaxUpdatedControl ControlID="rcbCodeList" /> 
                    <telerik:AjaxUpdatedControl ControlID="rcbListType" /> 
                    <telerik:AjaxUpdatedControl ControlID="rtbCode" /> 
                    <telerik:AjaxUpdatedControl ControlID="btnAddCode" /> 
                    <telerik:AjaxUpdatedControl ControlID="rlbCodes" /> 
                    <telerik:AjaxUpdatedControl ControlID="rlbFields" /> 
                    <telerik:AjaxUpdatedControl ControlID="rcbGroupSort" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting>         
            <telerik:AjaxSetting AjaxControlID="rcbCodeList">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="rcbListType"   
                        LoadingPanelID="RadAjaxLoadingPanel1" /> 
                    <telerik:AjaxUpdatedControl ControlID="rtbCode" /> 
                    <telerik:AjaxUpdatedControl ControlID="btnAddCode" /> 
                    <telerik:AjaxUpdatedControl ControlID="rlbCodes"   
                        LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="rcbListType">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="rtbCode" /> 
                    <telerik:AjaxUpdatedControl ControlID="btnAddCode" />                              
                    <telerik:AjaxUpdatedControl ControlID="rlbCodes"   
                        LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="btnAddCode">  
                <UpdatedControls>                              
                    <telerik:AjaxUpdatedControl ControlID="rtbCode"   
                        LoadingPanelID="RadAjaxLoadingPanel1" />   
                    <telerik:AjaxUpdatedControl ControlID="rlbCodes"   
                        LoadingPanelID="RadAjaxLoadingPanel1" />    
                </UpdatedControls>                  
            </telerik:AjaxSetting>              
            <telerik:AjaxSetting AjaxControlID="btnSearch">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="lnkbtnSave" /> 
                    <telerik:AjaxUpdatedControl ControlID="lnkbtnSaveAs" /> 
                    <telerik:AjaxUpdatedControl ControlID="ARGrid1" /> 
                </UpdatedControls>                  
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="btnReset">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="rdpbegin" UpdatePanelRenderMode="Inline" /> 
                    <telerik:AjaxUpdatedControl ControlID="rdpend" UpdatePanelRenderMode="Inline" /> 
                    <telerik:AjaxUpdatedControl ControlID="rcbCodeList" /> 
                    <telerik:AjaxUpdatedControl ControlID="rcbListType" /> 
                    <telerik:AjaxUpdatedControl ControlID="rtbCode" /> 
                    <telerik:AjaxUpdatedControl ControlID="btnAddCode" /> 
                    <telerik:AjaxUpdatedControl ControlID="rlbCodes" /> 
                    <telerik:AjaxUpdatedControl ControlID="rlbFields" /> 
                    <telerik:AjaxUpdatedControl ControlID="rcbGroupSort" /> 
                    <telerik:AjaxUpdatedControl ControlID="ARGrid1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="ARGrid1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="ARGrid1"   
                        LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManagerProxy> 
 
......  
 
<pm:PgMsg ID="PgMessage" runat="server" /> 
 
......  
                    <telerik:RadGrid ID="ARGrid1" runat="server" Width="97%" Height="95%" GridLines="None" PageSize="40" EnableAjaxSkinRendering="true" 
                         AllowSorting="true" AllowPaging="true" Visible="false" OnNeedDataSource="ARGrid1_NeedDataSource" OnItemCreated="ARGrid1_ItemCreated" 
                         OnItemCommand="ARGrid1_ItemCommand" OnGridExporting="ARGrid1_Exporting" ShowStatusBar="true" ShowGroupPanel="true" Skin="Outlook">  
                         <MasterTableView AllowFilteringByColumn="true" AllowMultiColumnSorting="true" Width="100%" CommandItemDisplay="Top" ShowGroupFooter="false" AutoGenerateColumns="true">  
                            <HeaderStyle Width="200px" /> 
                            <Columns></Columns>  
                            <CommandItemSettings AddNewRecordText="" ShowExportToPdfButton="true" ShowExportToWordButton="true" ShowExportToExcelButton="true" ShowExportToCsvButton="true" /> 
                         </MasterTableView> 
                         <ClientSettings AllowColumnsReorder="true" AllowDragToGroup="true" ColumnsReorderMethod="Reorder" EnableRowHoverStyle="true">  
                            <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="false" FrozenColumnsCount="0" ScrollHeight="100%" /> 
                            <Resizing ClipCellContentOnResize="false" AllowColumnResize="true" /> 
                         </ClientSettings> 
                         <GroupingSettings ShowUnGroupButton="true" RetainGroupFootersVisibility="false" /> 
                         <ExportSettings IgnorePaging="true" OpenInNewWindow="true">  
                            <Pdf AllowPrinting="true" /> 
                         </ExportSettings> 
                    </telerik:RadGrid> 
 
 
 

 

function onRequestStart(ajaxManager, eventArgs) {

 

 

if ((eventArgs.EventTarget == "ARGrid1") && (cancelAjax)) {

 

eventArgs.EnableAjax =

false;

 

}

 

//Uncomment the line below in case of a file download.

 

 

//cancelAjax = false;

 

 

if (eventArgs.get_eventTarget().indexOf("ExportToExcelButton") >= 0 ||

 

eventArgs.get_eventTarget().indexOf(

"ExportToWordButton") >= 0 ||

 

eventArgs.get_eventTarget().indexOf(

"ExportToPdfButton") >= 0 ||

 

eventArgs.get_eventTarget().indexOf(

"ExportToCsvButton") >= 0) {

 

eventArgs.set_enableAjax(

false);

 

}

 

 

//Used to display ajax graphic(twirly) over gridPane

 

currentLoadingPanel = $find(

"<%= RadAjaxLoadingPanel1.ClientID %>");

 

 

if (eventArgs.get_eventTarget() == "<%= btnSearch.UniqueID %>") {

 

currentUpdatedControl =

"<%= gridPane.ClientID %>";

 

}

 

//show the loading panel over the updated control

 

currentLoadingPanel.show(currentUpdatedControl);

 

 

}

 

CodeBehind:  I've commented out most to the code I've tried. The last attempt was with RegisterStartupScript.
      protected void Page_PreRender(object sender, EventArgs e)  
        {  
            //if (exportMsg != string.Empty)  
            //{  
            //    PgMessage.DisplayMessage(PageMessage.MessageType.Information, exportMsg);  
            //    exportMsg = string.Empty;  
            //}  
           ARGrid1.EnableAjaxSkinRendering = true;        
        }  
          
        protected void Page_Load(object sender, EventArgs e)  
        {  
            //Set up client side calls for AjaxProxyManager  
            RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);  
            manager.ClientEvents.OnRequestStart = "onRequestStart";  
            manager.ClientEvents.OnResponseEnd = "onResponseEnd";  
            manager.AjaxSettingCreated += new RadAjaxControl.AjaxSettingCreatedDelegate(manager_AjaxSettingCreated);  
            manager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(manager_AjaxRequest);  
 
 
            //Ajaxify user control for controls            
            Control mainPlaceHolder = Master.FindControl("MainPH");  
            Control pgMsg = mainPlaceHolder.FindControl("pgMessage");  
 
            RadAjaxLoadingPanel ajaxLoadingPanel = Master.FindControl("RadAjaxLoadingPanel1") as RadAjaxLoadingPanel;  
            manager.AjaxSettings.AddAjaxSetting(btnSearch, pgMsg, ajaxLoadingPanel);  
            manager.AjaxSettings.AddAjaxSetting(btnAddCode, pgMsg, ajaxLoadingPanel);  
            manager.AjaxSettings.AddAjaxSetting(lnkbtnSave, pgMsg, ajaxLoadingPanel);  
            manager.AjaxSettings.AddAjaxSetting(lnkbtnSaveAs, pgMsg, ajaxLoadingPanel);  
            manager.AjaxSettings.AddAjaxSetting(btnReset, pgMsg, ajaxLoadingPanel);  
            manager.AjaxSettings.AddAjaxSetting(ARGrid1, pgMsg, ajaxLoadingPanel);  
 
 
            PgMessage.ClearMessages();  
 
            //Render user control    
 
            if (!Page.IsPostBack)  
            {  
                BindSavedSettings(Master.loggedUser.UserReports);  
                BindCodeList();  
                BindListType();  
                BuildFieldList();  
            }  
 
            //RadComboBox1.Items.Add(new RadComboBoxItem("Add Item","Add Item"));                         
        }       
 
 
 
 
 
 
 
   protected void ARGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)  
        {  
            if (e.CommandName == Telerik.Web.UI.RadGrid.ExportToExcelCommandName ||  
                e.CommandName == Telerik.Web.UI.RadGrid.ExportToWordCommandName ||  
                e.CommandName == Telerik.Web.UI.RadGrid.ExportToCsvCommandName ||  
                e.CommandName == Telerik.Web.UI.RadGrid.ExportToPdfCommandName)  
            {  
                ConfigureExport();  
            }  
        }  
 
        private void DisplayMessageInRadGrid(string text)  
        {  
            // This places a nicely formatted message in the bottom row of the grid  
            ARGrid1.Controls.Add(new LiteralControl(text));  
        }  
 
        public void ConfigureExport()  
        {  
            //int gridCount = 0;  
            ////Get the total number of rows in the grid.  (Should take into account filters)  Done this way per Telerik.  Otherwise only get current pagesize  
            //ARGrid1.AllowPaging = false;  
            //ARGrid1.Rebind();  
            //gridCount = ARGrid1.MasterTableView.Items.Count;  
            //ARGrid1.AllowPaging = true;  
            //ARGrid1.Rebind();  
 
 
            ARGrid1.ExportSettings.ExportOnlyData =  true; //CheckBox1.Checked;  
            ARGrid1.ExportSettings.OpenInNewWindow = true; //CheckBox3.Checked;  
 
            if ((int)Session["itemsCount"] > 2000)  
            {  
                exportMsg = "Export exceeds record limit. Export was cut to 2000 records";  
                //DisplayMessageInRadGrid(exportMsg);  
                //PgMessage.DisplayMessage(PageMessage.MessageType.Information, "Export exceeds record limit. Export was cut to 2000 records");  
                  
                //*****  
            //***********************************************************  
            //Build cooresponding java script functions  
            //***********************************************************  
            // Get a ClientScriptManager reference from the Page class.  
            Type cstype = this.GetType();  
            ClientScriptManager cs = Page.ClientScript;  
            // Check to see if the startup script is already registered.  
            if (!cs.IsStartupScriptRegistered(cstype, "returnScript"))  
            {  
                //Build code to post back save/cancel button clicks  
                System.Text.StringBuilder cstext = new System.Text.StringBuilder();  
                cstext.AppendLine("<script type=\"text/javascript\">");  
                cstext.AppendLine("alert('" + exportMsg + "');");  
                cstext.AppendLine("</script>");  
                cs.RegisterStartupScript(cstype, "returnScript", cstext.ToString(), false);  
 
            }  
                //*******  
                DisplayMessageInRadGrid(exportMsg);  
                ARGrid1.ExportSettings.IgnorePaging = false; //CheckBox2.Checked;  
                ARGrid1.PageSize = 2000;  
                ARGrid1.Rebind();                  
            }  
            else  
            {  
                ARGrid1.ExportSettings.IgnorePaging = true; //CheckBox2.Checked;  
            }  
        }  
 
         protected void ARGrid1_Exporting(object source, Telerik.Web.UI.GridExportingArgs e)  
        {  
            isExport = true;  //sets exporting to true  
            //if (isExport && exportMsg != string.Empty)  
            //{  
            //    PgMessage.DisplayMessage(PageMessage.MessageType.Information, exportMsg);  
            //    exportMsg = string.Empty;  
            //}  
                
        } 
Daniel
Telerik team
 answered on 08 Apr 2010
1 answer
92 views
Hi,

this is shanker ,I am doing one application .My requirement is GridDropDownColumn  binding and filter with datakeys values How to solve this problem am using this code .But it's not working .I am getting this error object reference.

thisn is my  code   

if (e.ColumnEditor is GridDropDownColumnEditor)
            {
               int? session_id = TeacherBysessiongrid.MasterTableView.DataKeyValues[e.Column.EditFormColumnIndex]["session_id"].ToString().GetInteger();
                int? facilty_id = LogonDetails.Instance.sys_lclvar_default_facility_id;
                (e.ColumnEditor as GridDropDownColumnEditor).DataSource = teacherattendancemanager.sch_view_teacher_absence_session_substitute_teacher_lookup(facilty_id, RadsessionAttendancedate.SelectedDate.Value);
            }

how to solve this problem

thanks and regards
shanker.B
Veli
Telerik team
 answered on 08 Apr 2010
2 answers
168 views
How can I dynamically load an ASPX page to a pageView?
When I needed to load ASCX, I used these functions:
private void LoadTab(WizardTab tab) 
        { 
            // Enabling the tab 
            RadTab radStripCurrentTab = ConfigStrip.Tabs.FindTabByValue(tab.TabId.ToString()); 
            if (radStripCurrentTab != null) 
                radStripCurrentTab.Enabled = true; 
 
             
 
 
            // Loading the pageView into it 
            RadPageView pageView = new RadPageView(); 
            pageView.ID = tab.TabControlPath; 
            pageView.Selected = true; 
            ConfigMultiPage.PageViews.Add(pageView); 
 
 
        } 
 
protected void ConfigMultiPage_PageViewCreated(object sender, RadMultiPageEventArgs e) 
        { 
            RadMultiPage p = (RadMultiPage)sender; 
             
             
            AbstractConfigWizardTab tabControl = (AbstractConfigWizardTab)LoadControl(e.PageView.ID); 
            tabControl.PackageId = PackageId; 
            tabControl.ID = e.PageView.ID + "userControl"; 
            e.PageView.Controls.Add(tabControl); 
            ViewState["pv" + (ConfigMultiPage.PageViews.Count - 1).ToString()] = e.PageView.ID; 
        }  
 
 


But now I didn't find any way to load an ASPX! can u tell me how?

Yana
Telerik team
 answered on 08 Apr 2010
5 answers
184 views
Hi

I have a rather long page with images, when you click on an image it opens a radwindow with the full size image inside.

It all works except that when I click on a thumbnail lower down the page when the Radwindow opens it returns the page to the top, but the window is near to where you click, and you have to scroll down to see the Radwindow.

How can I stop this.

Andy
Andy Green
Top achievements
Rank 1
 answered on 08 Apr 2010
4 answers
224 views
For a project I am trying to add output caching to a user control.    The user control has a radpanel inside of it. 
The problem with this is when a cached version of the usercontrol is used, the appropriate Javascript is not added to the page.
Is there any easy way from  outside of the user control to tell the RadScriptmanager which javascript should be added in order for the RadPanel to work?    I need the system to remember the script that was added when the control was first cached, and re add  it on later incidences.
Darrel
Top achievements
Rank 1
 answered on 08 Apr 2010
3 answers
168 views
I don't know if this is related to other reports on full postbacks.  I have an app that works fine in IE and Firefox. I'm getting partial postbacks as expected, and no page flicker. I see that when I launch a RadWindow as a modal dialog, then close it, from that point forward the main page flickers on every request.  That only happens with FireFox, not IE.

Any ideas?
Thanks!
Pavlina
Telerik team
 answered on 08 Apr 2010
1 answer
107 views
Hi ,

I have a ASP Client based on Telerik grid with client side binding to web service.
This means that I have only one page of data each time and virtual items count of whole data.
Most of grid features like: Groping, Filtering with TelerikFilter and many other does not supported.

According to my application scenario I need to achieve the following functionality:
WCF server has access to DB - so the whole data exists only there.
ASP client will be binded to objectdatasource declared in client - but actually the data will be on WCF, this objectdatasource will be DAL .

1. Is it possible ? 
2. Will it give ability to use some features like grouping for example which is not available on simple binding ? 

Thanks .  


Daniel
Telerik team
 answered on 08 Apr 2010
1 answer
64 views
Instead of looping through the items in the rotator I'd like to have it come to the end and after displaying the last item rewind back to the beginning, quickly if possible.

i was able to emulate this as closely as possible by placing a counter on the items and when the last item is displayed I reverse the direction of the rotator and decrease scroll and frame duration to 0, but I don't get the effect I'm looking for. It does rewind, but it pauses slightly between each frame which doesn't give the wanted effect of "sliding" back to the starting position.

Additionally while I'm here... Is there any way to retreive how many items are in the rotator display window and how tall they are?

Thanks!
Pero
Telerik team
 answered on 08 Apr 2010
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?