Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
106 views
Hi,

In a scenario I need not to Collapse the Expanded node even if it has Child nodes. In previous versions it worked by calling an event 'BeforeClientToggle= BeforeClientToggle'

function BeforeClientToggle(node)   
{   
   if (node.Nodes.length > 0)   
   {   
      return false;   
   }   
}


But in Ajax version, this event is not available.

Any suggestion to this query is appreciated.

Thanks,

Tulika
Paul
Telerik team
 answered on 02 Feb 2009
4 answers
319 views
I have the following code to display in my radgrid in a textbox with an id =txtComments but how do declare this variable to write an insert query in CS.
Similarly, if we add other controls within the radgrid,how can we display all the added controls in a messagebox to identify its row indexes?
Thanking you in advance !!

 

<telerik:GridTemplateColumn HeaderText="Comments" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">  
<ItemTemplate> 
<asp:TextBox ID="txtComments" runat="server" /> 
</ItemTemplate> 
</telerik:GridTemplateColumn> 
 

 

 

 

MANU
Top achievements
Rank 1
 answered on 02 Feb 2009
1 answer
256 views
The horizontal lines in my grid are not drawing properly (for certain columns) when there is grouping and a footer displaying aggregrates. If there is no grouping and footer, the lines appear fine.

The horizontal lines look thin for the length of the column, then return back to normal for other columns so it looks like it's been "shaved" for these columns.

My grid is as follows (and I can attach a screen shot of how my grid looks like). The first column is a checkbox column and I am creating the rest of the columns dynamically.

<telerik:radgrid id="PlanRadGrid" AllowFilteringByColumn="True" AllowSorting="True" AutoGenerateColumns="False" GridLines="Both" HeaderStyle-HorizontalAlign="Center" CommandItemStyle-HorizontalAlign="Left" HorizontalAlign="Justify" OnDataBound="PlanRadGrid_DataBound" OnItemCommand="PlanRadGrid_ItemCommand" runat="server" Skin="WebBlue" OnGroupsChanging="PlanRadGrid_GroupsChanging" OnItemCreated="PlanRadGrid_ItemCreated" GroupHeaderItemStyle-HorizontalAlign="Left" ShowFooter="True"  OnPreRender="PlanRadGrid_PreRender" OnItemDataBound="PlanRadGrid_ItemDataBound" OnInit="PlanRadGrid_Init" OnColumnCreating="PlanRadGrid_ColumnCreating" OnNeedDataSource="PlanRadGrid_NeedDataSource" >
     <MasterTableView TableLayout="Fixed" CommandItemDisplay="Top" DataKeyNames="ProjectID" GroupsDefaultExpanded="False"
 GroupLoadMode="Client" ShowGroupFooter="True" >
     <CommandItemTemplate>
        <asp:Button Runat="server" ID="ApplyFilterButton" Text="Apply Filtering" CommandName="MultiFilter" />
        <asp:Button Runat="server" ID="ClearAllFiltersLinkButton" Text="Clear All Filters" CommandName="ClearFilters" />
    </CommandItemTemplate>
    <NoRecordsTemplate> There are no projects for this plan version. </NoRecordsTemplate>
    <Columns>
        <telerik:GridTemplateColumn Groupable="False" AllowFiltering="False" UniqueName="CheckboxColumn" Resizable="False">   
            <HeaderTemplate>
                <asp:CheckBox  ID="headerChkbox" runat="server" OnCheckedChanged="ToggleSelectedState" AutoPostBack="True" />
            </HeaderTemplate>
            <ItemTemplate>
                <asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="False" />
            </ItemTemplate>
            <HeaderStyle HorizontalAlign="Center" Width="30px" />
                <ItemStyle HorizontalAlign="Center" />
            </telerik:GridTemplateColumn>
    </Columns>
    <ExpandCollapseColumn>
        <HeaderStyle Width="20px" />
    </ExpandCollapseColumn>
     <RowIndicatorColumn>
    <HeaderStyle Width="20px" />
    </RowIndicatorColumn>
    <CommandItemStyle BackColor="Beige" VerticalAlign="Top" Font-Bold="True" Font-Size="Small" HorizontalAlign="Left" />
    </MasterTableView>
    <FooterStyle Font-Bold="True" Font-Size="Small" Font-Italic="True" />
<HeaderStyle HorizontalAlign="Center" />
<GroupHeaderItemStyle HorizontalAlign="Left" />
<CommandItemStyle HorizontalAlign="Left" />
<FilterMenu EnableTheming="True" Skin="WebBlue">
<CollapseAnimation Duration="200" Type="OutQuint" />
</FilterMenu>
</telerik:radgrid> 



Thankyou for your assistance,

Danielle

 

 

 

 

Sebastian
Telerik team
 answered on 02 Feb 2009
1 answer
153 views
We have main Master Page with other Master Pages derived from it with the content pages then underneath.
On the main Mater we have a logout control. I placed the RadScriptManager on the main Master page but when I log out I get

Script controls may not be registered before PreRender.

[InvalidOperationException: Script controls may not be registered before PreRender.]
   System.Web.UI.ScriptControlManager.RegisterScriptControl(TScriptControl scriptControl) +236
   System.Web.UI.ScriptManager.RegisterScriptControl(TScriptControl scriptControl) +99
   Telerik.Web.UI.RadDataBoundControl.RegisterScriptControl() +41
   Telerik.Web.UI.RadPanelBar.OnPreRender(EventArgs e) +34
   System.Web.UI.Control.PreRenderRecursiveInternal() +86


Suggestions?
Mark
Top achievements
Rank 2
 answered on 02 Feb 2009
3 answers
243 views
Hi,

I have to show radconfirmation dialog before delete operation in radgrid. Also need to display custom message on the confirmation dialog.. 
Like "Are you sure you want to delete product 'ABC' " I have tried to do some code but still not success.

I have tried below code but getting Javascript error "Object expected" in "<linkhref="/WebResource.axd?d=urRCJ9LaDJqEF5aV-iBV2TIs0dSMdI5QLTwDSrfjbfCGWUF2qWm4BeeTnO4BKP0kF2nLj4geiEZ4adWKDh0FWg2&amp;t=633523224580000000"


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="radconfirm.aspx.cs" Inherits="Northwind.Web.ClientModule.radconfirm" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
        <asp:Button ID="btnDelete" runat="Server" OnClientClick="return radconfirm('Delete Item?', event);"
            Text="Delete Item" OnClick="btnDelete_Click" />
        <asp:LinkButton ID="linkBtn" runat="Server" OnClientClick="return radconfirm('Delete Item?', event);"
            Text="Delete Item" OnClick="linkBtn_Click" />
        <telerik:radwindowmanager id="RadWindowManager1" runat="server">
            <confirmtemplate>
                {1}      
                <center>
                 <input class="Button" type="button"  style="width:50px" id="dialogYes" value="OK1" onclick="Close()"/>
                <input class="Button" type="button" id="dialogNo" value="No" onclick="javascript:GetRadWindow().ModalDialogCallBack('No');"/>
                 <input class="Button" type="button" style="width:50px" id="dialogCancel" value="Cancel" onclick="javascript:GetRadWindow().close();"/>
                </center>
            </confirmtemplate>
        </telerik:radwindowmanager>
        <asp:Label ID="Label1" runat="server"></asp:Label>

        <script>
            //Replace old radconfirm with a changed version.   
            var oldConfirm = radconfirm;

            window.radconfirm = function(text, mozEvent) {
                alert("1");
                var ev = mozEvent ? mozEvent : window.event; //Moz support requires passing the event argument manually   
                //Cancel the event   
                ev.cancelBubble = true;
                ev.returnValue = false;
                if (ev.stopPropagation) ev.stopPropagation();
                if (ev.preventDefault) ev.preventDefault();

                //Determine who is the caller   
                var callerObj = ev.srcElement ? ev.srcElement : ev.target;

                //Call the original radconfirm and pass it all necessary parameters   
                if (callerObj) {
                    //Show the confirm, then when it is closing, if returned value was true, automatically call the caller's click method again.   
                    var callBackFn = function(arg) {
                        if (arg) {
                            window.setTimeout(function() {
                                callerObj["onclick"] = "";
                                if (callerObj.click) callerObj.click(); //Works fine every time in IE, but does not work for links in Moz   
                                else if (callerObj.tagName == "A") //We assume it is a link button!   
                                {
                                    try {
                                        eval(callerObj.href)
                                    }
                                    catch (e) { }
                                }
                            }, 0);
                        }
                    }
                    oldConfirm(text, callBackFn, 300, 100, null, null);
                }
                return false;
            }  

        </script>

    </div>
    </form>
</body>
</html>


Fiko
Telerik team
 answered on 02 Feb 2009
6 answers
261 views
Hi all,

I have designed a rad grid and I want to export data within grid,
I have put 2 image buttons above grid 1 to export in excel formatr and other for PDF, excel button export data and no problem with it, but PDF button when click on, it shows PDF with the format I have customized but no data exported inside, and this code of this button:
<asp:ImageButton ID="ImageButton1" runat="server" AlternateText="Export to PDF"   
                                            ImageUrl="~/App_Data/Pdf.png" onclick="ImageButton1_Click"   
                                            CommandName="ExportToPdf" /> 

and I have handeled action oe this button as following:
protected void ImageButton2_Click(object sender, ImageClickEventArgs e)  
        {  
            ConfigureExport();  
            RadGrid1.MasterTableView.ExportToExcel();  
        } 

but no data appears inside PDF.
Any one can help??

Regards
Daniel
Telerik team
 answered on 02 Feb 2009
1 answer
162 views
I want to have a RadWindow with a scheduler in it...I'd like the scheduler to keep to the size of the window

Is that even doable?  Inside VS the scheduler has the proper size (100%, 100%), but when I load it in the window it's shrunk back down again
Georgi Tunev
Telerik team
 answered on 02 Feb 2009
1 answer
112 views
Hi @,
Is there any way to find RadCombo Box in javascript.
I want to find out the selected value or item of RadCombo box which is inside a Datagrid using javascript.

Thanks in advance,
Simon
Telerik team
 answered on 02 Feb 2009
9 answers
454 views
We have a particular scenario where we have a MasterPage that contains a RadWindow in the RadWindowManager.  When this RadWindow is made visible, certain actions that are made in the RadWindow need to be reflected in the current content page loaded in the MasterPage asyncronously. We are attempting to accomplish this task through various javascript calls.

The goal of our RadWindow is to act as a 'DockCatalog' that contains a listing of the available docks the user can add to the page, and a listing of the current docks already on the page.  Through this window, entries in the database are added/removed that represent the docks for the user.  The content page loaded into the master page contains all of the loaded current docks for the user.

The following javascript is called from the page in the RadWindow.  It's purpose is to call another javascript function to refresh the docks on the content page when the user selects to add or remove a dock item from the page.
// Refresh the docks on the parent page of the radwindows to show the changes  
// the user made from the catalog. 
function RefreshParentPage() 
    var rWindow = GetRadWindow(); 
    if (rWindow != null
        rWindow.BrowserWindow.RefreshDocks(); 


The RefreshDocks() function exists on the master page and calls the actual AjaxRequest which will cause Docks to be added or removed from the current page.
// Refresh the docks on the page because the user has  
// added/removed dock customizations from the catalog window. 
function RefreshDocks() 
    var ajaxManager = <%= RadAjaxManagerMaster.ClientID %>; 
    ajaxManager.AjaxRequest("CatalogItemsInUseChanged");  


The handler for this ajax request will reload the docks on the page based on entries in the database for the user.  That way the RadWindow catalog can add and remove items to this content page.

Our problem is that we are not sure what AjaxSettings to add to the AjaxManager so that we can see the added/removed Docks without refreshing the page.  I know the initiator needs to be the RadAjaxManager, but I am unsure what should be the updated control.  Since the AjaxRequest could add or remove docks to and from the current layout, what control should I place as the updated control.   I only want it to be ajaxify the process of adding and removing docks from the dock layout. 

Below is a snippet of the markup file for the content page that has the docks.
<telerik:RadDockLayout runat="server" ID="RadDockLayout1" OnSaveDockLayout="RadDockLayout1_SaveDockLayout" 
        OnLoadDockLayout="RadDockLayout1_LoadDockLayout"
        <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%" Height="550px"
            <telerik:RadPane ID="RadPane1" runat="server" Scrolling="Y"
                <telerik:RadDockZone runat="server" ID="RadDockZone1" BorderStyle="None"
                </telerik:RadDockZone> 
            </telerik:RadPane> 
            <telerik:RadSplitBar ID="RadSplitBar1" runat="server" Width="20" Height="100%"></telerik:RadSplitBar> 
            <telerik:RadPane ID="RadPane2" runat="server" Scrolling="Y"
                <telerik:RadDockZone BorderStyle="None" ID="RadDockZone2" runat="server"
                </telerik:RadDockZone> 
            </telerik:RadPane> 
        </telerik:RadSplitter> 
        <div style="display: none"
            <asp:UpdatePanel runat="server" ID="UpdatePanel1"
                <Triggers> 
                </Triggers> 
            </asp:UpdatePanel> 
        </div> 
    </telerik:RadDockLayout> 


Any suggestions?  Is there a better way I can add docks from on the fly actions occuring within the RadWindow?

Iana Tsolova
Telerik team
 answered on 02 Feb 2009
3 answers
147 views
Hi!

In my work all buttons work, except DELETE, always when I press button Delete, it gives me an error "Object reference not set to an instance of an object."
here is my small demo

Can anyone tell me what is wrong with it?
Sebastian
Telerik team
 answered on 02 Feb 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?