Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
478 views

Hi,

I would like to generate headers, footers, table of contents etc (headers and footers in each page of the word document) when the editor content is exported to word document format (DocX). Please let me know how to achieve this. Thanks in advance.

regards,

Rama

Rumen
Telerik team
 answered on 16 Nov 2018
2 answers
75 views

Is there any way to move the EditMode tabs (Design / Html / Preview etc) to somewhere other than the bottom left of the editor?  For instance is there a way to move them to the top of the editor?  

 

Thanks!

-Mark

Mark
Top achievements
Rank 2
 answered on 15 Nov 2018
3 answers
86 views

Our application has several list/detail grids where the detail portion has differing numbers of checkbox columns from one main entry to another.  Additionally, the number, title, enabled state, and check state of each of the check boxes is driven by data stored in our database.  The entire grid is on a RadAjax panel.  We are finding that when one detail grid is already open and the user clicks another, the callback does a data bind first for the old detail and then for the new one, resulting in two sets of BL calls.  I suspect that this is a result of how we are creating the check box columns - it is done in back-end code which is called in the OnLoad event handler.  Does Telerik have any examples of the proper way of handling these types of column creations and updates so that the Ajax calls will work properly and not require the entire grid be redrawn?

TIA,

Ron L.

 

Eyup
Telerik team
 answered on 15 Nov 2018
5 answers
206 views
Is there an option to create a radprompt that has a multiline textbox instead of just a regular one? Probably not but I think it would be a nice addition.

thanks,
Elmar
Peter Milchev
Telerik team
 answered on 15 Nov 2018
1 answer
177 views

I have a RadImageGallery that appears in a boostrap modal when a button is clicked. I want to load different sets of images based on the project that was selected.

 

<form id="form1" runat="server">
  <telerik:RadScriptManager runat="server" ID="RadScriptManager1" EnableEmbeddedjQuery="false" />
    <div class="col-lg-12">
      <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel2">
        <h2 class="Heading">Image Viewer</h2>
        <telerik:RadImageGallery RenderMode="Lightweight" runat="server" ID="ImageViewerGallery" Height="473px" DisplayAreaMode="Image">
          <Items></Items>
        </telerik:RadImageGallery>
      </telerik:RadAjaxPanel>
    </div>
</form>

In jQuery, whenever I call 

var imageGalleryItems = $find('<%=ImageViewerGallery.ClientID%>').get_items();

I get an error message "Cannot read property 'get_items' of null.

Any ideas?

Peter Milchev
Telerik team
 answered on 15 Nov 2018
10 answers
446 views

Hello,
since I downloaded the latest version of Firefox, a few days ago, I see the checkboxes "duplicated" (2 squares for each checkbox).
How can I solve the problem?
Many thanks
Kurt

Rumen
Telerik team
 answered on 15 Nov 2018
1 answer
101 views

Hi,

We deployed a page with the editor with Document Manager in a shared hosting.

We can add/delete file but when try to move file, we get the error Nopermissionstomovefile.

Please refer to the attachment.

How can we fix this issue?

Thanks.

Rumen
Telerik team
 answered on 15 Nov 2018
6 answers
284 views

I am trying to consume a JSON service for client-side data binding.

The service requires a JWT token to be included in a 'Authorization' http header.

I'm assuming i need to implement something on <ClientEvents OnDataBinding="">, but i have little idea where to start.             

Any help would be appreciated.

 

the dataservice is setup as follows

<DataService Location="http://localhost:39338/" DataPath="/list/notifications" EnableCaching="true" ResponseType="JSON" HttpMethod="Get" CountPropertyName="Count" DataPropertyName="Data" />

Jason
Top achievements
Rank 1
 answered on 14 Nov 2018
1 answer
179 views

I have a Grid with a Binary Image and a Description field. Inserts work great, both binary image and description are saved correctly.

On updates, though, the description field is not getting updated, the "old" value is passed to the SqlDataSource, not the new edited value from the grid.

In other words... I add a record, with an image and a description (say, 'testing'). Verified it is saved in the database correctly (query in SQL Management Studio).

I then edit the record and change the description to 'Testing1234', tab off description field, click save, the new value is not saved, the old value 'testing' is.

I added some code to the SQL Datasources' OnInserting and OnUpdating events (see code below.)

On insert, the value of the @Description parameter is 'Testing' (when Testing is typed in the description.)

On update, changing the value in the Grid to 'Testing1234' and clicking the save button yields 'Testing' for the value of the @Description parameter in the OnUpdating event, not the new 'Testing1234' value entered in the Grid.

Any thoughts on why this is happening would be helpful. I've been staring at it now for 6 hours w/ no success, and other, similar Grids work fine (although this is my only grid which uses an Binary Image.)

 

My code:

<asp:SqlDataSource ID="SqlDataSource_Receipts" runat="server"
    ConflictDetection="CompareAllValues"
    OnInserting="SqlDataSource_Receipts_Inserting"
    OnUpdating="SqlDataSource_Receipts_Updating"
    ConnectionString="<%$ ConnectionStrings:Receipts %>"
    DeleteCommand="DELETE FROM Receipts WHERE Receipt_GUID = @Receipt_GUID"
    InsertCommand="INSERT INTO Receipts (Receipt_GUID, Employee_GUID, Description, ReceiptImage) VALUES (NEWID(), @Employee_GUID, @Description, @ReceiptImage)"
    SelectCommand="SELECT * FROM Receipts WHERE Employee_GUID = @Employee_GUID"
    UpdateCommand="UPDATE Receipts  SET Description = @Description, ReceiptImage = CASE WHEN ISNULL(DATALENGTH(CONVERT(varbinary(MAX), @ReceiptImage)), -1) = -1 THEN ReceiptImage ELSE CONVERT(VARBINARY(MAX), @ReceiptImage) END WHERE Receipt_GUID = @Receipt_GUID">
    <DeleteParameters>
        <asp:Parameter Name="Receipt_GUID" />
    </DeleteParameters>
    <InsertParameters>
        <asp:ControlParameter ControlID="RadGrid_Employees" Name="Employee_GUID" PropertyName="SelectedValues['Employee_GUID']" DbType="Guid" />
        <asp:Parameter Name="Description" />
        <asp:Parameter Name="ReceiptImage" />
    </InsertParameters>
    <SelectParameters>
        <asp:ControlParameter ControlID="RadGrid_Employees" Name="Employee_GUID" PropertyName="SelectedValues['Employee_GUID']" DbType="Guid" />
    </SelectParameters>
    <UpdateParameters>
        <asp:Parameter Name="Receipt_GUID" />
        <asp:Parameter Name="Description" />
        <asp:Parameter Name="ReceiptImage" />
    </UpdateParameters>
</asp:SqlDataSource>

 

The radgrid definition:

<telerik:RadGrid ID="RadGrid_Receipts" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource_Receipts" GridLines="None" Width="100%" AllowAutomaticUpdates="True" AllowAutomaticInserts="True" AllowAutomaticDeletes="True" AllowSorting="True" OnItemDataBound="RadGrid_Receipts_ItemDataBound" CellSpacing="0" ShowStatusBar="True" ShowFooter="true" AutoGenerateDeleteColumn="False" AutoGenerateEditColumn="False">
 <MasterTableView CommandItemDisplay="Bottom" AllowPaging="True" EditMode="InPlace" DataKeyNames="Receipt_GUID, Employee_GUID">
  <Columns>
   <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
    <HeaderStyle Width="50px" />
    <ItemStyle CssClass="MyImageButton" Width="50px" />
   </telerik:GridEditCommandColumn>
   <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ConfirmDialogType="RadWindow" ConfirmText="Delete this Receipt?" ConfirmTitle="Delete" Text="Delete" UniqueName="DeleteColumn">
    <HeaderStyle Width="25px" />
    <ItemStyle CssClass="MyImageButton" HorizontalAlign="Center" Width="25px" />
   </telerik:GridButtonColumn>
   <telerik:GridBinaryImageColumn DataField="ReceiptThumb" HeaderText="Receipt Image" UniqueName="ReceiptThumb" ResizeMode="Fit" ImageWidth="100" ImageHeight="100"  />
   <telerik:GridBoundColumn DataField="Description" HeaderText="Description" SortExpression="Description" UniqueName="Description" ItemStyle-Width="500px" HeaderStyle-HorizontalAlign="Center" />
  </Columns>
 </MasterTableView>
</telerik:RadGrid>

My Datasource onInserting/Updating events:

protected void SqlDataSource_Receipts_Inserting(object sender, SqlDataSourceCommandEventArgs e)
{
      SqlParameter d = (SqlParameter)e.Command.Parameters["@Description"];
      // d.Value = 'Testing' , correct, this is what I enter on the form.
}
protected void SqlDataSource_Receipts_Updating(object sender, SqlDataSourceCommandEventArgs e)
{
      SqlParameter d = (SqlParameter)e.Command.Parameters["@Description"];
      // d.Value = 'Testing' despite having typed 'Testing1234' in the RadGrid before clicking Save
}
Eyup
Telerik team
 answered on 14 Nov 2018
2 answers
129 views

I'm using the code from the Telerik documentation to maintain the selected row, but it's not working properly.  Instead of keeping the selected row, it's jumping to the top row in the table after each postback.

 

Here's the markup for the grid:

<telerik:RadGrid runat="server" ID="rgAdList" DataSourceID="sdsRgAdList" AutoGenerateColumns="False" AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True" ShowGroupPanel="True" OnSelectedIndexChanged="rgAdList_OnSelectedIndexChanged" OnPreRender="rgAdList_OnPreRender" OnItemCommand="rgAdList_OnItemCommand">
        <ClientSettings AllowDragToGroup="True" AllowColumnsReorder="True" ReorderColumnsOnClient="True">
            <Selecting AllowRowSelect="True"></Selecting>
            <ClientEvents OnRowSelected="RowSelected"></ClientEvents>
            <ClientEvents OnFilterMenuShowing="filterMenuShowing" OnRowSelected="rgAdList_RowSelected" OnRowCreated="rgAdList_RowCreated" OnRowDeselected="rgAdList_RowDeselected" />
        </ClientSettings>
        <FilterMenu OnClientShown="MenuShowing" />
        <GroupingSettings CaseSensitive="False"></GroupingSettings>
        <PagerStyle AlwaysVisible="True"></PagerStyle>
        <MasterTableView DataKeyNames="mail" DataSourceID="sdsRgAdList">
            <PagerStyle PageSizes="5, 10, 25, 50, 100, 200, 300, 400"></PagerStyle>
            <Columns>
                <telerik:GridBoundColumn DataField="givenName" HeaderText="First Name" SortExpression="givenName" UniqueName="givenName" FilterControlAltText="Filter givenName column" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="sn" HeaderText="Last Name" SortExpression="sn" UniqueName="sn" FilterControlAltText="Filter sn column" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="mail" ReadOnly="True" HeaderText="Email" SortExpression="mail" UniqueName="mail" FilterControlAltText="Filter mail column" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="title" HeaderText="Title" SortExpression="title" UniqueName="title" FilterControlAltText="Filter title column" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="department" HeaderText="Department" SortExpression="department" UniqueName="department" FilterControlAltText="Filter department column" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="manager" HeaderText="Manager" SortExpression="manager" UniqueName="manager" FilterControlAltText="Filter manager column" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"></telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>

 

Here's the script I'm trying to get to work?

<script type="text/javascript">
 
    function rgAdList_RowSelected(sender, args) {
        var id = args.getDataKeyValue("mail");
 
        var selected = (JSON.parse(sessionStorage.getItem("selectedItems")) != null) ? JSON.parse(sessionStorage.getItem("selectedItems")) : {};
 
        if (!selected[id]) {
            selected[id] = true;
 
            sessionStorage.setItem("selectedItems", JSON.stringify(selected));
        }
    }
 
    function rgAdList_RowDeselected(sender, args) {
        var id = args.getDataKeyValue("mail");
        var selected = JSON.parse(sessionStorage.getItem("selectedItems"));
 
        if (selected[id]) {
            selected[id] = null;
 
             sessionStorage.setItem("selectedItems", JSON.stringify(selected));
        }
    }
 
    function rgAdList_RowCreated(sender, args) {
        var id = args.getDataKeyValue("mail");
        var selected = JSON.parse(sessionStorage.getItem("selectedItems"));
 
        if (selected && selected[id]) {
            args.get_gridDataItem().set_selected(true);
        }
    }

 

Thanks, J

Eyup
Telerik team
 answered on 14 Nov 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?