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

Hi,

How can I get the grid row type when looping through all rows in grid client side.

         

           var masterTable = $find("<%=rgvMainGrid.ClientID%>").get_masterTableView();
           var rowCount = masterTable.get_element().rows.length;
           for (var i = 0; i < rowCount; i += 1) {
//Get Type Of Row Here (ie. GroupHeader, Data Row, GroupFooter)
}

 

Also, is there a complete list of the Client API objects.  I found a Client Side Programming Overview document but it only has few of the objects listed. 

For example, the documentation lists the .get_masterTableView() but I don't see anything on 

.get_masterTableView().getCellByColumnUniqueName or .get_masterTableView().get_element().rows.length

 

Thank You

Tracy

 

 

 

 

Eyup
Telerik team
 answered on 26 Jan 2018
1 answer
81 views

I am using this example and would like to change the TimeView.StartTime to then radScheduler.DayStartTime.Hours and the TimeView.Interval to 15 minutes when the raddock displays as the appointment edit. I have tried numerous events but the changes do not apply.

Any help would be greatly appreciated, thanks in advanve . 

 Dim rtpStartTime As RadDateTimePicker = TryCast(rdAddEditAppointment.ContentContainer.FindControl("StartTime"), RadDateTimePicker)
            If Not IsNothing(rtpStartTime) Then
                rtpStartTime.TimeView.StartTime = New TimeSpan(rsScheduler.DayStartTime.Hours, 0, 0)
                rtpStartTime.TimeView.Interval = New TimeSpan(0, DefaultScheduleMinutes, 0)
           End If

            Dim rtpEndTime As RadDateTimePicker = TryCast(rdAddEditAppointment.ContentContainer.FindControl("EndTime"), RadDateTimePicker)
            If Not IsNothing(rtpEndTime) Then
                rtpEndTime.TimeView.EndTime = New TimeSpan(rsScheduler.DayEndTime.Hours, 0, 0)
                rtpEndTime.TimeView.Interval = New TimeSpan(0, DefaultScheduleMinutes, 0)
            End If

Dan
Top achievements
Rank 1
 answered on 25 Jan 2018
5 answers
242 views
Using Q2 2014.  If I receive the error:

uncaught TypeError: Cannot read property 'set_additionalQueryString' of null
WebResource.axd line 12175

The error occurs in the console (tested with Chrome and IE) when the DropDownList is changed (postback, but any postback will cause the problem).

Very specific case.  The following code will reproduce.  The failure appears to be related to RadEditor with shared toolbar (ToolProviderID). 
- Removing the shared toolbar resolves the issue.
- Disabling AJAX resolves the issue.
- Removing the Refresh button or removing it from AAX resolves the issue.

However, I need all of the above to be enabled.

<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadAjaxManager ID="AjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnRefresh">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="phFields" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<asp:placeholder id="phFields" runat="server">
                <telerik:RadEditor ID="RadEditor1" runat="server">
                </telerik:RadEditor>
                <telerik:RadEditor ID="RadEditor2" runat="server" ToolProviderID="RadEditor1">
                </telerik:RadEditor>
                <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true">
                <asp:ListItem Text="a"></asp:ListItem>
                <asp:ListItem Text="b"></asp:ListItem>
                <asp:ListItem Text="c"></asp:ListItem>
                </asp:DropDownList>
            </asp:placeholder>
<asp:button id="btnRefresh" runat="server" />
</form>

Any help or direction would be greatful.  This error appears to be disabling pop-ups with RadWindow.
Alex
Top achievements
Rank 1
 answered on 25 Jan 2018
3 answers
1.5K+ views

I have a RadGrid which has a Detail link.  When this detail link is clicked, a RadWindow with a series of controls is displayed.  Among these controls is a RadGrid with an user control as its Edit Template.  I can open the edit template, but when I click Insert, Cancel or Update, the edit template will not close. 

 

This is the same template (and User Control) I use in a separate page that does not use a RadWindow but a normal ASPX page.  All of the functions (Insert, Cancel, Edit) work just fine in this page from the associated RadGrid.

Attila Antal
Telerik team
 answered on 25 Jan 2018
4 answers
209 views

Hi,

I am using this approach to show custom icon:

https://www.telerik.com/support/kb/aspnet-ajax/window/details/adding-a-custom-button-to-radwindow-titlebar

But with latest version 2017.3.913 it is not working, icon is shown, but tiny (in Lightweight mode)

Can you help?

 

Alex

 

Alex Dybenko
Top achievements
Rank 2
 answered on 25 Jan 2018
4 answers
1.7K+ views
We know we have set what the available page size options were on a Radgrid before, but we can't find our code for it. 2012 version had a Pagesizes property, but that's not there on Q3 2011. Anyone remember what the correct way to control page sizes in Q3 2011 was?
Eyup
Telerik team
 answered on 25 Jan 2018
4 answers
459 views
Unless I'm trying things out incorrectly, it doesn't seem CloudUpload sets the content type upon successfully uploading a file to azure storage.

I looked into the custom azure provider item, but doesn't seem to be an option to set content type.  

Did I test this out wrong?  Is this a known bug?  Is there a workaround?
Pat
Top achievements
Rank 1
 answered on 25 Jan 2018
0 answers
70 views

Please, How to save file information of asyncupload to database temp , so we can be move it to target folder on saved or submit form ?

I already refer to this link, but still doesn't work.

https://docs.telerik.com/devtools/aspnet-ajax/controls/asyncupload/functionality/manipulating-query-string-parameters-in-the-upload-handler

Thanks.

haryo
Top achievements
Rank 1
 asked on 25 Jan 2018
3 answers
236 views

Hello,

I am using JavaScript to remove some SearchContext items from the dropdown list. After executing the code below, the items remain in the Search Context dropdown list, but their selection no longer works correctly. I have tried both itemsCollection.removeAt(i); and itemsCollection.remove(item); and both behave in the same way.  If this is a bug, is there a way to define these items in server side code (C#)? That way I can decide which items to add. Thinking about it, I guess I could try adding the items on the client side, rather than declaratively.

JS Code to remove the desired items: I have stepped through vis the debugger to ensure the code is executed as expected.

var searchBox = $find("<%=SearchRadSearchBox.ClientID%>");
 
if (searchBox) {
    searchContext = searchBox.get_searchContext();
    if (searchContext) {
        itemsCollection = searchContext.get_items();
 
        for (var i = itemsCollection.get_count() - 1; i >= 0; i--) {
            item = itemsCollection.getItem(i);
            if (item) {
                if (item.get_text() == 'Joint Barcode' || item.get_text() == 'Weld Barcode') {
                    // remove the item
                    itemsCollection.removeAt(i);
                }
            }
        }
    }
}

 

Definition of the SearchBox:

<telerik:RadSearchBox RenderMode="Lightweight" ID="SearchRadSearchBox" runat="server" Width="500" OnSearch="SearchRadSearchBox_Search" EnableAutoComplete="False">
    <Localization DefaultItemText="General" LoadingItemsMessage="Some Loading" />
    <SearchContext>
        <Items>
            <telerik:SearchContextItem Text="Document Type" Key="1" />
            <telerik:SearchContextItem Text="Heat Number" Key="2" />
            <telerik:SearchContextItem Text="Spread" Key="3" />
            <telerik:SearchContextItem Text="Joint Barcode" Key="4" />
            <telerik:SearchContextItem Text="Weld Barcode" Key="5" />
        </Items>
    </SearchContext>
</telerik:RadSearchBox>

 

 

Marcel
Top achievements
Rank 1
 answered on 24 Jan 2018
0 answers
131 views

Basically in I am using the wizard and each step is using a user control. In most part it functions fine, but the section that uses the radTreeList, there seems to be a delay with the button actions inside the wizard.

Here is my wizard:

<telerik:RadAjaxPanel ID="radPanelWizard" runat="server" ClientEvents-OnResponseEnd="recreateItems">
 
       <asp:Literal ID="litStyle" runat="server"></asp:Literal>
         <telerik:RadWizard ID="radW" runat="server" Width="100%" OnActiveStepChanged="radW_ActiveStepChanged" OnFinishButtonClick="radW_FinishButtonClick" NavigationButtonsPosition="Top" RenderMode="Mobile"
             OnNextButtonClick="radW_NextButtonClick" DisplayCancelButton="true" OnCancelButtonClick="radW_CancelButtonClick">
             <WizardSteps>
                <telerik:RadWizardStep Title="Edit 1" ID="step1">
                    <uc1:FirstControl ID="usc1" runat="server"/>
                </telerik:RadWizardStep>
                <telerik:RadWizardStep Title="Edit 2" ID="step2">
                    <uc2:SecondControl ID="usc2" runat="server"/>
                </telerik:RadWizardStep>
                <telerik:RadWizardStep Title="Edit 3" ID="step3">
                    <uc3:ThirdControl ID="usc3" runat="server"/>
                </telerik:RadWizardStep>
             </WizardSteps>
        </telerik:RadWizard>
   
</telerik:RadAjaxPanel>

 

Im loading the TreeLists from the second user control in the second step. Here's the code for that:

<telerik:RadAjaxPanel ID ="radAjxPnlQAItems" runat="server">
    <div class="sortTable sortTableHalf">
        <asp:Literal ID="litMessage" runat="server"></asp:Literal>
        <telerik:RadTreeList ID="radItemView" runat="server" AllowPaging="false" DataKeyNames="MapID" ParentDataKeyNames="MapParentID" AutoGenerateColumns="false"
        OnItemCommand="radItemView_ItemCommand" OnItemCreated="radItemView_ItemCreated" AllowMultiItemSelection="True" OnNeedDataSource="radItemView_NeedDataSource" >
        <Columns>
            <telerik:TreeListBoundColumn DataField="MapID" HeaderText="MapID" UniqueName="MapID">
            </telerik:TreeListBoundColumn>
        <telerik:TreeListBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID">
            </telerik:TreeListBoundColumn>
            <telerik:TreeListBoundColumn DataField="ItemName" HeaderText="ItemName" UniqueName="ItemName">
            </telerik:TreeListBoundColumn>
        <telerik:TreeListTemplateColumn UniqueName="Template Column" HeaderText=" ">
            <HeaderStyle Width="140px"></HeaderStyle>
            <ItemTemplate>                       
                <telerik:RadButton ID="AddBtn" runat="server" Text="Add" CommandName="AddItem">
                </telerik:RadButton>
            </ItemTemplate>
        </telerik:TreeListTemplateColumn>
        </Columns>
        <NoRecordsTemplate>
        No Records Found
        </NoRecordsTemplate>
 
        </telerik:RadTreeList>
    </div>
    <div class="sortTable sortTableHalf">
        <telerik:RadTreeList ID="radTreeSelected" runat="server" AllowPaging="false" DataKeyNames="MapID" ParentDataKeyNames="MapParentID" AutoGenerateColumns="false"
        OnItemCommand="radTreeSelected_ItemCommand" OnItemCreated="radTreeSelected_ItemCreated" OnDeleteCommand="radTreeSelected_DeleteCommand" OnNeedDataSource="radTreeSelected_NeedDataSource">
        <Columns>
            <telerik:TreeListBoundColumn DataField="MapID" HeaderText="MapID" UniqueName="MapID">
            </telerik:TreeListBoundColumn>
        <telerik:TreeListBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID">
            </telerik:TreeListBoundColumn>
            <telerik:TreeListBoundColumn DataField="ItemName" HeaderText="ItemName" UniqueName="ItemName">
            </telerik:TreeListBoundColumn>
            <telerik:TreeListTemplateColumn UniqueName="Template Column" HeaderText=" ">
            <HeaderStyle Width="140px"></HeaderStyle>
            <ItemTemplate>                       
                <telerik:RadButton ID="DelBtn" runat="server" Text="Remove" CommandName="Delete">
                </telerik:RadButton>
            </ItemTemplate>
        </telerik:TreeListTemplateColumn>
        </Columns>
        <NoRecordsTemplate>
        No Records Found
        </NoRecordsTemplate>
        </telerik:RadTreeList>
    </div>
</telerik:RadAjaxPanel>

 

The logic with those trees is this. The 'radItemView' contains an add button and lists the hierarchy of elements that can be added. The 'radTreeSelected' contains the items, that were added when they clicked the add button. For the most part it works, but what I noticed is this. Any time you go into the section, clicking the add or remove button for the first time after reaching this step, there is significant delay before the tree update. However, if you click the add or remove button again for a different item, then the update is instantaneous. It seems like to me, is that the wizard is causing the tree list to clear something, and seems to reinitialize when clicking the add button. Is there a way to resolve that?

 

 

 

Paul
Top achievements
Rank 1
Iron
 asked on 24 Jan 2018
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?