Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
965 views
Hi there,

The question is similar to Radgrid export after filtering, and I follow the solution.

This

foreach (GridFilteringItem filter in radGrid.MasterTableView.GetItems(GridItemType.FilteringItem))
{
      filter.Visible = false;
}
radGrid.MasterTableView.ExportToExcel();

and this

radGrid.ExportSettings.IgnorePaging = true;
radGrid.ExportSettings.ExportOnlyData = true;
radGrid.ExportSettings.FileName = "MyFile_" + DateTime.Now.ToShortDateString();
radGrid.MasterTableView.ExportToExcel();

It doesn't work.

I still get the whole data.

Is there any property I miss?

This is my define in .aspx

<telerik:RadGrid ID="RadGrid1" runat="server" ActiveItemStyle-Wrap="false" AllowFilteringByColumn="False" AllowPaging="False" AllowSorting="True" AlternatingItemStyle-Wrap="false" AutoGenerateColumns="False"
    CellSpacing="0" CommandItemStyle-Wrap="false" DataSourceID="SqlDataSource1" EnableLinqExpressions="False" GridLines="None" HeaderStyle-Wrap="false" Height="600" ItemStyle-Wrap="false" OnPreRender="RadGrid1_PreRender"
    PagerStyle-AlwaysVisible="true" PageSize="20" SelectedItemStyle-Wrap="false" ShowGroupPanel="True" Skin="Web20" Width="1200" >
    <grouppanel text="<%$ Resources:MessageResource, MSG_RECMain_Group_Drop %>"></grouppanel>
    <groupingsettings casesensitive="false" showungroupbutton="true" />
    <clientsettings allowdragtogroup="true" enablepostbackonrowclick="false" enablerowhoverstyle="true">
        <selecting allowrowselect="true" enabledragtoselectrows="false" />
        <clientevents ongridcreated="RadGrid1_GridCreated" onrowselected="RowSelected"></clientevents>
        <resizing allowcolumnresize="True" allowresizetofit="true" allowrowresize="false" clipcellcontentonresize="true" enablerealtimeresize="false" resizegridoncolumnresize="false" />
        <scrolling allowscroll="true" usestaticheaders="true" />
    </clientsettings>
    <mastertableview allowmulticolumnsorting="False" datakeynames="PCID" datasourceid="SqlDataSource1">
        <rowindicatorcolumn visible="False"></rowindicatorcolumn>
        <expandcollapsecolumn created="True"></expandcollapsecolumn>
        <CommandItemSettings ShowExportToExcelButton="true" />
        <Columns></Columns>
    </mastertableview>
</telerik:RadGrid>
skywillnosky
Top achievements
Rank 1
 answered on 30 Sep 2014
8 answers
241 views

    Limiting the dropdown height in certain circumstances using the DropDownHeight property is fine, but why does the autocomplete dropdown not behave the same way as all the other dropdowns in your control suite in that a scrollbar will appear if the dropdown is too large for the vertical space available?
Ivan Zhekov
Telerik team
 answered on 29 Sep 2014
6 answers
214 views
My tabstrip doesn't fit into space allowed. I would like to print my tab text in two line to make tabs shorter. Intuitive solution to decrease width and increase height doesn't seem to work

 <telerik:RadTabStrip runat="server" ID="RadTabStrip1"
                        Orientation="HorizontalTop"  Align="Center"  
                        style="width:100%; margin-top:10px;"
                        SelectedIndex="0" MultiPageID="rmpValueAdded"             
                        Skin="Default">
                        <Tabs>
                            <telerik:RadTab Text="Total Value Added" Width="100px" Height="50px"/>
                            <telerik:RadTab Text="Employee Compensation"/>
                            <telerik:RadTab Text="Proprietor Income"/>
                            <telerik:RadTab Text="Other Property Type Income"/>
                            <telerik:RadTab Text="Tax on Production and Imports"/>
                        </Tabs>
</telerik:RadTabStrip>

Please help
David
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 29 Sep 2014
1 answer
247 views
Hi All,

My question for client side code only using JavaScript.
I have a RadDropDownTree in my Form. In that DropDown I have some some data.
Suppose.
Central
    Middle Central
            Chicago
    Texoma
..
.
.
above mention is same data.

Now What I want is when User Select Chicago then Select text in client area of that dropdown should be anything like 'ABCD' or anything. I just want to set the
Selected text of that DropDownTree. I tried below mention code but is not working, In my RadDropDownTree, it still showing emptymessage.

var combo = $find("<%= RadDropDownLocations.ClientID %>");
combo._selectedText = "Davolio" + ";" + "Leverling";

Can someone guide me how can I set the text in DropDownTree


Vijay
Top achievements
Rank 1
 answered on 29 Sep 2014
1 answer
114 views
Hi there:

Im currently using the RadNumericTextBox to let users enter a value that ranges from 5000, to 0,0001. 
Im using the NumericTextBox since it does not allow charecters etc, and i like that.

My issue is when a user enters 0,0001 the box formats it to: 0,00 .

And when the user inputs 5000 it formats it to 5.000,00.

I want the user input to be true and not automaticly alter their input.

In the event that my application needs to accept 12 digit whole IDs, i want the textbox to just have that (e.g 123456789876).
Not have it changed to: 123.456.789.876,00

If i set DecimalDigits to 0 it ofcourse wont allow me to enter digits.
If i set GroupSeparator to ="" . It removes the group seperators but still adds digits to the end..

Thanks in advance.
Vasil
Telerik team
 answered on 29 Sep 2014
7 answers
263 views
I have a project (that is already well underway) that i thought could benefit from the pagelayout control. I began to rough-up a test page with the pagelayout control that i could import in my existing code into,  if the pagelayout control seemed to work well.
I encountered an issue right away. The existing page splits the whole screen into 5 columns. One for each week day. How can i divide the columns up when there are a total of 12 columns in the pagelayout that would need to divide into 5 distinct columns? I looked at a couple frameworks like Bootstrap and Gumby for solutiions to "odd number" column layouts, but most of the solutions seemed to be some pretty messy hacks. My vision would be for the days to stack upon each other on a mobile device and beside each other on ipad and above resolutioins. I have written some responsive design solutions with media queries, but their maintainability has always seemed half-baked. I was hoping for this solution to be relatively plug and play, because god knows there is enough complexity within the application itself. Adding another layer of complexity (i.e. a new framework like radpagelayout) makes no sense at this time, so i was hoping you or someone else in the community might have experience with such a modification.
Ivan Zhekov
Telerik team
 answered on 29 Sep 2014
4 answers
965 views
Hi
I am creating some charts and i have some requirement where
charts are rendered dynamically
ex: user 1 can have 3 charts, 1 line, 1 bar, 1 pie 
user2 can have 4 charts etc

also i need to provide dropdown on each chart so they can toggle back and forth so users can see same chart in pie/line/bar view etc

i was able to create charts in aspx and bind them in code behind but was looking if there is some sample available for creating charts from codebehind dynamically as some instances there could be 10 charts so i don't want to hardcode radhtml1, to 10 etc on aspx.

i need to provide drill downs also which i saw sample on telerik site which i will test and incorporate.
thanks for help

Danail Vasilev
Telerik team
 answered on 29 Sep 2014
4 answers
1.0K+ views
Here's my preliminary layout code for a simple button:

<telerik:RadButton ID="buttonReport" runat="server" AutoPostBack="true" Text="Summary" Font-Size="X-Small" BackColor="LightBlue" Icon-PrimaryIconCssClass="rbPrint" />

Why can't I set the background color?

Robert
Robert
Top achievements
Rank 1
 answered on 29 Sep 2014
1 answer
91 views
Hi Telerik Team,

I am having issue, regarding this i have described like below please go-through once.

First Screenshot: This represents given all details with Signature.

Second Screenshot: This represents after Generating required popup the Selected Signature Erased, this is the issue.

please suggest me if there is any solution.


Here is my Code Snippet:
-------------------------------------
.Aspx:
=====
<asp:UpdatePanel ID="upnl1" runat="server">
        <ContentTemplate>
            <table width="613">
                <tr>
                    <td>
                        <telerik:RadFilter runat="server" ID="RadFilter1" FilterContainerID="RadGrid1" ShowApplyButton="true"
                            ApplyButtonText="Apply Filter">
                        </telerik:RadFilter>
                    </td>
                </tr>
            </table>
            <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" AllowFilteringByColumn="false"
                AllowSorting="true" PageSize="10" OnNeedDataSource="RadGrid1_NeedDataSource"
                AllowPaging="true" Width="600px" ValidationSettings-ValidationGroup="A" CssClass="grid1"
                EnableHeaderContextMenu="true" OnInsertCommand="RadGrid1_InsertCommand" OnUpdateCommand="RadGrid1_UpdateCommand"
                OnItemCreated="RadGrid1_ItemCreated" OnItemDataBound="RadGrid1_ItemDataBound">
                <EditItemStyle BackColor="Gray" />
                <GroupingSettings CaseSensitive="false" ShowUnGroupButton="true" />
                <MasterTableView runat="server" AutoGenerateColumns="false" AllowSorting="true" AllowCustomSorting="true"
                    AllowFilteringByColumn="false" CommandItemDisplay="Top" TableLayout="Auto" DataKeyNames="id">
                    <CommandItemSettings ShowAddNewRecordButton="true" ShowRefreshButton="true" />
                    <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                    <CommandItemStyle CssClass="lnkNormal" />
                    <AlternatingItemStyle Height="10px" BackColor="#EAEAEA" ForeColor="#424242" Font-Size="12px" />
                    <Columns>
                        <telerik:GridEditCommandColumn ButtonType="ImageButton" FooterText="EditCommand footer"
                            EditImageUrl="images/Edit.gif" UniqueName="id" HeaderStyle-Width="40px" />
                     
                        <telerik:GridTemplateColumn DataField="Signature1" HeaderText="Signature" AllowFiltering="false"
                            UniqueName="Signature1" FilterControlWidth="35px" HeaderStyle-Width="100px">
                            <ItemTemplate>
                                <asp:ImageButton OnClick="img_Click" Height="30" Width="80" runat="server" ImageUrl='<%#"ImageHttpHandler.ashx?ProductID="+Eval("id")%>' />
                                <%--<telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" DataValue='<%#Eval("Signature1") %>'
                            AutoAdjustImageControlSize="false" Height="30px" Width="70px" ToolTip="signature"
                            AlternateText="image" ImageUrl="~/images/emptysignature.png"></telerik:RadBinaryImage>--%>
                            </ItemTemplate>
                            <InsertItemTemplate>
                                <telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" AllowedFileExtensions=".jpg,.jpeg,.png,.gif"
                                    MaxFileInputsCount="1" Width="200px" onclick="shouldConfirm = true;" PostbackTriggers="PerformInsertButton"
                                    Localization-Select="..." />
                                <asp:Label ID="lblupload1" runat="server" Visible="false" CssClass="error"></asp:Label>
                            </InsertItemTemplate>
                            <EditItemTemplate>
                                <telerik:RadAsyncUpload ID="RadAsyncUpload2" runat="server" AllowedFileExtensions=".jpg,.jpeg,.png,.gif"
                                    MaxFileInputsCount="1" Width="200px" onclick="shouldConfirm=true;"
                                    Localization-Select="...">
                                </telerik:RadAsyncUpload>
                            </EditItemTemplate>
                        </telerik:GridTemplateColumn>

                    </Columns>
                    <EditFormSettings InsertCaption="Create Impound Signatures" CaptionDataField="ServiceID"
                        CaptionFormatString="Edit Impound Signatures">
                        <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                        <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
                        <FormStyle Width="150%" BackColor="WhiteSmoke" />
                        <EditColumn UniqueName="GridID" ButtonType="ImageButton" CancelImageUrl="images/Cancel.gif"
                            UpdateImageUrl="images/update.gif" InsertImageUrl="images/update.gif">
                        </EditColumn>
                        <FormTableButtonRowStyle HorizontalAlign="Center" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
                    </EditFormSettings>
                </MasterTableView>
                <ClientSettings AllowColumnsReorder="true" EnableRowHoverStyle="true">
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" ScrollHeight="250px"
                        FrozenColumnsCount="1"></Scrolling>
                    <Selecting AllowRowSelect="true" />
                    <Resizing AllowColumnResize="true" AllowRowResize="false" ResizeGridOnColumnResize="true"
                        ClipCellContentOnResize="true" EnableRealTimeResize="false" AllowResizeToFit="false" />
                </ClientSettings>
                <SelectedItemStyle CssClass="rgSelectedRow"></SelectedItemStyle>
            </telerik:RadGrid>
        </ContentTemplate>
    </asp:UpdatePanel>

.Aspx.cs:
======

RadAsyncUpload RadAsyncUpload1 = (RadAsyncUpload)item.FindControl("RadAsyncUpload1") as RadAsyncUpload;

if (local_dts.Tables[0].Rows[i]["DefaultSign"].ToString()=="Yes")
                        {
                            count = 1;
                            RadWindowManager1.RadAlert("Default sign Already Selected.If u want to   choose  another please uncheck this", 330, 100, "TaxImpound", "");
                        }
Viktor Tachev
Telerik team
 answered on 29 Sep 2014
7 answers
661 views
Hello,

I was attempting to use a CustomValidator with a RadDatePicker and the validation function seems not to function. The same date picker has both a RequiredFieldValidator and CustomValidator. What I'm finding is that the custom validation client script is never fired. I'm not getting any javascript function errors either. The required field validator does however fire and properly prevents postback.

Code basically looks like this

<telerik:RadDatePicker runat="server" ID="dpkStart"  Culture="<%# vRIS.Business.Utility.DateFormatProvider.RISCulture %>" MinDate="<%# DateTime.Now.Date %>" SelectedDate="<%# DateTime.Now.Date %>" />
<asp:RequiredFieldValidator runat="server" ID="StartSearchingValidator" EnableClientScript="True" ControlToValidate="dpkStart" ValidationGroup="Availability" Display="Dynamic" Enabled="true" ErrorMessage="Search beginning is required" SetFocusOnError="True"  />
<asp:CustomValidator ID="valChecks" ControlToValidate="dpkStart" EnableClientScript="true" Enabled="true" ValidationGroup="Availability" Display="Dynamic" ClientValidationFunction="selfScheduleAvailability.validateAvailabilitySelection" ErrorMessage="Please select an availability day/time" runat="server"></asp:CustomValidator>

------- In a top level control, the submit button can be found.
<Portal:SubmitButton ID="btnAdvToConfirmation" Text="Schedule" OnClick="btnAdvToConfirmation_Click" ValidationGroup="Availability" CausesValidation="true" Width="130" runat="server" />
Carlo
Top achievements
Rank 1
 answered on 29 Sep 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?