Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
119 views

Hi there,

I'm trying to get a RadTreeList to create a child record on the next hierarchical level. I have EditMode="InPlace". I want to place the edit area to properly reflect where the child record will be placed, and I have attached pictures below with what I currently have and what I want.

Currently, the edit area appears on the same level as the record that the insert button was clicked. I need it to appear on the next level of nesting directly under the parent record, along with the appropriate tree lines.

Ideally I'd like a server-side implementation. Does anyone know if this is possible and if so, how I would be able to do it?

Thanks

 

ASPX:

<telerik:RadTreeList RenderMode="Lightweight" runat="server" ID="radTree" DataKeyNames="ID,PartNum" ParentDataKeyNames="ParentID,ParentPartNum" AutoGenerateColumns="false" EditMode="InPlace"
                     OnNeedDataSource="radTree_NeedDataSource"
                     OnItemDataBound="radTree_ItemDataBound"
                     OnUpdateCommand="radTree_UpdateCommand"
                     OnDeleteCommand="radTree_DeleteCommand"
                     OnInsertCommand="radTree_InsertCommand"
                     OnItemCreated="radTree_ItemCreated"
                     OnItemSelected=""
                     OnItemCommand="radTree_ItemCommand"
                     OnTreeShowingEditor=""
                     ExpandCollapseMode="Server" Width="100%" Skin="Windows7">
    <Columns>
        <telerik:TreeListEditCommandColumn UniqueName="EditCommandColumn"
                                            ButtonType="FontIconButton"
                                            HeaderStyle-Width="80px"
                                            AddRecordText="Add child part"
                                            EditText="Edit part">
        </telerik:TreeListEditCommandColumn>
        <telerik:TreeListButtonColumn UniqueName="DeleteCommandColumn"
                                        Text="Delete"
                                        CommandName="Delete"
                                        HeaderStyle-Width="40px"
                                        ButtonType="FontIconButton"
                                        ToolTip="Delete part">
        </telerik:TreeListButtonColumn>
        <telerik:TreeListBoundColumn DataField="ParentID"
                                        HeaderText="ParentID"
                                        UniqueName="ParentPath"
                                        Visible="false">
            <HeaderStyle Width="200px"></HeaderStyle>
        </telerik:TreeListBoundColumn>
        <telerik:TreeListBoundColumn DataField="ParentPartNum"
                                        HeaderText="ParentPartNum"
                                        UniqueName="ParentPartNum"
                                        Visible="false">
            <HeaderStyle Width="200px"></HeaderStyle>
        </telerik:TreeListBoundColumn>
        <telerik:TreeListBoundColumn DataField="ID"
                                        HeaderText="ID"
                                        UniqueName="ID"
                                        Visible="false">
            <HeaderStyle Width="200px"></HeaderStyle>
        </telerik:TreeListBoundColumn>
        <telerik:TreeListTemplateColumn UniqueName="PartNum"
                                        DataField="PartNum"
                                        HeaderText="Part Number"
                                        HeaderStyle-Width="300px">
            <ItemTemplate>
                <asp:Literal Text='<%#Eval("PartNum").ToString() %>'
                    runat="server" ID="PartNum"></asp:Literal>
            </ItemTemplate>
            <EditItemTemplate>
                <div style="display: inline-block">
                    <telerik:RadTextBox ID="txtPartNum"
                                        runat="server"
                                        Width="100px"
                                        Text='<%# Bind("PartNum")%>' />
                    <telerik:RadButton ID="radBtnSearch"
                                        runat="server"
                                        Text="Search"
                                        CommandName="openSearchErpPart"
                                        OnClientClicking="openSearchErpPart" />
                </div>
            </EditItemTemplate>
        </telerik:TreeListTemplateColumn>
    </Columns>
 
    <ClientSettings>
        <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" ScrollHeight="400px" />
        <Selecting AllowItemSelection="true" />
        <ClientEvents OnItemClick="itemClick" />
    </ClientSettings>
</telerik:RadTreeList>

 

 

Dean
Top achievements
Rank 1
 asked on 17 Apr 2019
7 answers
293 views
Hi,

I am having an issue where the horizontal scrollbar disappears at times or returns in the wrong spot. I can still use my mouse and scroll even when it is not visible. The exact symptom is attached in images below. The issue occurs in edge, but not in chrome. I have not checked firefox. Also, the issue appears to go away when I remove the 2 frozen columns, but I really need those. The code for the grid is below, but I did change the uniquenames, sortexpressions, and headertext for privacy. Any ideas on how to fix this is greatly appreciated. Thank you.

 
<div style="width:98%;height:73%;background-color:white;">
                                    <telerik:RadGrid RenderMode="Lightweight" ID="gvFilter" runat="server" GridLines="Vertical" AllowMultiRowSelection="true" OnPreRender="gvFilter_PreRender"
                                        AllowSorting="true" AllowPaging="true" GroupingEnabled="false" PageSize="20" Height="100%" OnSortCommand="gvFilter_SortCommand" OnItemDataBound="gvFilter_ItemDataBound"
                                        EnableViewState="true" CssClass="RadGrid_Bootstrap" EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true" OnItemCommand="gvFilter_ItemCommand"
                                         EnableEmbeddedSkins="false" AutoGenerateColumns="false" OnNeedDataSource="gvFilter_NeedDataSource" OnItemCreated="gvFilter_ItemCreated"
                                         AllowFilteringByColumn="true" FilterType="HeaderContext" OnFilterCheckListItemsRequested="gvFilter_FilterCheckListItemsRequested" >
                                        <MasterTableView AllowMultiColumnSorting="true" IsFilterItemExpanded="true">
                                            <Columns>
                                                <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" EnableHeaderContextMenu="false"></telerik:GridClientSelectColumn>
                                                <telerik:GridTemplateColumn UniqueName="FileStatus" SortExpression="FileStatus" HeaderText="Status" DataField="FileStatus" FilterCheckListEnableLoadOnDemand="true">
                                                    <ItemTemplate>
                                                        <asp:HyperLink runat="server" Text='<%# Eval("FileStatus") %>' NavigateUrl='<%# Eval("fkBatchPDFID", "../ViewReport.aspx?id={0}") %>'
                                                            Visible='<%# Eval("FileStatus").ToString() == "Ready" %>' Target="_blank" />
                                                        <asp:Label Text='<%# Eval("FileStatus") %>' Visible='<%# Eval("FileStatus").ToString() != "Ready" %>' runat="server" />
                                                    </ItemTemplate>
                                                </telerik:GridTemplateColumn>
                                                <telerik:GridBoundColumn UniqueName="Shared" DataField="Shared" SortExpression="Shared" HeaderText="Shared" FilterCheckListEnableLoadOnDemand="true" />
                                                <telerik:GridBoundColumn UniqueName="A" DataField="A" SortExpression="A" HeaderText="A"  FilterCheckListEnableLoadOnDemand="true" />                        
                                                <telerik:GridBoundColumn UniqueName="B" DataField="B" SortExpression="B" HeaderText="B"  FilterCheckListEnableLoadOnDemand="true" />
                                                <telerik:GridBoundColumn UniqueName="C" DataField="C" SortExpression="C" HeaderText="C"  FilterCheckListEnableLoadOnDemand="true"  />
                                                <telerik:GridBoundColumn UniqueName="D" DataField="D" SortExpression="D" HeaderText="D" FilterCheckListEnableLoadOnDemand="true" />
                                                <telerik:GridBoundColumn UniqueName="E" DataField="E" SortExpression="E" HeaderText="E" FilterCheckListEnableLoadOnDemand="true" />
                                                <telerik:GridBoundColumn UniqueName="F" DataField="F" SortExpression="F" HeaderText="F" FilterCheckListEnableLoadOnDemand="true" />
                                                <telerik:GridBoundColumn UniqueName="G" DataField="G" SortExpression="G" HeaderText="G"  FilterCheckListEnableLoadOnDemand="true" />
                                                <telerik:GridBoundColumn UniqueName="H" DataField="H" SortExpression="H" HeaderText="H"  FilterCheckListEnableLoadOnDemand="true" />
                                                <telerik:GridBoundColumn UniqueName="I" DataField="I" SortExpression="I" HeaderText="I" FilterCheckListEnableLoadOnDemand="true" />
                                                <telerik:GridBoundColumn UniqueName="J" DataField="J" SortExpression="J" HeaderText="J"  FilterCheckListEnableLoadOnDemand="true" />
                                                <telerik:GridBoundColumn UniqueName="K" DataField="K" SortExpression="K" HeaderText="K"  FilterCheckListEnableLoadOnDemand="true" />
                                                <telerik:GridBoundColumn UniqueName="L" DataField="L" SortExpression="L" HeaderText="L" FilterCheckListEnableLoadOnDemand="true"/>
                                                <telerik:GridBoundColumn UniqueName="M" DataField="M" SortExpression="M" HeaderText="M" FilterCheckListEnableLoadOnDemand="true" />
                                                <telerik:GridBoundColumn UniqueName="N" DataField="N" SortExpression="N" HeaderText="N" FilterCheckListEnableLoadOnDemand="true" />
                                                <telerik:GridBoundColumn UniqueName="O" DataField="O" SortExpression="O" HeaderText="O" FilterCheckListEnableLoadOnDemand="true" />
                                                <telerik:GridBoundColumn UniqueName="P" DataField="P" SortExpression="P" HeaderText="P" FilterCheckListEnableLoadOnDemand="true" />
                                                <telerik:GridBoundColumn UniqueName="Q" DataField="Q" SortExpression="Q" HeaderText="Q" FilterCheckListEnableLoadOnDemand="true" />
                                                <telerik:GridBoundColumn UniqueName="R" DataField="R" SortExpression="R" HeaderText="R" FilterCheckListEnableLoadOnDemand="true" />          
                                                <telerik:GridBoundColumn UniqueName="S" DataField="S" SortExpression="S" HeaderText="S" FilterCheckListEnableLoadOnDemand="true" />
                                                <telerik:GridBoundColumn UniqueName="T" DataField="T" SortExpression="T" HeaderText="T" FilterCheckListEnableLoadOnDemand="true" />
                                                <telerik:GridBoundColumn UniqueName="U" DataField="U" SortExpression="U" HeaderText="U" FilterCheckListEnableLoadOnDemand="true" />              
                                                <telerik:GridBoundColumn UniqueName="V" DataField="V" SortExpression="V" HeaderText="V" FilterCheckListEnableLoadOnDemand="true"  />
                                                <telerik:GridBoundColumn UniqueName="W" DataField="W" SortExpression="W" Display="false" HeaderText="ID1" EnableHeaderContextMenu="false"  />
                                                <telerik:GridBoundColumn UniqueName="X" DataField="X" SortExpression="X" Display="false" HeaderText="ID2" EnableHeaderContextMenu="false" />
                                                </Columns>
                                        </MasterTableView>
                                        <ClientSettings ReorderColumnsOnClient="true" >
                                            <Scrolling AllowScroll="True" ScrollHeight="100%" UseStaticHeaders="True"  FrozenColumnsCount="2"></Scrolling>
                                            <Selecting AllowRowSelect="True" EnableDragToSelectRows="false"></Selecting>
                                        </ClientSettings>
                                        <PagerStyle AlwaysVisible="true" PageSizeControlType="None"></PagerStyle>
                                        <FilterMenu EnableEmbeddedSkins="false" CssClass="RadFilter_Bootstrap" ></FilterMenu>
                                        <HeaderContextMenu EnableEmbeddedSkins="false" CssClass="RadMenu_Bootstrap" ></HeaderContextMenu>
                                    </telerik:RadGrid>
                                </div>
S
Top achievements
Rank 1
 answered on 17 Apr 2019
0 answers
132 views

I'v been searching at this for a while now, but can't seem to find the solutions.

I have a Paginated RadGrid with grouped items. Everything works fine, including the {continues on next page} and {continued from previous page} messages.
However, I'm adding a button + use custom text (Label) in the header by using <GroupHeaderTemplate>.

No matter how I set the groupsettings, I fail to get any continuation message to appear.
What would be the way to keep the default functionality but use a GroupHeaderTemplate? Or do I need to edit the header from code behind?(I prefer not to use the ItemDataBound/ItemCreated/PreRender events to customize the header as I've encountered inconsistencies trying it that way)

Nils
Top achievements
Rank 1
 asked on 17 Apr 2019
0 answers
117 views

Hello,

I have a cell context menu on my Pivot Grid and I want to add an option to view the data that compound that cell value.

As for exemple on my attached file: I want to right click on value "1784,00", open the context menu and hit "View". Then I should query by the filters "LANÇAMENTO MANUAL" (row), "APM TERMINALS ITAJAI S.A" (row) and "APMT SERVIÇOS RETROPORTUARIOS LTDA" (column) to retrieve the data that corresponds to the total "1784,00", but I don't know how to get the rows & columns values of the selected cell.

 

Is there a way to achieve that?

Thiago
Top achievements
Rank 1
 asked on 17 Apr 2019
1 answer
490 views

Having an issue with trying to handle the < character in a RadTextBox. I didn't want to have to resort to putting a RadEditor on the form as no other formatting is required.

 

The exception happens on your RadTextbox demo form, as seen in the attachment.

 

Can this be handled elegantly w/o blowing up the page?

Rumen
Telerik team
 answered on 17 Apr 2019
1 answer
394 views

Hi ,  How to Enable/Disable radtoolbar from client side ?
i am used jquery like below , but not disabled.

var rtbar = $find("ctl00_ContentPlaceHolder1_Searchbar");

 if (SelectedName == "False") {
        $("#rtbar").attr("disabled", true);
         //   $("#rtbar").prop("disabled", true);
       // $("#rtbar").attr("style", "disabled:true;");
    }
    else {
       $("#rtbar").removeAttr('disabled');
        // $("#rtbar").attr("disabled", false);
        //$("#rtbar").attr("style", "disabled:false;");
    }

Thanks
 
   

Rumen
Telerik team
 answered on 17 Apr 2019
1 answer
164 views

I am building a page where multiple users collaborate on writing a document.  But I want to check to be sure that all changes have been accepted or rejected prior to submitting the document for approval.  Is there a client-side method that will tell me that, or do I just need to write a quick method that looks for the pending changes tags?  I don't mind writing it, as it wouldn't be difficult, but I'm just hoping that there is a more native solution.

 

Something like below:

if (RadEditor.hasPendingChanges() == false)
{
     AllowSubmit();
}else{
     RejectSubmit();
}

 

Rumen
Telerik team
 answered on 17 Apr 2019
14 answers
512 views

Any consideration to a Bootstrap Telerik Skin that matches the condensed/small Bootstrap sizing.  Specifically for input controls -- like textbox and combobox, etc.

Love the Bootstrap skin - its just a bit large.  And so many of the other Telerik skins are gradient/glossy in their look - we could use more "simple & clean" options.

Or is there some .css based method (w/o going through every control) to affect the existing skin?

Rumen
Telerik team
 answered on 17 Apr 2019
3 answers
222 views

Week 

Sunday: 12/30/2018 - Saturday: 01/05/2019 in SQL Server I get week #1

RadCalendar shows it as week 53.

I have this in my page load event,

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim C As System.Globalization.CultureInfo = New System.Globalization.CultureInfo(Me.rcCalendar.CultureInfo.ToString())
        C.DateTimeFormat.CalendarWeekRule = System.Globalization.CalendarWeekRule.FirstFourDayWeek
        C.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Sunday
        Me.rcCalendar.CultureInfo = C

SQL server is using defaults, Set DateFirst 7 --Sunday

I've also tried this, nothing seems to make any change.

 Protected Overrides Sub InitializeCulture()
        Dim c As System.Globalization.CultureInfo = New System.Globalization.CultureInfo(System.Threading.Thread.CurrentThread.CurrentCulture.ToString())
        c.DateTimeFormat.CalendarWeekRule = System.Globalization.CalendarWeekRule.FirstFourDayWeek
        System.Threading.Thread.CurrentThread.CurrentCulture = c
        MyBase.InitializeCulture()
    End Sub

 

I've also tried this Routine, which returns week #1 for date : 01/01/2019

Private Function GetIso8601WeekOfYear(ByVal pDateTime As DateTime) As Integer
        Dim day As DayOfWeek = Globalization.CultureInfo.InvariantCulture.Calendar.GetDayOfWeek(pDateTime)
        If day >= DayOfWeek.Monday AndAlso day <= DayOfWeek.Wednesday Then
            pDateTime = pDateTime.AddDays(3)
        End If
        Return Globalization.CultureInfo.InvariantCulture.Calendar.GetWeekOfYear(pDateTime, Globalization.CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Sunday)
    End Function

 

ASPX

<telerik:RadCalendar runat="server" ID="rcCalendar" EnableMultiSelect="False" Width="100%" Height="240px" FirstDayOfWeek="Sunday"
                        DayNameFormat="Short" AutoPostBack="True" ShowRowHeaders="true" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False"
                        EnableWeekends="True" FastNavigationNextText="&amp;lt;&amp;lt;" SelectedDate="" RangeSelectionMode="None">
                        <ClientEvents OnDateClick="DateClick" />
                    </telerik:RadCalendar>

Eyup
Telerik team
 answered on 17 Apr 2019
2 answers
113 views

I have code to ExpandCollapse functionality in my grid upto 4 level detail table view, previously i was working fine but now it is redirecting me to another page because  I have applied code to redirect inside RowClick event. means when I tried to click on ExpandCollapse it fires same command but on same time it comes again in Itemcommand and e.command shows = RowClick and due to that it executing functionality of RowClick.

Please check image for aspx page radgrid code and .cs code is here.

I think it is happening after took update of 2019.1.215.45 (I am not sure).

 
        protected void rgNegolytes_ItemCommand(object sender, GridCommandEventArgs e)
        {

if (e.CommandName == "RowClick")
           {

//redirect to another page.

}               

 else if (e.CommandName == "ExpandCollapse")
            {

// expand grid and collapse grid.....

 

}
               

}

Attila Antal
Telerik team
 answered on 17 Apr 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?