Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
124 views

Hello,

I have a RadGrid that opens a RadWindow (client side) on row click event.

On the first time I open the RadWindow, fields are empty, but once I fill data in browser  and I close the RadWindow, then I open another RadWindow by clicking on another RadGrid's row, I have data filled in the first RadWindow.

 I did this and I still have this problem : ReloadOnShow="true" DestroyOnClose="true" EnableViewState="false".

Thanks for helping,

Abitar

Abitar
Top achievements
Rank 1
 asked on 23 Oct 2015
2 answers
198 views

I am trying to only allow pdf's and I am running into a javascript error of Object Expected in the UploadValidation.js file.  See the attached image.  What am I not doing right?  Below is my source code.

<%@ Page Title="Authority Meetings" Language="C#" MasterPageFile="~/themes/default/default.master" AutoEventWireup="true" CodeFile="AddEditMeetings.aspx.cs" Inherits="AddEditMeetings" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <script type ="text/javascript" src="../Scripts/UploadValidation.js"></script>
    <link rel="stylesheet" type="text/css" href="../Styles/FileUploadValidation.css" />
    <style type="text/css">     
        #ConstructionPanel {
            z-index: 4999 !important;
        }
        .modal-backdrop
        {
            background-color: Black;
            filter: alpha(opacity=90);
            opacity: 0.8;
            z-index: 4998 !important;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <ajax:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </ajax:ToolkitScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server"
        <Triggers>
            <asp:PostBackTrigger ControlID="btnSubmit" />
        </Triggers
        <ContentTemplate>  
            <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
                <Windows>
                    <telerik:RadWindow ID="EventsWindow" runat="server" ShowContentDuringLoad="false" Width="800px"
                        Height="800px" Title="Current Road Conditions" Behaviors="Default">
                    </telerik:RadWindow>
                </Windows>
            </telerik:RadWindowManager>
            <h3>Authority Meetings</h3>
            <asp:LinkButton ID="lnkBtnNew" runat="server" class="btn btn-success" OnClick="lnkBtnNew_Click" CausesValidation="False"><i class="icon-plus-sign icon-white"></i> Add New</asp:LinkButton>
            <asp:LinkButton ID="lnkBtnShowMeetings" runat="server" CssClass="btn btn-success" OnClick="lnkBtnShowMeetings_Click" CausesValidation="False"><i class="icon-plus-sign icon-white"></i> View Page</asp:LinkButton>
            <asp:Button ID="btnHidden" runat="server" Style="display: none" />
            <ajax:ModalPopupExtender ID="mpeMeeting" runat="server" PopupControlID="MeetingPanel"
                DynamicServicePath="" Enabled="True" TargetControlID="btnHidden"  BackgroundCssClass="modal-backdrop fade in"/>
            <asp:Panel runat="server" ID="MeetingPanel" DefaultButton="btnSubmit" CssClass="rounded-bottom rounded-top"
                Style="display: none; border: 1px; border-style: solid; border-color: Gray;
                background-color: white; padding: 3px; width:60%;">
                <div class="modal-header">                   
                    <h3>
                        <asp:Label ID="lblAddNewMeeting" runat="server" Text="Add a New Meeting"></asp:Label></h3>
                </div>
                <div class="modal-body form-horizontal">
                    <asp:TextBox ID="txtMeetingID" runat="server" Visible="false"></asp:TextBox>
                    <asp:TextBox ID="txtLastUpdateDate" runat="server" Visible="false"></asp:TextBox>
                    <asp:TextBox ID="txtLastupdateBy" runat="server" Visible="false"></asp:TextBox>
                    <asp:TextBox ID="txtCreatedDate" runat="server" Visible="false"></asp:TextBox>
                    <asp:TextBox ID="txtCreatedBy" runat="server" Visible="false"></asp:TextBox>
                    <fieldset>
                        <asp:Panel ID="pnlMeetingDate" runat="server">
                            <legend>
                                <h6>
                                    Meeting Information:</h6>
                            </legend>                       
                            <div class="control-group">
                                <asp:Label ID="lblMeetingDate" CssClass="control-label" runat="server" Text="Date/Time: "></asp:Label>
                                <div class="controls">
                                    <telerik:RadDateTimePicker Skin="MetroTouch" ZIndex="500000" Width="350px" ID="txtMeetingDate" runat="server">
                                        <Calendar ID="Calendar1" runat="server">
                                            <SpecialDays>
                                                <telerik:RadCalendarDay Repeatable="Today" ItemStyle-BackColor="Yellow">
                                                </telerik:RadCalendarDay>
                                            </SpecialDays>
                                        </Calendar>
                                    </telerik:RadDateTimePicker>
                                    <asp:RequiredFieldValidator ID="rfvMeetingDate" runat="server" ControlToValidate="txtMeetingDate"
                                        ValidationGroup="grpNewMeeting" ErrorMessage="Both time and date fields must have values.">*</asp:RequiredFieldValidator>
                                </div>
                            </div>
                        </asp:Panel>
                    </fieldset>
                    <fieldset>
                        <legend>
                            <h6>
                                Add/Edit Meeting Documents:</h6>
                        </legend>                                                
                        <asp:Panel ID="pnlDocumentsUpload" runat="server" Visible="false">                                   
                            <div class="control-group">
                                <asp:Label ID="lblDocumentType" CssClass="control-label" runat="server" Text="Document Type:  "></asp:Label>
                                <div class="controls">
                                    <asp:DropDownList ID="ddlFileType" OnDataBound="ddlFileType_DataBound" runat="server">
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="control-group">                               
                                <asp:Label ID="lblSelectFile" CssClass="control-label" runat="server" Text="Select a File:  "></asp:Label>
                                <div class="controls">                                   
                                    <telerik:RadAsyncUpload runat="server" ID="AsyncUpload1" AllowedFileExtensions="pdf"
                                    MultipleFileSelection="Disabled" Width="500px" Skin="Default"  MaxFileInputsCount="1"
                                    OnClientValidationFailed="validationFailed" UploadedFilesRendering="BelowFileInput" />
                                    <asp:LinkButton ID="btnUpload2" runat="server" onclick="btnUpload2_Click"                                                    
                                            CssClass="btn btn-info btn-mini"><i class="icon-edit icon-white"></i>Upload</asp:LinkButton>
                                </div>
                            </div>                       
                        </asp:Panel>
                        <div class="control-group">
                            <asp:Literal ID="litUploadError" runat="server" />
                        </div>
                    </fieldset>
                    <fieldset>
                        <asp:Panel ID="pnlDocuments" runat="server">
                            <div class="control-group">
                                <asp:GridView ID="gvDocuments" CssClass="table table-bordered table-striped" runat="server" AutoGenerateColumns="False"
                                    DataKeyNames="FileID" OnRowCommand="gvDocuments_RowCommand" OnRowCreated="gvDocuments_RowCreated"
                                    OnRowDeleting="gvDocuments_RowDeleting" GridLines="None">
                                    <Columns>
                                        <asp:BoundField DataField="FileID" HeaderText="File ID" InsertVisible="false" ReadOnly="true"
                                            SortExpression="FileID" Visible="false" />
                                        <asp:BoundField DataField="FileName" HeaderText="File Name" SortExpression="FileName"
                                            Visible="false" />
                                        <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
                                        <asp:BoundField DataField="ConstructionID" HeaderText="ConstructionID" SortExpression="ConstructionID"
                                            Visible="false" />
                                        <asp:BoundField DataField="CreateDate" HeaderText="Created Date" SortExpression="CreateDate" />
                                        <asp:BoundField DataField="UpdateDate" HeaderText="Updated Date" SortExpression="UpdateDate"
                                            Visible="false" />
                                        <asp:TemplateField>
                                            <HeaderTemplate>
                                                Download
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <asp:LinkButton ID="imgBtnDownload" runat="server" CommandArgument='<%# Bind("FileID") %>'
                                                    CommandName="Download" CssClass="btn btn-info btn-mini"><i class="icon-edit icon-white"></i>View</asp:LinkButton>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField>
                                            <HeaderTemplate>
                                                Delete
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <asp:LinkButton ID="imgBtnDelete" runat="server" CommandArgument='<%# Bind("FileID") %>'
                                                    CommandName="Delete" CssClass="btn btn-info btn-mini"><i class="icon-edit icon-white"></i>Delete</asp:LinkButton>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                </asp:GridView>
                            </div>                           
                        </asp:Panel
                    </fieldset>
                    <fieldset>
                        <asp:Panel ID="pnlMeetingComments" runat="server">
                            <legend>
                                <h6>
                                    Meeting Comments:
                                </h6>
                            </legend>
                            <div class="control-group">
                                <asp:Label ID="lblComments" runat="server" CssClass="control-label" Text="Meeting Comments: "></asp:Label>
                                <div class="controls">
                                    <telerik:RadEditor ID="txtComments" runat="server" Width="80%" Height="250px" EnableResize="false" SkinID="DefaultSetOfTools"
                                        ResolvedRenderMode="Classic">
                                        <Tools>
                                            <telerik:EditorToolGroup>
                                                <telerik:EditorTool Name="Cut" />
                                                <telerik:EditorTool Name="Copy" />
                                                <telerik:EditorTool Name="ConvertToUpper" />
                                                <telerik:EditorTool Name="ConvertToLower" />
                                                <telerik:EditorTool Name="Zoom" />
                                                <telerik:EditorTool Name="FindAndReplace" />
                                                <telerik:EditorTool Name="Print" />
                                                <telerik:EditorTool Name="PasteStrip" />
                                                <telerik:EditorTool Name="PasteFromWord" />
                                                <telerik:EditorTool Name="PaseFromWordNoFontsNoSizes" />
                                                <telerik:EditorTool Name="PastePlainText" />
                                                <telerik:EditorTool Name="PasteHtml" />
                                                <telerik:EditorTool Name="PasteAsHtml" />
                                                <telerik:EditorTool Name="Undo" />
                                                <telerik:EditorTool Name="Redo" />
                                                <telerik:EditorTool Name="FormatStripper" />
                                                <telerik:EditorTool Name="InsertParagraph" />
                                                <telerik:EditorTool Name="FormatBlock" />
                                                <telerik:EditorTool Name="Indent" />
                                                <telerik:EditorTool Name="Outdent" />
                                                <telerik:EditorTool Name="JustifyLeft" />
                                                <telerik:EditorTool Name="JustifyCenter" />
                                                <telerik:EditorTool Name="JustifyRight" />
                                                <telerik:EditorTool Name="JustifyFull" />
                                                <telerik:EditorTool Name="JustifyNone" />
                                                <telerik:EditorTool Name="InsertUnorderedList" />
                                                <telerik:EditorTool Name="InsertOrderedList" />
                                                <telerik:EditorTool Name="Bold" />
                                                <telerik:EditorTool Name="Italic" />
                                                <telerik:EditorTool Name="Underline" />
                                                <telerik:EditorTool Name="StrikeThrough" />
                                                <telerik:EditorTool Name="FontName" />
                                                <telerik:EditorTool Name="RealFontSize" />
                                                <telerik:EditorTool Name="ForeColor" />
                                                <telerik:EditorTool Name="BackColor" />
                                                <telerik:EditorTool Name="LinkManager" ShortCut="CTRL+K" />
                                            </telerik:EditorToolGroup>
                                        </Tools>
                                        <Modules>
                                            <telerik:EditorModule Name="RadEditorStatistics" Visible="false" Enabled="true">
                                            </telerik:EditorModule>
                                            <telerik:EditorModule Name="RadEditorDomInspector" Visible="false" Enabled="true">
                                            </telerik:EditorModule>
                                            <telerik:EditorModule Name="RadEditorNodeInspector" Visible="false" Enabled="true">
                                            </telerik:EditorModule>
                                            <telerik:EditorModule Name="RadEditorHtmlInspector" Visible="false" Enabled="true">
                                            </telerik:EditorModule>
                                        </Modules>
                                    </telerik:RadEditor>
                                </div>
                            </div>
                        </asp:Panel>
                    </fieldset>
                    <fieldset>
                        <asp:Panel ID="pnlStatus" runat="server">
                            <legend>
                                <h6>
                                    Status</h6>
                            </legend>
                            <div class="control-group">
                                <asp:Label ID="lblStatus" CssClass="control-label" runat="server" Text="Active: "
                                    ToolTip="If you select active this meeting will be displayed on the main web page"></asp:Label>
                                <div class="controls">
                                    <asp:DropDownList ID="ddlStatus" runat="server">
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="control-group" style="display: none">
                                <asp:Label ID="lblVersion" CssClass="control-label" runat="server" Text="Version: "></asp:Label>
                                <div class="controls">
                                    <asp:TextBox ID="txtVersion" runat="server" ReadOnly="true"></asp:TextBox>
                                    <asp:RegularExpressionValidator ID="revVersion" runat="server" ErrorMessage="* Please enter a valid time."
                                        Display="Dynamic" ControlToValidate="txtVersion" ValidationExpression="^[0-9]*$">
                                    </asp:RegularExpressionValidator>
                                </div>
                            </div>
                        </asp:Panel>
                    </fieldset>
                </div>
                <div class="modal-footer">                   
                    <div class="control-group">
                        <div class="controls">
                            <asp:ValidationSummary ID="vsgrpNewConstruction" DisplayMode="List" CssClass="alert alert-error" ValidationGroup="grpNewMeeting" runat="server" ForeColor="Maroon" />
                            <asp:Label ID="litSubmitError" Visible="false" runat="server" ForeColor="Maroon"></asp:Label>
                        </div>
                    </div>
                    <asp:Button ID="btnSaveAddDocuments" CssClass="btn btn-primary" runat="server" ValidationGroup="grpNewMeeting" Text="Add Documents"
                        CausesValidation="false" OnClick="btnSaveAddDocuments_Click" />
                    <asp:Button ID="btnSubmit" CssClass="btn btn-primary" runat="server" ValidationGroup="grpNewMeeting" Text="Save"
                        CausesValidation="false" OnClick="btnSubmit_Click" />
                    <asp:Button ID="btnCancel" CssClass="btn" runat="server" Text="Cancel" CausesValidation="false"
                        OnClick="btnCancel_Click" />
                </div>
            </asp:Panel>
            <div class="row">
                <div class="span12">
                    <div class="control-group">
                        <div class="controls">
                            <asp:Literal ID="litStatus" runat="server" />
                        </div>
                    </div>
                </div>
                <div class="span12">
                    <telerik:RadGrid ID="gvMeetings2" runat="server"
                        AllowPaging="True"
                        AllowSorting="true"
                        AutoGenerateColumns="False" ResolvedRenderMode="Classic"
                        onneeddatasource="gvMeetings2_NeedDataSource">                                       
                        <SortingSettings EnableSkinSortStyles="false"></SortingSettings>
                        <GroupingSettings CaseSensitive="false" />
                        <MasterTableView>
                        <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="True"></PagerStyle>                                       
                            <Columns>
                                <telerik:GridTemplateColumn>
                                    <HeaderTemplate>
                                        Edit
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:LinkButton ID="imgBtnEdit" runat="server" CssClass="btn btn-info btn-mini"
                                        CommandArgument='<%# Bind("MeetingID") %>' OnClick="imgBtnEdit_Click" ><i class="icon-edit icon-white">
                                        </i> View & Edit</asp:LinkButton>
                                    </ItemTemplate>                                   
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn DataField="MeetingDate"
                                    FilterControlAltText="Filter MeetingDate column" HeaderText="Scheduled On"
                                    UniqueName="MeetingDate">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Comments"
                                    FilterControlAltText="Filter Comments column" HeaderText="Comments"
                                    UniqueName="companyname">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="LastUpdateDate"
                                    FilterControlAltText="Filter LastUpdateDate column" HeaderText="Updated On"
                                    UniqueName="LastUpdateDate">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="LastUpdateBy"
                                    FilterControlAltText="Filter LastUpdateBy column" HeaderText="Edited By"
                                    UniqueName="LastUpdateBy">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="CreatedBy"
                                    FilterControlAltText="Filter CreatedBy column" HeaderText="Created By"
                                    UniqueName="CreatedBy">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="CreatedDate"
                                    FilterControlAltText="Filter CreatedDate column" HeaderText="Created"
                                    UniqueName="CreatedDate">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Version" Visible="false"
                                    FilterControlAltText="Filter Version column" HeaderText="Version"
                                    UniqueName="Version">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="StatusDescription"
                                    FilterControlAltText="Filter StatusDescription column" HeaderText="Status"
                                    UniqueName="StatusDescription">
                                </telerik:GridBoundColumn>
                            </Columns>
                        </MasterTableView>
                        <EditItemStyle BorderWidth="5px" />
                    </telerik:RadGrid>                   
                    <asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="UpdatePanel1" runat="server">
                        <ProgressTemplate>
                            <div class="progress progress-striped active">
                                <div class="bar" style="width: 100%;"></div>
                            </div>
                        </ProgressTemplate>
                    </asp:UpdateProgress
                </div>               
            </div>      
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

UploadValidation.js
(function () {
    var $;
    var demo = window.demo = window.demo || {};
 
    demo.initialize = function () {
        $ = $telerik.$;
    };
 
    window.validationFailed = function (RadAsyncUpload, args) {
        var $row = $(args.get_row());
        var erorMessage = getErrorMessage(RadAsyncUpload, args);
        var span = createError(erorMessage);
        $row.addClass("ruError");
        $row.append(span);
    }
 
    function getErrorMessage(sender, args) {
        var fileExtention = args.get_fileName().substring(args.get_fileName().lastIndexOf('.') + 1, args.get_fileName().length);
        if (args.get_fileName().lastIndexOf('.') != -1) {//this checks if the extension is correct
            if (sender.get_allowedFileExtensions().indexOf(fileExtention) == -1) {
                return ("This file type is not supported.");
            }
            else {
                return ("This file exceeds the maximum allowed size of 500 KB.");
            }
        }
        else {
            return ("not correct extension.");
        }
    }
 
    function createError(erorMessage) {
        var input = '<span class="ruErrorMessage">' + erorMessage + ' </span>';
        return input;
    }
 
 
 
})();
Ivan Danchev
Telerik team
 answered on 23 Oct 2015
0 answers
153 views
<telerik:GridViewDataColumn Header="Node Name" Width="200" ColumnGroupName="BasicInformation" x:Name="test">
                                        <telerik:GridViewDataColumn.CellTemplate>
                                            <DataTemplate>
                                                <telerik:RadComboBox VerticalAlignment="Center" ItemsSource="{Binding Path=Cells,Source={StaticResource lcgroupconfigurationModel}}"
                                                                     SelectedValuePath="CellId" SelectedItem="{Binding Path=SelectedCell,Mode=TwoWay}"
                                                                     x:Name="cbxCells1" >
                                                    <telerik:RadComboBox.ItemTemplate>
                                                        <DataTemplate>
                                                            <TextBlock Text="{Binding Path=CellName}"></TextBlock>
                                                        </DataTemplate>
                                                    </telerik:RadComboBox.ItemTemplate>
                                                    <i:Interaction.Triggers>
                                                        <i:EventTrigger EventName="SelectionChanged">
                                                            <commands:EventToCommand Command="{Binding Path=CellSelectionChangedCommand}" ></commands:EventToCommand>
                                                        </i:EventTrigger>
                                                        <i:EventTrigger EventName="DropDownOpened">
                                                            <commands:EventToCommand Command="{Binding Path=DropDownOpenedCommand}" ></commands:EventToCommand>
                                                        </i:EventTrigger>
                                                    </i:Interaction.Triggers>
                                                </telerik:RadComboBox>
                                            </DataTemplate>
                                        </telerik:GridViewDataColumn.CellTemplate>
                                        
                                    </telerik:GridViewDataColumn>
Shanmuga
Top achievements
Rank 1
 asked on 23 Oct 2015
6 answers
222 views
In the Page.PrerenderComplete event for !IsPostBack, I find a RadComboBoxItem and set the Selected property but the Text in the RadComboBox does not change. I can also set the RadComboBox.SelectedItemIndex and that still does not work. When the ComboBox renders, the old text is still there but when I do the drop down I see the item I selected using either method. I have degugged the control and see the properties I am setting Ok but never see the Text property change. The initial data load is bound to a SqlDataSource within the UC.

Shouldn't the ComboBox.Text follow the setting of either of these properties?

Also, this is inside of a user control on a page and it seems there have been others with the problem when inside a uc. I have another just in a regular page but not a UC and it works fine as expected.

Thanks, Dave
Linta Sheel
Top achievements
Rank 1
 answered on 23 Oct 2015
2 answers
361 views

Hi

I have a RadPivotTable with a RadHTMLChart.  I need the chart to show the value in percentage in a Pie format.

For example I have values is 500, 250 and 250 and the total of the pivot row is 1000.  I want to see the percentage in the pie : 50%, 25%, 25%.

Is this possible?

<telerik:RadPivotGrid ID="grdTotalTimings" runat="server" AllowPaging="true" PageSize="10" Skin="WebBlue" Width="30em"
    ShowDataHeaderZone="false" ShowRowHeaderZone="false" ShowColumnHeaderZone="false"
    OnNeedDataSource="grdTotalTimings_NeedDataSource" OnCellDataBound="grdTotalTimings_CellDataBound">  
    <Fields>
        <telerik:PivotGridReportFilterField DataField="Period" ></telerik:PivotGridReportFilterField>
        <telerik:PivotGridRowField DataField="AreaName" ></telerik:PivotGridRowField>
        <telerik:PivotGridAggregateField DataField="Amount" Aggregate="Sum" DataFormatString="{0:N0}"></telerik:PivotGridAggregateField>
        <telerik:PivotGridAggregateField DataField="Value" Aggregate="Sum" DataFormatString="{0:C}"></telerik:PivotGridAggregateField>
    </Fields>
</telerik:RadPivotGrid>
 
<telerik:RadHtmlChart ID="chrTotalTimings" runat="server" Transitions="true"  >
    <PlotArea>
        <Series>
            <telerik:PieSeries StartAngle="90" >
                <LabelsAppearance Position="Center" DataFormatString="[0] %"></LabelsAppearance>
                <TooltipsAppearance Color="White" DataFormatString="[0] %"></TooltipsAppearance>
                 
            </telerik:PieSeries>
        </Series>
    </PlotArea>
</telerik:RadHtmlChart>

the content of the pie is filled in CellDataBound at this moment (simular like in this demo : http://demos.telerik.com/aspnet-ajax/pivotgrid/examples/applicationscenarios/chartintegration/defaultcs.aspx )

Thanks for any help

Suzy

 

 

 

 

Suzy
Top achievements
Rank 2
 answered on 23 Oct 2015
12 answers
747 views

I have a nested grid & need to show a few footers. The child footers show correctly, but the parent footers do not. Only 1 of the 2 parent footers displays & it displays under the wrong column.

I've attached a screenshot of my grid, showing the footers. 

Here is my code

<telerik:RadGrid ID="RadGrid1" runat="server" ShowStatusBar="false" AutoGenerateColumns="False" AllowSorting="True" AllowMultiRowSelection="true" AllowPaging="false" GridLines="none" ShowFooter="true" OnNeedDataSource="RadGrid1_NeedDataSource" OnDetailTableDataBind="RadGrid1_DetailTableDataBind" ClientSettings-Scrolling-AllowScroll="true" ClientSettings-Scrolling-UseStaticHeaders="true" OnDataBound="RadGrid1_DataBound" >
 
    <MasterTableView DataKeyNames="ProjectID" AllowMultiColumnSorting="false" HierarchyLoadMode="Conditional" Name="ParentGrid" ShowFooter="true" >
 
        <DetailTables>
            <telerik:GridTableView DataKeyNames="DataElementID" Name="DataElementID" Width="100%" >
                <%-- Child --%>
                <HeaderStyle Font-Bold="true"/>
                <Columns>
                    <telerik:GridClientSelectColumn UniqueName="deSelectColumn" HeaderStyle-Width="5%" ></telerik:GridClientSelectColumn>
                    <telerik:GridTemplateColumn UniqueName="first" HeaderText="1st" HeaderStyle-Width="5%"
                      <ItemTemplate
                          <asp:CheckBox ID="CheckBox1" runat="server" /> 
                      </ItemTemplate
                    </telerik:GridTemplateColumn
                    <telerik:GridBoundColumn DataField="DataElementID" UniqueName="DataElementID" HeaderText="Data Element ID" DataType="System.Int16" Display="false" />
                    <telerik:GridBoundColumn DataField="ProjectAreaDescription" UniqueName="ProjectAreaDescription" HeaderText="Project Area Description" DataType="System.String" HeaderStyle-Width="50%" Aggregate="Count" FooterText="Total Count: " />
                    <telerik:GridBoundColumn DataField="ProjectDataType" UniqueName="ProjectDataType" HeaderText="Project Data Type" DataType="System.String" HeaderStyle-Width="40%" Aggregate="Custom" FooterText="Total Selected: 0" />
                     
                </Columns>
            </telerik:GridTableView>
        </DetailTables>
 
        <%-- Parent --%>
        <HeaderStyle Font-Bold="true"/>
        <Columns>
            <telerik:GridBoundColumn DataField="ProjectID" UniqueName="ProjectID" HeaderText="Project ID" DataType="System.Int16" Groupable="true" Display="false" />
            <telerik:GridBoundColumn DataField="ProjectNumber" UniqueName="ProjectNumber" HeaderText="Project Number" DataType="System.String" HeaderStyle-Width="20%" Aggregate="Count" FooterText="Total Number of Distict Projects: " />
            <telerik:GridBoundColumn DataField="ContractNumber" UniqueName="ContractNumber" HeaderText="Contract Number" DataType="System.String" HeaderStyle-Width="20%" />
            <telerik:GridBoundColumn DataField="ProjectName" UniqueName="ProjectName" HeaderText="Project Name" DataType="System.String" HeaderStyle-Width="60%" Aggregate="Custom" FooterText="Total # Selected: " />
        </Columns>
    </MasterTableView>
 
    <ClientSettings>
        <Scrolling AllowScroll="true" UseStaticHeaders="true" />
        <Resizing AllowColumnResize="false" />
        <Selecting AllowRowSelect="True" UseClientSelectColumnOnly="true" />
    </ClientSettings>
 
</telerik:RadGrid>

As shown in the attached, the footer for ProjectNumber is not displaying at all & the footer for ProjectName is showing under Contract Number (which doesn't have a footer). The ProjectName footer is a custom aggregate & is being properly set in the RadGrid1_DataBound function. So I have a grasp of how this is done, but I don't understand why one is displaying & the other is displaying in the wrong area.

Can someone please explain?

Thanks!

Tonya

 

Viktor Tachev
Telerik team
 answered on 23 Oct 2015
3 answers
268 views

Hello, I created radbuttons (CheckBox) dynamically, but I need to get the value of each. Design I have appointed the button with the name "chkParameterType".

My code generates eight buttons and want to know which one has been selected.

Please Help Me

<asp:Panel ID="ListViewPanel1" runat="server">
                                <telerik:RadListView ID="RadListView1" DataSourceID="SqlDataSource1" runat="server"
                                                     ItemPlaceholderID="CandidatosContainer" DataKeyNames="NOMBRE" AllowPaging="true"
                                                     AllowMultiItemSelection="false" >
                                    <LayoutTemplate>
                                        <table cellpadding="0" cellspacing="0" width="100%">
                                            <tr>
                                                <td>
                                                    <telerik:RadDataPager ID="RadDataPager1" runat="server" PagedControlID="RadListView1"
                                                                          PageSize="20" CssClass="pagerStyle" Visible="false">
                                                        <Fields>
                                                            <telerik:RadDataPagerButtonField FieldType="FirstPrev"></telerik:RadDataPagerButtonField>
                                                            <telerik:RadDataPagerButtonField FieldType="Numeric" PageButtonCount="6"></telerik:RadDataPagerButtonField>
                                                            <telerik:RadDataPagerButtonField FieldType="NextLast"></telerik:RadDataPagerButtonField>
                                                            <telerik:RadDataPagerPageSizeField PageSizeComboWidth="60" PageSizeText="Page size: "></telerik:RadDataPagerPageSizeField>
                                                            <telerik:RadDataPagerGoToPageField CurrentPageText="Page: " TotalPageText="of" SubmitButtonText="Go"
                                                                                               TextBoxWidth="25"></telerik:RadDataPagerGoToPageField>
                                                        </Fields>
                                                    </telerik:RadDataPager>
                                                </td>
                                            </tr>
                                        </table>
                                        <div class="RadListView RadListView_<%# Container.Skin %>">
                                            <asp:PlaceHolder ID="CandidatosContainer" runat="server"></asp:PlaceHolder>
                                        </div>
                                        <div class="clearFix">
                                        </div>
                                      </LayoutTemplate>
                                    <ItemTemplate>
                                        <fieldset class="fieldset">
                                            <legend>
                                                Candidato: <%# Eval("COD_POSTULACION") %>
                                            </legend>
                                            <table class="dataTable">
                                                <tr class="rlvI">
                                                    <td>
                                                        <table class="itemTable">
                                                            <tr>
                                                                <td>
                                                                    <table class="innerItemTable">
                                                                        <tr>
                                                                            <td class="itemCellLabel">
                                                                                Nombre:
                                                                            </td>
                                                                            <td class="itemCellInfo">
                                                                            <%#Eval("NOMBRE")%>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                    <td class="image">
                                                        <telerik:RadBinaryImage ID="RadBinaryImage1" runat="server" AlternateText="FOTO"
                                                                                ToolTip="Contact Photo" Width="90px" Height="110px" ResizeMode="Fit" DataValue='<%# Eval("FOTO") == DBNull.Value? new System.Byte[0]: Eval("FOTO") %>'></telerik:RadBinaryImage>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <telerik:RadButton ToggleType="CheckBox" 
                                                                       ButtonType="StandardButton"
                                                                       runat="server"
                                                                       ID="chkParameterType" 
                                                                       AutoPostBack="False">
                                                        <ToggleStates>
                                                            <telerik:RadButtonToggleState Text="Seleccionado" PrimaryIconCssClass="rbToggleCheckboxChecked"/>
                                                            <telerik:RadButtonToggleState Text="Sin Seleccionar" PrimaryIconCssClass="rbToggleCheckbox" />
                                                        </ToggleStates>
                                                    </telerik:RadButton>
                                                </tr>
                                            </table>
                                        </fieldset>
                                    </ItemTemplate>
                                    <EmptyDataTemplate>
                                        <fieldset class="noRecordsFieldset">
                                            <legend>Customers</legend>No records for customers available.
                                        </fieldset>
                                    </EmptyDataTemplate>
                                </telerik:RadListView>
                            </asp:Panel>​

 

Danail Vasilev
Telerik team
 answered on 23 Oct 2015
7 answers
320 views
I need to get the DataKeyName for the row that is clicked in the client javascript OnCommand event.

I was hoping I could do something like

var item = args.get_item();
var itemIndex = item.get_itemIndex();

but get_item() doesn't exist. And I can't find an documentation as to what is avaiable in the client side GridCommandEventArgs class that is passed to the OnCommand client event. Is there a way to get the DataKeyName from this event?
Eyup
Telerik team
 answered on 23 Oct 2015
3 answers
199 views

When working with the Mobile part of radgrid the text values of the header and the sorting area as shown in the attached files cannot be changed ;

     -Sort Ascending , Sort Descending , Clear Sorting , Group By , Filter , Columns , Show/ Hide Cloumns and Drag the Icon To Reorder , Columns display 

 

Is there any possible why to change the text values to these elements ?

 

Thank you

     

 

Maria Ilieva
Telerik team
 answered on 23 Oct 2015
1 answer
127 views

Hello,

 

Im getting stuck with drag&drop in a RadGrid. Here is my grid structure :

-Category 1

---Item 1

---Item 2

---Item 3

-Category 2

---Item 1

-Category 3

---EMPTY

 

 

I already achieved re-ordering in a category and re-ordering of category. However, I can't achieve to drag an Item inside another category.

 What I what to do is, when I drag Item 1 from category 1 to category 3, I need to retrieve the column "A10_ID" of Category 3 to process my changes in DB.

 

How can I access it ?

 

Thank's

 

 

Eyup
Telerik team
 answered on 23 Oct 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?