Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
248 views

I have a radgrid with filtering enabled. Clicking an item in the grid does a Response.Redirect to another page to open the item details page.  When I click browser's Back button, the grid is displayed with all the filtering cleared.  Is there a way to preserve filtering?

Attila Antal
Telerik team
 answered on 11 Apr 2018
3 answers
217 views

I have a hierarchical parent-child grid where only the child rows can be edited.

When any parent row is expanded I need to have the child rows immediately placed in edit mode.  They also need to retain their values for posting if the parent row is subsequently collapsed, so that all child rows can be enumerated for posting the results.  How would I accomplish that?

Following is the markup for the grid

            <telerik:RadGrid ID="ctlGridAuditSeriesChecklist" runat="server"

                AllowMultiRowEdit="true"
                AllowMultiRowSelection="false"
                AllowPaging="false" 
                AllowSorting="false" 
                AutoGenerateColumns="False"
                BorderColor="#a6a6a6"
                BorderStyle="Solid"
                BorderWidth="0" 
                CellPadding="10" 
                CellSpacing="5"
                CssClass="TUV_grid"
                DataMember="DefaultView"
                DataSourceID="odsGridAuditSeriesChecklist"
                GridLines="Both"
                ImagesPath="~/images/grid"
                ShowFooter="false"
                Width="700px" >
                <ClientSettings
                    EnableAlternatingItems="true"
                    Scrolling-AllowScroll="false"
                    Scrolling-SaveScrollPosition="true"
                    Scrolling-UseStaticHeaders="true" /> 
                <ExportSettings
                    Excel-Format="Xlsx"
                    ExportOnlyData="false"
                    FileName="AuditSeriesReview" 
                    HideStructureColumns="true"
                    IgnorePaging="true"
                    OpenInNewWindow="true" />
                <MasterTableView
                    DataKeyNames="AuditID"
                    CommandItemDisplay="Top"
                    EditMode="InPlace" >
                    <CommandItemTemplate>
                        <span class="TUV_gridHeader">Audit Series Review Checklist</span>
                    <telerik:RadButton ID="btnExportToPDF" runat="server"
                        CommandName="ExportToPDF"
                        Icon-PrimaryIconUrl="~/images/ExportToPDF.gif"
                        Text="Export To PDF" />
                    <telerik:RadButton ID="btnExportToExcel" runat="server"
                        CommandName="ExportToExcel"
                        Icon-PrimaryIconUrl="~/images/ExportToExcel.gif"
                        Text="Export To Excel" />
                    <telerik:RadButton ID="btnExportToCSV" runat="server"
                        CommandName="ExportToCSV"
                        Icon-PrimaryIconUrl="~/images/ExportToCsv.gif"
                        Text="Export To CSV" />
                    </CommandItemTemplate>
                    <Columns>
                        <telerik:GridBoundColumn 
                            DataField="CARMajorCount"
                            DataType="System.Int32"
                            HeaderText="CAR Major Count"
                            UniqueName="CARMajorCount"
                            ReadOnly="true" />
                        <telerik:GridBoundColumn 
                            DataField="CARMinorCount"
                            DataType="System.Int32"
                            HeaderText="CAR Minor Count"
                            UniqueName="CARMinorCount"
                            ReadOnly="true" />
                        <telerik:GridBoundColumn 
                            DataField="CARUploadCount"
                            DataType="System.Int32"
                            HeaderText="CAR Upload Count"
                            UniqueName="CARUploadCount"
                            ReadOnly="true" />
                        <telerik:GridBoundColumn 
                            DataField="CARAppealCount"
                            DataType="System.Int32"
                            HeaderText="CAR Appeal Count"
                            UniqueName="CARAppealCount"
                            ReadOnly="true" />
                        <telerik:GridBoundColumn 
                            DataField="CARApprovalCount"
                            DataType="System.Int32"
                            HeaderText="CAR Approval Count"
                            UniqueName="CARApprovalCount"
                            ReadOnly="true" />
                        <telerik:GridBoundColumn 
                            DataField="CARStatusText"
                            DataType="System.String"
                            HeaderText="CAR Status"
                            UniqueName="CARStatusText"
                            ReadOnly="true" />
                        <telerik:GridButtonColumn
                            ButtonType="ImageButton"
                            UniqueName="CARs"
                            CommandName="CARs" 
                            HeaderText="CARs" 
                            ItemStyle-HorizontalAlign="Center"
                            ItemStyle-Wrap="false" />
                        <telerik:GridBoundColumn 
                            DataField="AuditID"
                            DataType="System.Int32"
                            Visible="false" />
                    </Columns>
                    <DetailTables>
                        <telerik:GridTableView runat="server"
                            DataKeyNames="AuditReviewID"
                            DataSourceID="odsGridAuditSeriesChecklistSub"
                            AllowPaging="false" 
                            AllowSorting="false"
                            PagerStyle-AlwaysVisible="false"
                            Width="96%" >
                            <ParentTableRelation>
                                <telerik:GridRelationFields
                                    DetailKeyField="AuditID"
                                    MasterKeyField="AuditID" />
                            </ParentTableRelation>
                            <Columns>
                                <telerik:GridBoundColumn 
                                    DataField="DocumentName"
                                    DataType="System.String"
                                    HeaderText="DocumentName"
                                    ReadOnly="true" />
                                <telerik:GridBoundColumn 
                                    DataField="Need"
                                    DataType="System.String"
                                    UniqueName="Need"
                                    HeaderText="Need"
                                    ReadOnly="true" />
                                <telerik:GridCheckBoxColumn 
                                    DataField="AdminReview"
                                    DataType="System.Boolean"
                                    UniqueName="AdminReview"
                                    HeaderText="A/R"
                                    ItemStyle-Wrap="true" />
                                <telerik:GridCheckBoxColumn 
                                    DataField="MainReview"
                                    DataType="System.Boolean"
                                    UniqueName="MainReview"
                                    HeaderText="M/R"
                                    ItemStyle-Wrap="true" />
                                <telerik:GridTemplateColumn
                                    DataField="TechReview"
                                    HeaderText="Yes No N/A Corr"
                                    UniqueName="TechReview"
                                    HeaderStyle-Wrap="false"
                                    ItemStyle-Wrap="false" >
                                    <EditItemTemplate>
                                        <asp:RadioButtonList ID="optTechReview" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                                            <asp:ListItem Text = "" Value="Yes" />
                                            <asp:ListItem Text = "" Value="No" />
                                            <asp:ListItem Text = "" Value="NA" />
                                            <asp:ListItem Text = "" Value="Corr" />
                                        </asp:RadioButtonList>
                                    </EditItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn 
                                    DataField="Remarks"
                                    UniqueName="Remarks"
                                    HeaderText="Remarks" 
                                    DataType="System.String"/>

                                <telerik:GridBoundColumn 
                                    DataField="AuditReviewID"
                                    DataType="System.Int32"
                                    Visible="false" />
                            </Columns>
                        </telerik:GridTableView>
                    </DetailTables>
                </MasterTableView>
            </telerik:RadGrid>

    <asp:ObjectDataSource ID="odsGridAuditSeriesChecklist" runat="server" 
        TypeName="GridAuditorMainReview_Checklist"
        DataObjectTypeName="GridAuditorMainReview_Checklist.Bean"
        EnablePaging="True"
        SelectCountMethod="GetRecordCount"
        SelectMethod="GetRecords" 
        SortParameterName="SortExpression" >
    </asp:ObjectDataSource>

    <asp:ObjectDataSource ID="odsGridAuditSeriesChecklistSub" runat="server" 
        TypeName="GridAuditorMainReview_Checklist_Sub"
        DataObjectTypeName="GridAuditorMainReview_Checklist_Sub.Bean"
        SelectCountMethod="GetRecordCount"
        SelectMethod="GetRecords" >
        <SelectParameters>
            <asp:SessionParameter Name="AuditID" SessionField="AuditID" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>

Attila Antal
Telerik team
 answered on 10 Apr 2018
1 answer
1.0K+ views

I have a combobox with checkboxes to choose what columns in a grid to have visible and not, the grid and combobox is ajaxified.

on the combobox itemChecked event i find the appropiate column and set its visibility value based on the checkbox, all very simple enough,

protected void cmbGridColumnChooser_ItemChecked(object sender, RadComboBoxItemEventArgs e)
    {
        grCases.Columns.FindByUniqueName(e.Item.Value).Visible = e.Item.Checked;
        var test = grCases.Columns.FindByUniqueName(e.Item.Value).Visible;
    }

 

However, setting the column to visible=false works great But when setting the column visible to visible=true again does not, even though the checkbox state shows true, and after checking the columns visible state straight afterwords (its true) the column still wont appear.

 

Any ideas anyone?

Attila Antal
Telerik team
 answered on 10 Apr 2018
1 answer
300 views

Hi,

I have a RadComboBox which has an extra "Select All"-type item to select a sub set of all items. When this item is checked and the combobox is closed, I would like for the counter to ignore it when displaying how many items are checked.

e.g. The combobox contains "Select all", "Select all fruits", "apple", "banana", "monkey"

If I check "banana" and "monkey", it displays "2 items checked".

If I check "select all fruits", "apple" and "banana" will be checked but since "select all fruits" is also an item, it will display "3 items checked"

 

I haven't been able to find a way to have the combobox ignore one of the listitems or to change the count of selected items. Is this possible?

Eyup
Telerik team
 answered on 10 Apr 2018
2 answers
79 views

Hi,

 

I'm using in a web application RadDock control. However I'm trying to figure out if it is possible to use DockCommand as a RadAjaxManager trigger. Because DockCommand has no ID it seems very hard to achieve this.

 

My application scenario is quite easy to understand. The dock command button must load a user control in a panel (ExtendedViewPanel) and then reload it. Please consider the following code :

 

        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="MyDockCommand">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="ExtendedViewPanel" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
            <telerik:RadDockLayout runat="server" ID="RadDockLayout1">
                <table style="width:100%">
                    <tr>
                        <td>
                            <telerik:RadDockZone runat="server" ID="RadDockZone1" Orientation="Horizontal" Style="border: 0;">
                                <telerik:RadDock RenderMode="Lightweight" ID="RadDock1" runat="server" Title="Classeurs non publiés"
                                    EnableAnimation="true" CssClass="higherZIndex" Width="33%" Skin="Metro" OnCommand="RadDock1_Command">
                                    <Commands>
                                        <telerik:DockToggleCommand Name="SwitchView" AutoPostBack="true" CssClass="command-maximize"/>
                                    </Commands>
                                    <ContentTemplate>
                                        <div>
                                            <widget:LastModifiedWorkbook ID="LastModifiedWorkbookControl" runat="server" />
                                            <asp:HiddenField runat="server" ID="toggleState" />
                                        </div>
                                    </ContentTemplate>
                                </telerik:RadDock>
                            </telerik:RadDockZone>
                        </td>
                    </tr>
                </table>
            </telerik:RadDockLayout>
<asp:Panel runat="server" ID="ExtendedViewPanel" CssClass="extended-view-panel" Visible="false">
</asp:Panel>

 

Thanks for your help,

Marin Bratanov
Telerik team
 answered on 10 Apr 2018
7 answers
265 views
When adding HTML5 video tag to the editor, it strips out the controls preload attributes:
<video id="video" poster="myposter.jpg" src="myvideo.mp4" controls preload></video>

Any suggestions? 

Thanks
Chuck
Rumen
Telerik team
 answered on 10 Apr 2018
0 answers
81 views
So I have a grid that is pulling most of it's information from one context/one database (db1). But I have one column that is pulling it's information from another context/database (db2) based on one of the columns from db1. However, if I try to filter or sort on this column, nothing happens. I have exhausted my researching abilities and tried many fixes for this and none of them are working great. What, in your opinion, would be the best solve? 
Alyssa
Top achievements
Rank 1
 asked on 09 Apr 2018
2 answers
164 views
Hi

I have a GridColumnButton how would I print a pdf from its click event. Ideally I like to open the pdf print / preview window

Andy
JOSE LUIZ TORDINO
Top achievements
Rank 1
 answered on 09 Apr 2018
4 answers
183 views
I want open one pdf window on click of that Id.

How to open pdf in new window
JOSE LUIZ TORDINO
Top achievements
Rank 1
 answered on 09 Apr 2018
6 answers
586 views
Hello, 
I have a need to use filtering functionality for GridTemplateColumn which actually stored a datetime value. When I use the filter features, I get either of those 2 errors.

SCRIPT5022: Sys.WebForms.
PageRequestManagerServerErrorException: The string was not recognized as a valid DateTime. There is a unknown word starting at index 0. 

SCRIPT5022: Sys.WebForms.PageRequestManagerServerErrorException: String was not recognized as a valid DateTime. 

My MarkUp : 
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript" src="/JS/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="/JS/jquery-ui-1.9.2.custom.js"></script>
    <script type="text/javascript">
 
        function ShowColumnHeaderMenu(ev, columnName) {
            var grid = $find("<%=RadGrid1.ClientID %>");
            var columns = grid.get_masterTableView().get_columns();
 
            for (var i = 0; i < columns.length; i++) {
                if (columns[i].get_uniqueName() == columnName) {
                    columns[i].showHeaderMenu(ev, 75, 20);
                }
            }
        }
         
    </script>
</telerik:RadCodeBlock>
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="true" AllowSorting="true"
            OnDeleteCommand="RadGrid1_DeleteCommand" OnInsertCommand="RadGrid1_InsertCommand"
            OnUpdateCommand="RadGrid1_UpdateCommand" OnNeedDataSource="RadGrid1_NeedDataSource"
            OnItemDataBound="RadGrid1_OnItemDataBound" Skin="Office2010Silver" EnableHeaderContextMenu="true"
            EnableHeaderContextFilterMenu="true">
            <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
            <MasterTableView Width="100%" EditMode="InPlace" CommandItemDisplay="Bottom" DataKeyNames="ID, Status, Description"
                HorizontalAlign="NotSet" AutoGenerateColumns="False" NoMasterRecordsText="<%$Resources:Resources, NoItems%>"
                InsertItemDisplay="Bottom" EditItemStyle-VerticalAlign="Top"
                AllowFilteringByColumn="True" IsFilterItemExpanded="false">
                <CommandItemSettings AddNewRecordText="<%$Resources:Resources, NewItem%>"
                    ShowRefreshButton="false" />
                <Columns>
                    <telerik:GridBoundColumn DataField="ID" UniqueName="ID" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn DataField="DueDateTime" SortExpression="DueDateTime" UniqueName="DueDateTime"
                        ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" GroupByExpression="DueDateTime Group By DueDateTime">
                        <HeaderTemplate>
                            <asp:LinkButton runat="server" CommandArgument="DueDateTime" CommandName="Sort"
                                Text="<%$Resources:Resources, Date%>"></asp:LinkButton>
                            <img src="/Images/funnel-icon.png" style="margin-top: 5px; margin-left: 5px;
                                cursor: pointer" onclick='ShowColumnHeaderMenu(event,"DueDateTime")'
                                alt="Filter" />
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:Label runat="server" ID="lblDate"></asp:Label>
                        </ItemTemplate>
                        <InsertItemTemplate>
                                <telerik:RadDateTimePicker ID="dtpDate" runat="server" Width="195">
                                    <Calendar ID="ddCalendar" runat="server" EnableKeyboardNavigation="true">
                                    </Calendar>
                                    <DateInput ID="ddDate" runat="server" DateFormat="dd/MM/yyyy hh:mm tt">
                                    </DateInput>
                                    <TimeView ID="TimeView1" runat="server" Interval="00:30:00">
                                    </TimeView>
                                </telerik:RadDateTimePicker>
                        </InsertItemTemplate>
                        <EditItemTemplate>
                                <telerik:RadDateTimePicker ID="dtpDate" runat="server"
                                    Width="195">
                                    <Calendar ID="ddCalendar" runat="server" EnableKeyboardNavigation="true">
                                    </Calendar>
                                    <DateInput ID="ddDate" runat="server" DateFormat="dd/MM/yyyy hh:mm tt">
                                    </DateInput>
                                    <TimeView runat="server" Interval="00:30:00">
                                    </TimeView>
                                </telerik:RadDateTimePicker>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>

*Note : I also added this tag "DataType="System.DateTime" " though its not in the markup.
Fahad
Top achievements
Rank 1
 answered on 09 Apr 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?