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

Is there anyone has done exporting the inner grid data with the master/outer grid once clicking on the export button ?

Here is my aspx coding which may give you an idea :
001.<div class="wrapper" runat="server" id="pnlGeneralReport" visible="false">
002.                    <asp:ImageButton ID="DownloadCSV" ImageUrl="images/file-extension-csv-icon.png"
003.                        OnClick="DownloadCSV_Click" runat="server" CssClass="ImageButtons" />
004.                    <asp:ImageButton ID="generalReportHTML" runat="server" OnClick="generalReportHTML_Click" AlternateText="Html" ImageUrl="images/file-extension-xls-html-icon.png"
005.                        CssClass="pdfButton"></asp:ImageButton>
006.                    <asp:ImageButton ID="generalReportExcel" runat="server" OnClick="generalReportHTML_Click" AlternateText="ExcelML" ImageUrl="images/file-extension-xls-icon.png"
007.                        CssClass="pdfButton"></asp:ImageButton>
008.                    <asp:ImageButton ID="generalReportBiff" runat="server" OnClick="generalReportHTML_Click" AlternateText="Biff" ImageUrl="images/file-extension-xls-biff-icon.png"
009.                        CssClass="pdfButton"></asp:ImageButton>
010.                    <asp:ImageButton ID="DownloadPDF" runat="server" OnClick="DownloadPDF_Click" ImageUrl="images/file-extension-pdf-icon.png"
011.                        CssClass="pdfButton"></asp:ImageButton>
012.                    <br />
013.                    <telerik:RadGrid AutoGenerateColumns="False" ID="RadGrid1" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" runat="server" OnItemCommand="RadGrid1_ItemCommand" OnItemCreated="RadGrid1_ItemCreated" EnableLinqExpressions="true" HtmlEncode="true" OnNeedDataSource="RadGrid1_NeedDataSource"
014.                        ShowGroupPanel="True" CellSpacing="-1" GridLines="Both" Skin="Office2010Silver" EnableViewState="true" Width="100%">
015.                        <PagerStyle Mode="NextPrevAndNumeric" />
016.                        <GroupingSettings CaseSensitive="false" />
017.                        <ClientSettings AllowKeyboardNavigation="true">
018.                        </ClientSettings>
019.                        <ExportSettings IgnorePaging="true" OpenInNewWindow="true" ExportOnlyData="true">
020.                            <Pdf PageHeight="210mm" PageWidth="297mm" DefaultFontFamily="Arial Unicode MS" PageTopMargin="45mm"
021.                                BorderStyle="Medium" BorderColor="#666666" PaperSize="A4">
022.                            </Pdf>
023.                        </ExportSettings>
024.                        <MasterTableView Width="100%" DataKeyNames="JobID" HierarchyLoadMode="ServerOnDemand">
025.                            <Columns>
026.                                <telerik:GridMaskedColumn DataField="JobID" HeaderText="JobID#"
027.                                    FilterControlWidth="50px" AutoPostBackOnFilter="false" CurrentFilterFunction="EqualTo"
028.                                    FilterDelay="2000" ShowFilterIcon="false" Mask="#####">
029.                                    <ColumnValidationSettings>
030.                                        <ModelErrorMessage Text=""></ModelErrorMessage>
031.                                    </ColumnValidationSettings>
032.                                </telerik:GridMaskedColumn>
033.                                <telerik:GridBoundColumn HeaderText="Customer Ref No" DataField="JobCustomerRefNo" UniqueName="JobCustomerRefNo"
034.                                    SortExpression="JobCustomerRefNo" HeaderStyle-Width="180px" FilterControlAltText="Filter JobCustomerRefNo column">
035.                                    <ColumnValidationSettings>
036.                                        <ModelErrorMessage Text=""></ModelErrorMessage>
037.                                    </ColumnValidationSettings>
038. 
039.                                </telerik:GridBoundColumn>
040.                                <telerik:GridBoundColumn DataField="JobTitle" FilterControlAltText="Filter JobTitle column" HeaderText="Job Title" SortExpression="JobTitle" UniqueName="JobTitle">
041.                                    <ColumnValidationSettings>
042.                                        <ModelErrorMessage Text="" />
043.                                    </ColumnValidationSettings>
044.                                </telerik:GridBoundColumn>
045.                                <telerik:GridDateTimeColumn DataField="JobBookedDate" PickerType="DatePicker" EnableTimeIndependentFiltering="true"
046.                                    DataFormatString="{0:dd/MM/yyyy HH:mm }" DataType="System.DateTime" FilterControlAltText="Filter JobBookedDate column" HeaderText="Job Booked Date" SortExpression="JobBookedDate" UniqueName="JobBookedDate">
047.                                    <ColumnValidationSettings>
048.                                        <ModelErrorMessage Text="" />
049.                                    </ColumnValidationSettings>
050.                                </telerik:GridDateTimeColumn>
051.                                <telerik:GridBoundColumn DataField="JobAddress1" FilterControlAltText="Filter JobAddress1 column" HeaderText="Address" SortExpression="JobAddress1" UniqueName="JobAddress1">
052.                                    <ColumnValidationSettings>
053.                                        <ModelErrorMessage Text="" />
054.                                    </ColumnValidationSettings>
055.                                </telerik:GridBoundColumn>
056.                                <telerik:GridBoundColumn DataField="JobSuburb" FilterControlAltText="Filter JobSuburb column" HeaderText="Suburb" SortExpression="JobSuburb" UniqueName="JobSuburb">
057.                                    <ColumnValidationSettings>
058.                                        <ModelErrorMessage Text="" />
059.                                    </ColumnValidationSettings>
060.                                </telerik:GridBoundColumn>
061.                                <telerik:GridBoundColumn DataField="JobPostCode" FilterControlAltText="Filter JobPostCode column" HeaderText="PostCode" SortExpression="JobPostCode" UniqueName="JobPostCode">
062.                                    <ColumnValidationSettings>
063.                                        <ModelErrorMessage Text="" />
064.                                    </ColumnValidationSettings>
065.                                </telerik:GridBoundColumn>
066.                                <telerik:GridBoundColumn DataField="JobState" FilterControlAltText="Filter JobState column" HeaderText="State" SortExpression="JobState" UniqueName="JobState">
067.                                    <ColumnValidationSettings>
068.                                        <ModelErrorMessage Text="" />
069.                                    </ColumnValidationSettings>
070.                                </telerik:GridBoundColumn>
071.                                <telerik:GridTemplateColumn DataField="JobStatusID" HeaderText="Status Type" UniqueName="JobStatusID"
072.                                    HeaderStyle-Width="200px" SortExpression="JobStatusID">
073.                                    <FilterTemplate>
074.                                        <telerik:RadComboBox ID="comboJobStatus" DataTextField="JobStatusName"
075.                                            DataValueField="JobStatusID" Height="100px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("JobStatusID").CurrentFilterValue %>'
076.                                            runat="server" OnClientSelectedIndexChanged="JobStatusIndexChanged">
077.                                            <Items>
078.                                                <telerik:RadComboBoxItem Text="All" />
079.                                            </Items>
080.                                        </telerik:RadComboBox>
081.                                        <telerik:RadScriptBlock ID="RadScriptBlock3" runat="server">
082.                                            <script type="text/javascript">
083.                                                function JobStatusIndexChanged(sender, args) {
084.                                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
085.                                                    tableView.filter("JobStatusID", args.get_item().get_value(), "EqualTo");
086.                                                }
087.                                            </script>
088.                                        </telerik:RadScriptBlock>
089.                                    </FilterTemplate>
090.                                    <ItemTemplate>
091.                                        <%# Eval("JobStatus") %>
092.                                    </ItemTemplate>
093.                                </telerik:GridTemplateColumn>
094.                                <telerik:GridTemplateColumn DataField="ClientID" HeaderText="Client" UniqueName="ClientID"
095.                                    HeaderStyle-Width="200px" SortExpression="ClientID">
096.                                    <FilterTemplate>
097.                                        <telerik:RadComboBox ID="comboClient" DataTextField="ClientName"
098.                                            DataValueField="ClientID" Height="100px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("ClientID").CurrentFilterValue %>'
099.                                            runat="server" OnClientSelectedIndexChanged="ClientIndexChanged">
100.                                            <Items>
101.                                                <telerik:RadComboBoxItem Text="All" />
102.                                            </Items>
103.                                        </telerik:RadComboBox>
104.                                        <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">
105.                                            <script type="text/javascript">
106.                                                function ClientIndexChanged(sender, args) {
107.                                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
108.                                                    tableView.filter("ClientID", args.get_item().get_value(), "EqualTo");
109.                                                }
110.                                            </script>
111.                                        </telerik:RadScriptBlock>
112.                                    </FilterTemplate>
113.                                    <ItemTemplate>
114.                                        <%# Eval("Client") %>
115.                                    </ItemTemplate>
116.                                </telerik:GridTemplateColumn>
117.                                <telerik:GridTemplateColumn DataField="AssignedStaffID" HeaderText="Staff" UniqueName="AssignedStaffID"
118.                                    HeaderStyle-Width="200px" SortExpression="AssignedStaffID">
119.                                    <FilterTemplate>
120.                                        <telerik:RadComboBox ID="comboStaff" DataTextField="StaffName"
121.                                            DataValueField="StaffID" Height="100px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("AssignedStaffID").CurrentFilterValue %>'
122.                                            runat="server" OnClientSelectedIndexChanged="StaffIndexChanged">
123.                                            <Items>
124.                                                <telerik:RadComboBoxItem Text="All" />
125.                                            </Items>
126.                                        </telerik:RadComboBox>
127.                                        <telerik:RadScriptBlock ID="RadScriptBlock10" runat="server">
128.                                            <script type="text/javascript">
129.                                                function StaffIndexChanged(sender, args) {
130.                                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
131.                                                    tableView.filter("AssignedStaffID", args.get_item().get_value(), "EqualTo");
132.                                                }
133.                                            </script>
134.                                        </telerik:RadScriptBlock>
135.                                    </FilterTemplate>
136.                                    <ItemTemplate>
137.                                        <%# Eval("AssignedStaff") %>
138.                                    </ItemTemplate>
139.                                </telerik:GridTemplateColumn>
140.                            </Columns>
141.                            <NestedViewTemplate>
142.                                <asp:Panel runat="server" ID="InnerContainer" CssClass="viewWrap" Visible="false">
143.                                    <telerik:RadGrid runat="server" ID="JobStatusGrid" OnNeedDataSource="JobStatusGrid_NeedDataSource">
144.                                        <MasterTableView ShowHeader="true" AutoGenerateColumns="False" AllowPaging="true"
145.                                            DataKeyNames="JobStatusHistoryID" PageSize="7" HierarchyLoadMode="Client">
146.                                            <Columns>
147.                                                <telerik:GridBoundColumn HeaderText="Status Type" HeaderButtonType="TextButton"
148.                                                    DataField="JobStatus" UniqueName="JobStatusID">
149.                                                </telerik:GridBoundColumn>
150.                                                <telerik:GridBoundColumn HeaderText="Created By" HeaderButtonType="TextButton"
151.                                                    DataField="CreatedBy" UniqueName="CreatedBy">
152.                                                </telerik:GridBoundColumn>
153.                                                <telerik:GridBoundColumn HeaderText="Created On" HeaderButtonType="TextButton"
154.                                                    DataField="CreatedOn" UniqueName="CreatedOn">
155.                                                </telerik:GridBoundColumn>
156.                                            </Columns>
157.                                        </MasterTableView>
158.                                    </telerik:RadGrid>
159.                                </asp:Panel>
160.                            </NestedViewTemplate>
161.                        </MasterTableView>
162.                        <ClientSettings AllowDragToGroup="true">
163.                            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
164.                        </ClientSettings>
165.                    </telerik:RadGrid>
166.                </div>

I appreciate your help.
Viktor Tachev
Telerik team
 answered on 22 Jul 2014
8 answers
1.1K+ views
Hi,

I am trying to achieve a post back on enter key pressed. I found out that the RadButton's property UseSubmitBehaviour doesn't do anything? I would expect if this is true, the button to be actually a submit button and if false to be a normal button. This seems not to be true here.

As I found out this is not working out, I tried using asp.net control Panel and it's property - DefaultButton to see if it's going to help, but it didn't.

I am using the latest version of the telerik ajax controls library. How can I achieve autopostback on enter? I don't want to subscribe to keypress events and watch for enter key. This should be built in. How can RadButton render input[type=submit] instead of input[type=button]?

Thanks,

Ivan.
Chris
Top achievements
Rank 1
 answered on 22 Jul 2014
10 answers
214 views
For the past day or so I have been seeing this message when creating a new style.

Failed to create skin!
A server error has occured.
We have been notified and will try to resolve it ASAP.
Sorry for the inconvenience.

Can anyone shed some light on this issue?
Thanks.
JON

PS. I was able to open an old style.zip file in the editor. I simply cannot create a new one.
Matt
Top achievements
Rank 1
 answered on 22 Jul 2014
1 answer
192 views
Seems like if you have a multiline radtextbox with a multilined emptymessage (containing CrLf's) AND a tooltip, the emptymessage is set as the value of the textbox.

If only using Lf's to seperate the lines it is working as expected


generated html that is working (without Cr's):
<input ...... value="{"enabled":true,"emptyMessage":"EmptyMsg1\nEmptyMsg2","validationText":"","valueAsString":"","lastSetTextBoxValue":"EmptyMsg1\nEmptyMsg2"}">

generated html that is working (with CrLf's):
<input value="{"enabled":true,"emptyMessage":"EmptyMsg1\r\nEmptyMsg2","validationText":"EmptyMsg1\nEmptyMsg2","valueAsString":"EmptyMsg1\nEmptyMsg2","lastSetTextBoxValue":"EmptyMsg1\nEmptyMsg2"}">

I've manually fixed this by removing any Cr's from the EmptyMessage, but seems like a strange bug as it is only a problem when a text for .Tooltip is used.
Viktor Tachev
Telerik team
 answered on 22 Jul 2014
6 answers
300 views

On a custom edit form for a grid, I have two bound decimal fields.
I want to update a third calculated textbox when the user changes any of the two bound fields.

I followed Dimo's example from an old post called "ascx editform with calculation textboxes when onfocus or onblur", but I was never able to make it work.

Could someone take a look on the attached screen and give me an idea on how to do this? Thanks

--------------
Obviously, I am trying to update the "Total Cost" textbox, if the user changes the Quantity, or the Unit Cost textboxes, which are both bound to the database.

Dimitrios
Top achievements
Rank 1
 answered on 22 Jul 2014
2 answers
142 views
Hi,

I'm using 2013.2.611.40 Telerik RadGrid.

I'm trying to use Batch editing mode with a GridTemplateColumn. If I specify ColumnGroup property, when the cell is clicked a JavaScript error is raised in _isColumnEditable (Unable to get property _data of undefined or null reference). If ColumnGroup property is removed all is working fine and edit textbox is shown.

01.<telerik:RadGrid ID="MyGrid" runat="server" AutoGenerateColumns="false"
02.        Skin="Simple"
03.        AllowPaging="False"
04.        AllowSorting="true"
05.        AllowFilteringByColumn="true"
06.        AllowMultiRowSelection="true"
07.        OnPreRender="GridLastPhase_PreRender"
08.        OnNeedDataSource="GridLastPhase_NeedDataSource"
09.        OnItemDataBound="GridLastPhase_ItemDataBound">
10.        <ClientSettings>
11.            <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" />
12.            <Selecting AllowRowSelect="true" />
13.        </ClientSettings>
14.        <MasterTableView HeaderStyle-HorizontalAlign="Center" Width="99%" EditMode="Batch">
15.            <BatchEditingSettings EditType="Cell" OpenEditingEvent="Click" />
16.            <ColumnGroups>
17.                <telerik:GridColumnGroup Name="LQP1" HeaderText="Last Q Phase 1" HeaderStyle-HorizontalAlign="Center" />
18.            </ColumnGroups>
19.            <Columns>
20.                <telerik:GridTemplateColumn HeaderText="" AllowFiltering="false" HeaderStyle-Width="40px" ItemStyle-Width="40px">
21.                    <ItemTemplate>
22.                        <asp:Label ID="lblRowNumber" runat="server"></asp:Label>
23.                    </ItemTemplate>
24.                </telerik:GridTemplateColumn>
25. 
26.                <telerik:GridClientSelectColumn>
27.                    <HeaderStyle Width="40px" HorizontalAlign="Center" />
28.                    <ItemStyle Width="40px" HorizontalAlign="Center" />
29.                </telerik:GridClientSelectColumn>
30. 
31.                <telerik:GridTemplateColumn AutoPostBackOnFilter="true" ShowFilterIcon="false" FilterControlWidth="100%" UniqueName="LQP1_PHASE_DESCRIPTION" HeaderText="Phase" DataType="System.String" DataField="LQP1_PHASE_DESCRIPTION" SortExpression="LQP1_PHASE_DESCRIPTION" ColumnGroupName="LQP1" HeaderStyle-Width="110px" ItemStyle-Width="110px">
32.                    <ItemTemplate>
33.                        <asp:Label ID="lblLQP1_PHASE" runat="server" Text='<%#Eval("LQP1_PHASE_DESCRIPTION")%>'></asp:Label>
34.                    </ItemTemplate>
35.                    <EditItemTemplate>
36.                        <asp:TextBox ID="txtLQP1_PHASE" runat="server" Text='<%#Eval("LQP1_PHASE_DESCRIPTION")%>'></asp:TextBox>
37.                    </EditItemTemplate>
38.                </telerik:GridTemplateColumn>
39.            </Columns>
40.        </MasterTableView>
41. 
42.    </telerik:RadGrid>

Thanks in advance.

Alfonso
Konstantin Dikov
Telerik team
 answered on 22 Jul 2014
1 answer
112 views
Hi,

I'm using 2013.2.611.40 Telerik Radgrid with Batch editing activated.

I have a GridTemplateColumn with ColumnGroup defined. When I click on the cell a JavaScript error is launched in _isColumnEditable (Unable to get property _data of undefined or null reference  in var h=g._data).

If I remove ColumnGroup property from GridTemplateColumn all is working fine and textbox is shown for editing.

 <telerik:RadGrid ID="GridLastPhase" runat="server" AutoGenerateColumns="false"
        Skin="Simple" CssClass="caronte-phase-grid"
        AllowPaging="False"
        AllowSorting="true"
        AllowFilteringByColumn="true"
        AllowMultiRowSelection="true"
        OnPreRender="GridLastPhase_PreRender"
        OnNeedDataSource="GridLastPhase_NeedDataSource"
        OnItemDataBound="GridLastPhase_ItemDataBound">
        <ClientSettings>
            <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" />
            <Selecting AllowRowSelect="true" />
        </ClientSettings>
        <MasterTableView HeaderStyle-HorizontalAlign="Center" Width="99%" EditMode="Batch">
            <BatchEditingSettings EditType="Cell" OpenEditingEvent="Click" />
            <ColumnGroups>
                <telerik:GridColumnGroup Name="LQP1" HeaderText="Last Q Phase 1" HeaderStyle-HorizontalAlign="Center" />
            </ColumnGroups>
            <Columns>
                <telerik:GridTemplateColumn HeaderText="" AllowFiltering="false" HeaderStyle-Width="40px" ItemStyle-Width="40px">
                    <ItemTemplate>
                        <asp:Label ID="lblRowNumber" runat="server"></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>           

                <telerik:GridTemplateColumn AutoPostBackOnFilter="true" ShowFilterIcon="false" FilterControlWidth="100%" UniqueName="LQP1_PHASE_DESCRIPTION" HeaderText="Phase" DataType="System.String" DataField="LQP1_PHASE_DESCRIPTION" SortExpression="LQP1_PHASE_DESCRIPTION" ColumnGroupName="LQP1" HeaderStyle-Width="110px" ItemStyle-Width="110px">
                    <ItemTemplate>
                        <asp:Label ID="lblLQP1_PHASE" runat="server" Text='<%#Eval("LQP1_PHASE_DESCRIPTION")%>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtLQP1_PHASE" runat="server" Text='<%#Eval("LQP1_PHASE_DESCRIPTION")%>'></asp:TextBox>
                    </EditItemTemplate>
                </telerik:GridTemplateColumn>

            </Columns>
        </MasterTableView>

    </telerik:RadGrid>

Thanks in advance,

Alfonso
Konstantin Dikov
Telerik team
 answered on 22 Jul 2014
1 answer
236 views
Dear Team,

I save video file in a folder in my project and its path in sql server video file is .avi type file.I want to run this video using telerik Media player. But i can't
run it.i can run .mp4 video on chorme browse.

So Please suggest me how i can run .avi file in media player with out using HTML 5.


Thanks & regards
Akhilesh 
Princy
Top achievements
Rank 2
 answered on 22 Jul 2014
1 answer
242 views
I have plenty of images path of my Rad Editor set to a folder with many sub folders.  Each of those sub folders has dozens of images in it.  On the production server, it takes almost a minute just for the Image Manager dialog to open and show the sub folders.and also taking long time on pagination as well filtration  

I made changes in web.config  as advised like below

<compilation debug="false" strict="false" explicit="true">


Still, I could not find any difference . Please advise , is there any way to improve the performance of the image manager. 
Vessy
Telerik team
 answered on 22 Jul 2014
4 answers
276 views

Hi,

I have “ToolkitScriptManager” in the master page, a lot of Ajax control toolkit controls and “RadAjaxManager”, “RadGrid” in the web application pages.

After adding the “RadGrid” I have this script error “Error: Object doesn't support this property or method”

I’m using the following

  • Microsoft Visual Studio 2008
  • Framework 3.5 SP1
  • "RadControls_for_ASP.NET_AJAX_2008_3_1314_dev" (RadControls for ASPNET AJAX Q3 2008)
  • AjaxControlToolkit.dll, File Version: 3.5.40412.2


Regards,

Hristo Valyavicharski
Telerik team
 answered on 22 Jul 2014
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?