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

Hi

I am a trying to export radgrid to excel.

My Export settings are as follows

<ExportSettings FileName="Reports" ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true" Excel-Format="Html"></ExportSettings>

I am setting border below in 

protected void RadGrid1_HTMLExporting(object sender, GridHTMLExportingEventArgs e)
{
            e.Styles.Append("th { border:solid 0.1pt #CCCCCC; }");

}

 

I am able to export with border. But my Group Column was separated as 2 cell in output. 

I have attached 2 images (expected results vs error_output)

Please help!!!

 

 

 

Marin Bratanov
Telerik team
 answered on 09 Oct 2018
2 answers
198 views
I am trying to build a server side binding application where I have the customer (green marker) and suppliers (red marker) and I can't seem to get the markers to get set differently.  I would like to use the push pins from the custom markers on the client side datasource but I can not seem to get it figured out.  Any help would be appreciated.
Peter Milchev
Telerik team
 answered on 09 Oct 2018
7 answers
218 views

I'm applying MailMerge example mentioned here in our system

I added code related to custom dropdown only, to test insertion

After selection an option, I just get a title window, like shown in screenshot_1.png attached
here's what shown in debugger, as shown in debugger.png attached. Reading values seems working fine, but the insertion itself doesn't happen, instead that message only shows.
 

Please advise!
Thank you
Rumen
Telerik team
 answered on 09 Oct 2018
1 answer
192 views
I'm using the radWizard and on one step, the users enter a bank routing number and an account number.  I have a database table that holds all the valid routing numbers and I would like to validate that what the user entered in a radtextbox is an actual value in the table.  Is there a way to call server-side validation before I navigate to the next step in the wizard?
Peter Milchev
Telerik team
 answered on 09 Oct 2018
1 answer
247 views
I am trying to add some custom controls to the Rad Spreadsheet toolbar, like text box, button etc.. How can i do this. 
Peter Milchev
Telerik team
 answered on 09 Oct 2018
1 answer
208 views
I have a radgrid and two footer items are an aggregate sum. The grid is fine in alignment, but when exported to pdf the total aggregate somehow moves a columnover.
I have tried adding a dummy column at the end. Tried adding a style to align left, tried adding left margin. Whatever was possible I did. I am starting to think that this a Telerik issue. Please compare two images below.
Tsvetomir
Telerik team
 answered on 09 Oct 2018
2 answers
1.2K+ views
I just need validation on my rad textbox . Only alllow only number with $ and decimal point. Textbox inside radgrid template column

example $ 123.33 or $ 12342.00.

Thanks

Cameron
Top achievements
Rank 1
 answered on 09 Oct 2018
2 answers
62 views
RadNavigation and RadTabStrip work fine in Visual Studio when test using IE11. After publishing and implementing on Web Server, IE only shows links for the navigation and the tabs will not work. Chrome works fine. Testing on the web server with IE11 also works fine. Have to use IE11, can't use Edge either.
Kenneth
Top achievements
Rank 1
 answered on 08 Oct 2018
3 answers
434 views

I have a few columns with balances showing on the grid that I export to excel.

I only show the $ sign in the footer totals and the rows are displayed without the $. So my column looks like below:

 

<telerik:GridBoundColumn Aggregate="Sum" DataField="PlanExpense" HeaderText="Annual Plan Expense" UniqueName="PlanExpense"
                            DataFormatString="{0:#,##0.00;(#,##0.00)}" HeaderStyle-Width="9%" FooterAggregateFormatString="{0:c2}" />

protected void grid_ExportCellFormatting(object source, ExportCellFormattingEventArgs e)
{
    if (e.FormattedColumn.ColumnType == "GridTemplateColumn")
    {
        GridTemplateColumn templateCol = (GridTemplateColumn)e.FormattedColumn;
        if (templateCol.DataTypeName == "System.Decimal" || templateCol.DataTypeName == "System.Double")
        {
            e.Cell.Style["mso-number-format"] = "$#,##0.00;($#,##0.00)";
        }
    }
 
    if (e.FormattedColumn.ColumnType == "GridBoundColumn")
    {
        GridBoundColumn boundCol = (GridBoundColumn)e.FormattedColumn;
        if (boundCol.DataFormatString.ToLower().Contains("0:c") || boundCol.DataFormatString.ToLower().Contains("$"))
        {
            //e.Cell.Style["mso-number-format"] = "$#,##0.00;($#,##0.00)";
            e.Cell.Style["mso-number-format"] = "-$* #,##0.00_-;$* (#,##0.00-);_-$* \" - \"??_-;_-@_-";
        }
        else if (boundCol.DataFormatString.ToLower().Contains("%"))
        {
            e.Cell.Style["mso-number-format"] = "0.##%;(0.##%)";
        }
        else if (boundCol.DataFormatString.ToLower().Contains("0:#,##0.00"))
        {
            e.Cell.Style["mso-number-format"] = "0:#,##0.00;(#,##0.00)";
        }
        else if (boundCol.DataFormatString.Contains("{0:P}"))
        {
            e.Cell.Style["mso-number-format"] = @"Percent";
        }
        else if (boundCol.DataFormatString.Contains("{0:#,##0;(#,##0)}"))
        {
            e.Cell.Style["mso-number-format"] = "$#,##0;($#,##0)";
        }
    }
 
 
}

I specify formatting in the exportcellformatting event as shown above, but it seems that is only applicable to the data rows and not the footer. Currently excel displays a negative currency in red parenthesis and I do not want to show the negative in red, only in parentheses.

Is there a way I can format the footer to do that?

 

Tsvetomir
Telerik team
 answered on 08 Oct 2018
1 answer
174 views

Hi,

I'm trying to add a RadButton as checkbox type to toggle "Enabled" and "Disabled" a RadNumericTextBox. Can someone help me please?

 

ASPX Code:

<td>
    <telerik:RadNumericTextBox ID="PAPTestDays" runat="server" DataType="System.Int32" Font-Names="Calibri" Font-Size="9pt" MaxLength="3" Skin="Metro" Width="100px">
        <NegativeStyle Resize="None" />
        <NumberFormat DecimalDigits="0" ZeroPattern="n" />
        <EmptyMessageStyle Resize="None" />
        <ReadOnlyStyle Resize="None" />
        <FocusedStyle Resize="None" />
        <DisabledStyle Resize="None" />
        <InvalidStyle Resize="None" />
        <HoveredStyle Resize="None" />
        <EnabledStyle Resize="None" />
    </telerik:RadNumericTextBox>
    <asp:RangeValidator ID="PAPTestDaysxRangeValidator" runat="server" ControlToValidate="PAPTestDays" ErrorMessage="This value should be between 30 and 365!" Display="Dynamic"
             MaximumValue="365" MinimumValue="30" Type="Integer" ForeColor="Red" Font-Names ="Calibri" Font-Size="9pt">
    </asp:RangeValidator>
    <telerik:RadButton RenderMode="Lightweight" ID="PAPTestDaysEnabled" runat="server" ToggleType="CustomToggle" ButtonType="ToggleButton" AutoPostBack="False" OnClientCheckedChanged="PAPTestDaysEnabled_OnCheckedChanged">
        <ToggleStates>
         <telerik:RadButtonToggleState Text="" PrimaryIconCssClass="rbToggleCheckbox" />
         <telerik:RadButtonToggleState Text="" PrimaryIconCssClass="rbToggleCheckboxChecked" />
        </ToggleStates>
    </telerik:RadButton>
</td>

JavaScript Code:

function PAPTestDaysEnabled_OnCheckedChanged() {
    var checkBox = $find("<%= PAPTestDaysEnabled.ClientID %>");
    var PAPTestDaysTextBox = $find("<%= PAPTestDays.ClientID %>");
    if (checkBox.get_checked()) {
        PAPTestDaysTextBox.enable();
    } else {
        PAPTestDaysTextBox.disable();
    }
}

Rumen
Telerik team
 answered on 08 Oct 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?