Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
176 views
Hello ,

        I have a RadGrid in my page. The PagerItems are created using PagerTemplate.. I have asp buttons, ComboBox, RadNumerictextbox and a NumericPager. The code for pagertemplate is described below. I am using an ASP Panel for placing NumerPager in Pagertemplate.
<telerik:RadGrid ID="radgdSuccessionList" runat="server"   Font-Names="Verdana"  Skin="Marzar" EnableEmbeddedSkins="false" AutoGenerateColumns="False"  AllowMultiRowSelection="true"  >
            <ClientSettings  EnablePostBackOnRowClick="false" >
                <Selecting AllowRowSelect="True" />                                       
            </ClientSettings>
            <MasterTableView AllowPaging="true">
                <PagerTemplate>
                    <asp:Panel ID="PagerPanel" Style="padding: 6px" runat="server">
                        <div style="float: left">
                            <span style="margin-top: 2px; float: left; margin-right: 3px;font-size:8pt;">Page size:</span>
                            <telerik:RadComboBox Skin="Office2007" ID="RadComboBox1" DataSource="<%# new object[]{10, 20, 30, 40, 50} %>"
                                Style="margin-top: 2px;float: left; vertical-align: baseline; margin-right: 20px; text-align:center; height:25px"
                                Width="40px" SelectedValue='<%# DataBinder.Eval(Container, "Paging.PageSize") %>'
                                runat="server" OnClientSelectedIndexChanged="RadComboBox1_SelectedIndexChanged1" CssClass="CustomCssClass">
                            </telerik:RadComboBox
                        </div>                                         
                       <div style="margin: 0px; float: right;"></div>                                                                                                                                                                                           
                       <div style="margin: 0px; padding: 0px; float: left; margin-right: 10px; white-space: nowrap;">
                            <asp:Button ID="Button1" runat="server" OnClientClick="changePage1('first'); return false;"
                                CommandName="Page" CommandArgument="First" CssClass="PagerButton FirstPage" />
                            <asp:Button ID="Button2" runat="server" OnClientClick="changePage1('prev'); return false;"
                                CommandName="Page" CommandArgument="Prev" CssClass="PagerButton PrevPage" />
                            <span style="vertical-align: middle;font-size:8pt;">Page:</span>
                            <telerik:RadNumericTextBox ID="RadNumericTextBox1" Skin="Office2007" Width="25px" Font-Size="8pt"
                                Value='<%# (int)DataBinder.Eval(Container, "Paging.CurrentPageIndex") + 1 %>'
                                runat="server" EnabledStyle-HorizontalAlign="Center" >
                                <ClientEvents OnValueChanged="RadNumericTextBox1_ValueChanged1" />
                                <NumberFormat DecimalDigits="0" />
                            </telerik:RadNumericTextBox>
                            <span style="vertical-align: middle;font-size:8pt;">of
                                <%# DataBinder.Eval(Container, "Paging.PageCount")%>
                            </span>
                            <asp:Button ID="Button3" runat="server" OnClientClick="changePage1('next'); return false;"
                                CommandName="Page" CommandArgument="Next" CssClass="PagerButton NextPage" />
                            <asp:Button ID="Button4" runat="server" OnClientClick="changePage1('last'); return false;"
                                CommandName="Page" CommandArgument="Last" CssClass="PagerButton LastPage" />                                                                                                      
                       </div>  
                       <asp:Panel runat="server" ID="NumericPagerPlaceHolder"/>                                                                                                                                                                                                                   
                    </asp:Panel>
                </PagerTemplate>
            </MasterTableView>
            <HeaderStyle Font-Size="8pt" />                                                                               
        </telerik:RadGrid>
In the ItemCreated event function i have created the Numericpager.  Following code describe that functionality. I also attached a screen shot about that pager.  Now i come to my problem,  I want to handle the click events of that Pager. When i click the page numbers(1 2 3 4) i want to do some process. How can i handle this events from client side using javascript and from server side using C#
void radgdSuccessionList_ItemCreated(object sender, GridItemEventArgs e)
        {
            try
            {
                 
                    if (e.Item is GridPagerItem)
                    {
                        GridPagerItem gridPager = e.Item as GridPagerItem;
                        Control NumericPagerPlaceHolder = gridPager.GetNumericPager();
                         
                        Control placeHolder = gridPager.FindControl("NumericPagerPlaceHolder");
                        placeHolder.Controls.Add(NumericPagerPlaceHolder);
                    }
                    
                 
            }
            catch (Exception)
            { }
        }

Please give me the solution  for this problem.

Thanks,
Velkumar.
Iana Tsolova
Telerik team
 answered on 19 Apr 2011
1 answer
95 views
I'm playing around with the Q1 2011 Rad menu.

I'm able to easily style a static menu without problems, however, now I'm looking at a radmenu bound to an SQLDataSource. I've gone through several example (however have not tried adding C# code yet).

Can someone point me in the direction to successfully styling and configuring the radmenu items in this scenario (i.e. hover over background image, normal background image, etc)

Thanks!
Peter
Telerik team
 answered on 19 Apr 2011
1 answer
213 views
I want to use a stylesheet on a page that contains a RAD Editor control.  I do *not* want RAD Editor to take that stylesheet link and add it to the content iframe.  Seems like it should be simple to do, but nothing seems to work.  Here's my code:

<telerik:RadEditor ID="edtMe" runat="server" Skin="WebBlue" Height="600px" Width="100%"
    OnClientLoad="OnClientLoad"
    ContentFilters="RemoveScripts, FixUlBoldItalic, FixEnclosingP, IECleanAnchors, MozEmStrong, ConvertToXhtml, IndentHTMLContent"
    StripFormattingOptions="MSWordRemoveAll" OnClientPasteHtml="OnClientPasteHtml" SpellCheckSettings-AllowAddCustom="false">
    <CssFiles>
        <telerik:EditorCssFile Value="~/CSS/blank.css" />
    </CssFiles>
    <Content>
    </Content>
</telerik:RadEditor>


Using the CssFiles is the correct way to make this happen, right?  Not only are the page styles still being linked in the content iframe, but blank.css is *not* being included.  The content area iframe's head element looks like this:

<head>
    <style></style>
    <link href="/MvApp/WebResource.axd?d=ZMA9Nyl6OV-krKpF_AxH2ehr5-QYUrzahQKPDXQJIRbD47XVXXyGnhGGRWxBtFdN4Rbj-vRYXe6815fiQCJqONv8yYpz-mHqbT_xLF5uFGZiBNGg4prjb2HEQSOTlJ3QqpKfVUx83-JpV7QlzOL4nw2&t=634203434222846081" type="text/css" id="RADEDITORSTYLESHEET0" rel="stylesheet">
    <link href="./CSS/Styles.css" type="text/css" id="RADEDITORSTYLESHEET1" rel="stylesheet">
    <link href="App_Themes/Basic/MainMaster.css" type="text/css" id="RADEDITORSTYLESHEET2" rel="stylesheet">
    <link href="App_Themes/Basic/Menu.css" type="text/css" id="RADEDITORSTYLESHEET3" rel="stylesheet">
</head>

You'll notice that blank.css isn't there and Styles.css (the stylesheet I want on the page but not in the content), is.  Any thoughts?

I'm using RAD controls v2010.1.519.35.
Rumen
Telerik team
 answered on 19 Apr 2011
2 answers
124 views
Hi,

I cannot localize such undo\redo actions like "Enter", "Insert HTML", "Resize", "Set HTML", "Move". 
I have tried to define these keys in localization file (RadEditor.Tools.*.resx) but with no luck. Clearing browser cache and restarting application didn't help.
At the same time if I change any values from defined keys changes are shown in the editor.

Please help.
Sergey
Top achievements
Rank 1
 answered on 19 Apr 2011
1 answer
144 views
I have a screen with a slider area that shows an SSRS report and I don't want the report or the entire report viewer to use the form decorator code as it is messing up the report.  Please help asap.

 

 

 

 

<%@ Page Language="C#" AutoEventWireup="True" Inherits="HotelIQ.Report.AnalysisViewer"
    CodeBehind="AnalysisViewer.aspx.cs" %>
  
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head id="Head1" runat="server"/>
<body id="body" runat="server" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0"
    style="background-color: #333333">
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1">
    </telerik:RadScriptManager>
    <telerik:RadStyleSheetManager runat="server" ID="RadStyleSheet1" />
    <telerik:RadFormDecorator runat="server" ID="RadFormDecorator1" DecoratedControls="All"/>
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Height="99%" Width="100%">
        <telerik:RadPane ID="LeftPane" runat="server" Width="22" Scrolling="None">
            <div id="Zone1" runat="server">
                <telerik:RadSlidingZone ID="SlidingZone1" runat="server" Width="22" DockedPaneId="rspParameters">
                    <telerik:RadSlidingPane ID="rspParameters" Title="Parameters" runat="server" Width="400"
                        Height="100%">
                         <telerik:RadMenu ID="rmReport" runat="server" Width="100%" OnItemClick="rmReport_ItemClick">
                            <Items>
                                <telerik:RadMenuItem runat="server" Text="Parameters">
                                    <Items>
                                        <telerik:RadMenuItem runat="server" Text="Save">
                                        </telerik:RadMenuItem>
                                        <telerik:RadMenuItem runat="server" Text="Clear">
                                        </telerik:RadMenuItem>
                                    </Items>
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem runat="server" Text="View Analysis">
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem runat="server" Text="About">
                                </telerik:RadMenuItem>
                            </Items>
                        </telerik:RadMenu>
                        <table style="font-family: Tahoma; font-size: 10px" width="100%">
                            <tr>
                                <td colspan="2">
                                    <asp:RadioButtonList ID="rblHotelPortfolio" runat="server" RepeatDirection="Horizontal"
                                        AutoPostBack="True" Font-Size="10" Width="100%" OnSelectedIndexChanged="rblHotelPortfolio_SelectedIndexChanged">
                                        <asp:ListItem Text="Hotel" Selected="True" Value="Hotel">
                                        </asp:ListItem>
                                        <asp:ListItem Text="Portfolio" Value="Portfolio">
                                        </asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label runat="server" ID="lblHotelPortBrand" AssociatedControlID="wcHotelPortBrand"
                                        Text="Hotel/Portfolio" /> 
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="wcHotelPortBrand"
                                        ErrorMessage="Required" CssClass="text">Required</asp:RequiredFieldValidator>
                                </td>
                                <td>
                                    <telerik:RadComboBox ID="wcHotelPortBrand" runat="server" DataSourceID="sdsHotel"
                                        DataTextField="Selection_Nm" DataValueField="Selection_Id">
                                    </telerik:RadComboBox>
                                </td>
                            </tr>
                             <tr>
                                <td colspan="2">
                                    <hr />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label runat="server" ID="Label10" AssociatedControlID="txtStartDate">Start Date</asp:Label>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtStartDate"
                                        ErrorMessage="Required" CssClass="text">Required</asp:RequiredFieldValidator>
                                </td>
                                <td>
                                    <asp:Label runat="server" ID="Label11" AssociatedControlID="txtEndDate">End Date</asp:Label>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtEndDate"
                                        ErrorMessage="Required" CssClass="text">Required</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                            <td>
                                                <telerik:RadDatePicker ID="txtStartDate" MinDate="2009/1/1" runat="server" OnSelectedDateChanged="txtStartDate_TextChanged"
                                                    AutoPostBack="true">
                                                </telerik:RadDatePicker>
                                            </td>
                                <td>
                                    <telerik:RadDatePicker ID="txtEndDate" MinDate="2009/1/1" runat="server">
                                    </telerik:RadDatePicker>
                                </td>
                            </tr>
                        </table>
                    </telerik:RadSlidingPane>
                </telerik:RadSlidingZone>
            </div>
        </telerik:RadPane>
        <telerik:RadSplitBar ID="RadSplitbar1" runat="server" SkinID="Black">
        </telerik:RadSplitBar>
        <telerik:RadPane ID="ReportPane" runat="server">
                <rsweb:ReportViewer ID="rptViewer" runat="server" ShowPrintButton="true" Height="99%"
                    Width="100%" ShowRefreshButton="False" ShowParameterPrompts="false" AsyncRendering="True"
                    DocumentMapCollapsed="True" Enabled="True" ExportContentDisposition="AlwaysAttachment">
                </rsweb:ReportViewer>
        </telerik:RadPane>
    </telerik:RadSplitter>
    </form>
</body>
</html>

 

Georgi Tunev
Telerik team
 answered on 19 Apr 2011
4 answers
196 views
Hi all,
How can i change the default datepicker to just month picker and year picker?
And how can i fixed the picker that user are unable to click on FastNavigationStep and Navigationstep?

Thank you.
regards,
nasri
Arteta Sam
Top achievements
Rank 1
 answered on 19 Apr 2011
1 answer
148 views
I have a GridTemplateColumn that displays 3 columns of data - Parent/Child relationship with the current row.  I need to be able to filter on any of the three columns.

I can create a FilterTemplate that displays 3 textboxes in the FilterCell to match up with the 3 columns of data.  But I can't get the GridFilterMenu to attach to the textboxes.  The example for  the MS DropDownlist customization is sort of what I'm trying to do (http://www.telerik.com/help/aspnet-ajax/grdoperationswithdropdownlistinedititemtemplate.html).  But that is based on a single column of data.

Any ideas of how I can expand this to incorporate all the textboxes in the filter template?

Thanks
Martin
Telerik team
 answered on 19 Apr 2011
1 answer
71 views
Hello,

I need to specify the table name in my custom field editor and when I do it's formatting the results in a way I do not want. When I set FieldName = [TableName].[FieldName] my result is returned [[TableName].[FieldName]] = 12345. Is there a way I can suppress the formatting of the result so I can control the outcome?

Thanks!

Don
Radoslav
Telerik team
 answered on 19 Apr 2011
2 answers
98 views
Hi;
We are using RadTreeView and RadListBox . We have a unusal requirement Considering a scenario we want to use RadTreeView on Left Hand Side and RadListBox on RigthHandside and using Drag and drop mechanism of Telerik control we want to Transfer data from Left hand side to Right hand side ie from TreeView control to ListBox and Viseversa.
We have tried this but our problem was that we were not able to get Serverside Events when we transfer from TreeView control to ListBox control event like "OnNodeDrop".
Can you please tell us how we can able to achive this functionality.
Please Let us know ASAP
Genady Sergeev
Telerik team
 answered on 19 Apr 2011
4 answers
121 views
Hello,

I am trying to do some manual form processing from the Template form with simple text boxes. I have followed several documented examples and I am not getting any values back from my posted form. Can anybody help me understand what might be wrong here?

I would like to do some basic processing like this:

http://www.telerik.com/community/code-library/aspnet-ajax/grid/manual-insert-update-delete-using-formtemplate-and-sql-backend.aspx

I am using a custom business object to interface with my database and all I want to do is populate the object from the form values and call a procedure to handle the data processing on the backend. Simple enough right?

Protected Sub gridAdjustments_InsertCommand(ByVal source As Object, ByVal e As GridCommandEventArgs)
        Try
            Dim insertedItem As GridEditFormInsertItem = DirectCast(e.Item, GridEditFormInsertItem)
            Dim thisAdjustmentDetail As New AdjustmentDetail()          

            thisAdjustmentDetail.ChangedSSN = (TryCast(insertedItem.FindControl("txtSSN"), TextBox)).Text
            thisAdjustmentDetail.FirstName = (TryCast(insertedItem.FindControl("txtFirstName"), TextBox)).Text
            thisAdjustmentDetail.MiddleName = (TryCast(insertedItem.FindControl("txtMiddleName"), TextBox)).Text
            thisAdjustmentDetail.LastName = (TryCast(insertedItem.FindControl("txtLastName"), TextBox)).Text
            Dim qtrlyEarnings As String = (TryCast(insertedItem.FindControl("txtQuarterlyEarnings"), TextBox)).Text
            If qtrlyEarnings <> "" Then
                thisAdjustmentDetail.QuarterlyEarnings = Decimal.Parse(qtrlyEarnings)
            Else
                thisAdjustmentDetail.QuarterlyEarnings = 0D
            End If

            Dim insertDetailRecord As New DetailTable()
            insertDetailRecord.InsertDetail(thisAdjustmentDetail)
 
            thisAdjustmentDetail = Nothing
            insertDetailRecord = Nothing
        Catch ex As Exception
            gridAdjustments.Controls.Add(New LiteralControl("Unable to insert item: " + ex.Message))
            e.Canceled = True
        End Try
    End Sub

Any of the statements where I do the TryCast to grab the values from the EditForm return empty values. I am probably missing something obvious, so I hope you can help.

Thanks in advance,
Mike
Tsvetina
Telerik team
 answered on 19 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?