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

Hey guys, i have been coding a radgrid with the option to export the data as excel and word. That all works just fine also the export, but when i change visible true/false the export buttons suddenly will not trigger as the first time.

I have these export buttons inside a radpagelayout. The 3'rd button "btnAddP" has visibility change, so when i click it it will hide the export buttons. When the visibility is back to export buttons, they don't do anything when clicked. I wanted to hear some suggestions from you guys and maybe if someone have had the same issue and how to handle it properly. 

01.<Columns>
02.        <telerik:LayoutColumn Span="8">
03.          <telerik:RadPageLayout ID="rplRadgrid" runat="server">
04.            <telerik:LayoutRow>
05.              <Columns>
06.                <telerik:LayoutColumn Span="4">
07.                  <telerik:RadButton ID="ibtnExportAsExcel" runat="server" ToolTip="Excel" OnClick="ibtnExportAsExcel_Click" CssClass="Margin">
08.                    <Image ImageUrl="~/Images/filetype-tiny.xls.png" />
09.                  </telerik:RadButton>
10.                  <telerik:RadButton ID="ibtnExportAsWord" runat="server" ToolTip="Word"                         OnClick="ibtnExportAsWord_Click"
11.                    <Image ImageUrl="~/Images/filetype-tiny.doc.png" />
12.                  </telerik:RadButton>
13.                  <telerik:RadButton ID="btnAddP" runat="server" OnClick="btnAddParticipants_Click"
14.                    <Image ImageUrl="../Images/edit-tiny.png" />
15.                  </telerik:RadButton>
16.                </telerik:LayoutColumn>
17.              </Columns>
18.            </telerik:LayoutRow>

......

 

void ConfigureExport()
    {
      
      radgrid.ExportSettings.UseItemStyles =
      radgrid.ExportSettings.ExportOnlyData =
      radgrid.ExportSettings.IgnorePaging =
      radgrid.ExportSettings.OpenInNewWindow = true;
 
      radgrid.ExportSettings.FileName = Resources.c3.Export;
    }
protected void ibtnExportAsExcel_Click(object sender, EventArgs e)
  {
    ConfigureExport();
    radgrid.MasterTableView.ExportToExcel();
  }
 
  protected void ibtnExportAsWord_Click(object sender, EventArgs e)
  {
    ConfigureExport();
    radgrid.MasterTableView.ExportToWord();
  }

 

protected void btnAddP_Click(object sender, EventArgs e)
    {
      tmrChatBoard.Enabled = false;
      rplUpdateP.Visible = true;
      rplRadgrid.Visible = false;
 
    }
Rumen
Telerik team
 answered on 23 Jul 2019
3 answers
137 views
Hii
I'm using radeditor 2015
How can i limit the lines to 70 chars , split lines after the 70 chars, without cutting the word.
Thanks
Rumen
Telerik team
 answered on 22 Jul 2019
16 answers
322 views

The application that I'm building is a document repository / content management system. I am using the editor for creating AND displaying a read-only verision of the documents. The issue I'm having now is that if the editor is in Preview Mode, the ribbon is disabled (there is functionality in it that we want available at all times... print, export to word, redirect to the full editor version of the page).  But if the editor is in Design Mode, any href's are not able to be clicked (they are treated as raw text).  I don't want users to be able to type into this editor, so I have it in Design Mode, but with enableEditing set to false. But having enableEditing turned off causes the context menu (where a user could normally follow a link from one of the selections) to not appear and they get the default windows context menu instead.

 

I'd really prefer to keep the ribbon (for visual consistency) and let it work as designed, as opposed to creating a series of buttons that appear on the top of the page.

 

Any suggestions on how to overcome this?

Rumen
Telerik team
 answered on 22 Jul 2019
4 answers
161 views

I'd like to remove all context menu options except for "Open Link" on the hyperlink context menu.  I've tried to manually set the context menus (based off of old code found in the forums), but it doesn't seem to be working.  Is there a list somewhere that tells me ALL of the context menus so that I can disable them?  And am I missing something on the method of disabling them?  The snippet below represents a few things I've tried.  It seems to remove the context menu for "A", but that's the one I'm trying to keep (although I'd like to strip it down to the single "Open Link" option).

 

This is one of the workarounds I'm trying in regards to my other question from a few days ago (no answers on that one yet either)

 

Thanks so much for any help!

 

<ContextMenus>
    <telerik:EditorContextMenu TagName="P" Enabled="false">
        <telerik:EditorTool Name="JustifyLeft" Enabled="false" />
        <telerik:EditorTool Name="JustifyCenter" Visible="false" />
        <telerik:EditorTool Name="JustifyRight" Visible="false" />
        <telerik:EditorTool Name="JustifyFull" Visible="false" />
    </telerik:EditorContextMenu>
    <telerik:EditorContextMenu TagName="BODY" Enabled="false">
        <telerik:EditorTool Name="Cut" Visible="false" />
        <telerik:EditorTool Name="Copy" Visible="false" />
        <telerik:EditorTool Name="Paste" Visible="false" />
        <telerik:EditorTool Name="PasteFromWord" Visible="false" />
        <telerik:EditorTool Name="PastePlainText" Visible="false" />
        <telerik:EditorTool Name="PasteAsHtml" Visible="false" />
    </telerik:EditorContextMenu>
</ContextMenus>
Rumen
Telerik team
 answered on 22 Jul 2019
5 answers
1.1K+ views
I am trying to loop through each item in a radlistview, not just the selected item. I have been tying to figure this out based on examples for standard listviews. This is how I've been shown to do it in a normal listview:


foreach (ListViewItem itemRow in this.ListView.Items)
{
for (int i = 0; i < itemRow.SubItems.Count; i++)
{
// Do something useful here !
// e.g 'itemRow.SubItems[count]' <-- Should give you direct access to
// the item located at co-ordinates(0,0). Once you got it, do something
// with it.
}
}

Peter Milchev
Telerik team
 answered on 22 Jul 2019
8 answers
620 views

I’m using a radgrid with boundcolumns, some of the columns are displayed as percentages.  How would I display percentages in the group footer and the grand total footer?   It's easy to sum, count fields in footers but I'm stumped with how to create calculated fields in footers.

The percentage would be calculated by sum of one column divided by the other.  I looked at the example that uses the CustomAggregates event but if I used that then it would have to create a datatable for every percentage column for every group which would be significant overhead. 

 

Let me know if you have any suggestions.

 

Thanks,

Bob

Eyup
Telerik team
 answered on 22 Jul 2019
4 answers
916 views

hi,

             i want to scroll down to the select item in radlistbox

             I search the particular word in text box and click the search button , in  button click the we change the color but automatically scroll down not work. i need scroll down automatically to the particular string.

 

I send the screenshot

 

http://prntscr.com/odyyh6

 

http://prntscr.com/odyz8x

Attila Antal
Telerik team
 answered on 19 Jul 2019
3 answers
172 views

I was wondering if there was a strategy for getting the Google web crawler to index tabs other than the default one.

I have a page on our web site that uses a TabStrip and only the contents of the default tab are being indexed.

The content for each tab is loaded into a single label control from a database via postback whenever a tab is clicked. 

Does anyone have any other strategies they have used?

Thanks,

Charlotte

Rumen
Telerik team
 answered on 19 Jul 2019
1 answer
750 views
I have telerik rad DropDownList, I want to change the background color of one item to yellow.
Here is the aspx, which I put the cssClass to  unknown css

<div class="col-md-3 customColumnPadding" id="uiColumnClasses" runat="server">
        <telerik:RadDropDownList ID="uiClasses" runat="server" Width="100%">
            <Items>
                <telerik:DropDownListItem runat="server" Text="<%$ Resources:Resource,Unknown %>" Value="22001" cssClass ="unknown"/>
                <telerik:DropDownListItem runat="server" Text="<%$ Resources:Resource,Business %>" Value="22002" />
                <telerik:DropDownListItem runat="server" Text="<%$ Resources:Resource,Economy %>" Value="22004" Selected="true" />
                <telerik:DropDownListItem runat="server" Text="<%$ Resources:Resource,First %>" Value="22003" />
                <telerik:DropDownListItem runat="server" Text="<%$ Resources:Resource,Premium_Economy %>" Value="22005" />
            </Items>
        </telerik:RadDropDownList>
    </div>


And here is the content of css file:
```
.RadDropDownList_MetroTouch .rddlFocused
{
    border-color: #486190 !important;
    background-color: #486190 !important;
}

.unknown
{
    border-color: #FFFF00 !important;
    background-color: #FFFF00 !important;
}
```

However, I found that in inspector of the browser, the css Class ```unknown``` is not exist. And the item color is not changed. Here is the content get from inspector. You can see the value "Unknown" is not have the css class ```unknown```
```
<div id="ctl00_ContentPlaceHolder1_UsageControl0_UsageControl58_uiClasses" class="RadDropDownList RadDropDownList_MetroTouch" style="width:100%;" tabindex="0">
<span class="rddlInner rddlFocused">
<span class="rddlFakeInput">Unknown</span>
<span class="rddlIcon">
<!-- &nbsp; -->
</span></span>
<input id="ctl00_ContentPlaceHolder1_UsageControl0_UsageControl58_uiClasses_ClientState" name="ctl00_ContentPlaceHolder1_UsageControl0_UsageControl58_uiClasses_ClientState" type="hidden" autocomplete="off">
</div>
```

What is the problem? How can I make the item change to yellow color where the value is Unknown?

Peter Milchev
Telerik team
 answered on 19 Jul 2019
3 answers
88 views

Hello guys,

We have to open this thread as we're facing a strange behavior with RadEditor when using in a RadMultiPage control. This is happening only on Windows 10 FireFox version 68.0(Quantum) but it may happen on other versions as well.

Prerequisite:

-  Asp.Net web forms application, .net framework 4.7.2

-  RadMultiPage with some RadPageView controls

- Each RadPageView control having a RadEditor in it. Doesn't matter NewLineMode: P, Div.

Steps:

1. When the page loads, before switching tabs, write few lines in editor. Each line is rendered correct with no extra blank lines between.

2. After switching tabs, doesn't matter which one or how many times, write few lines in editor. Now, after each line, the editor added 1-2-3 extra blank lines.

When saying lines I mean paragraph if NewLineMode=P or div if NewLineMode=Div.

 

Mention that we are using Telerik Asp.Net Ajax version 2017.2.503.40, embedded resources and 'lightweight' render mode.

 

I've uploaded 3 screen captures and I also have isolated the case in a mini application to send to you, just let me know where to upload.

I hope I haven't duplicated another thread but I couldn't find anything before starting this.

 

Regards,

 

Andrei V.

 

 

Rumen
Telerik team
 answered on 19 Jul 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?