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

As showed on the piece of code bellow, I have a TabStrip with a multipage. When the page first loads, a grid is loaded. When the user clicks a row from the grid, a new tab opens with the details of that row.
 If I put the RadPageView to 100% height the grid is cut off as it's not adapting to the height of the grid. If I put a static value, it doesn't adapt to different window sizes. 

I tried to correct this issue using the javascript posted bellow. While it works when I resize the window, when the page first loads, it's not resizing. If you check the line 9. of the JS, you can see that on the (document).ready I try to force the new size but nothing happens.

You can see what is happening on the 2 files I attached. Is there anyway I can resolve this issue?

 

<telerik:RadTabStrip
    ID="tabContactsList"
    runat="server"
    MultiPageID="ContactsPagesViews"
    Orientation="HorizontalTop"
    SelectedIndex="0">       
</telerik:RadTabStrip>
<telerik:RadMultiPage ID="ContactsPagesViews" ScrollBars="Auto" Height="100%"
    RenderMode="Lightweight" runat="server"
    OnPageViewCreated="ContactsPagesViews_PageViewCreated"
    SelectedIndex="0">       
    <telerik:RadPageView ID="RadPageView1" runat="server" Height="100%">
        <telerik:RadGrid
            runat="server"
            ID="RadGrid1"
            DataSourceID="dtContactsList"
            AllowFilteringByColumn="True"
            AllowPaging="True"
            AutoGenerateColumns="False"
            Height="100%"
            BorderWidth="0px"
            AllowSorting="True"
            Style="outline: none"
            EnableLinqExpressions="False"                
            ShowGroupPanel="true"
            FilterMenu-Enabled="true"                                
            FilterType="Classic"
            OnItemCommand="RadGrid1_ItemCommand"
            OnItemDataBound="RadGrid1_ItemDataBound" >
            <ExportSettings><Pdf PageWidth=""></Pdf></ExportSettings>
            <ClientSettings
                Scrolling-AllowScroll="false"
                Scrolling-UseStaticHeaders="true"
                Selecting-AllowRowSelect="true"
                EnablePostBackOnRowClick="true"
                AllowDragToGroup="true"
                EnableRowHoverStyle="true">
                <Selecting AllowRowSelect="True" />
                <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" FrozenColumnsCount="2"></Scrolling>
            </ClientSettings>
            <PagerStyle Mode="NumericPages" PageSizeControlType="None" ></PagerStyle>
            <MasterTableView TableLayout="Fixed" Width="100%" ClientDataKeyNames="ID" PageSize="16">
                <Columns>
                    <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn" AllowFiltering="false">
                        <ItemStyle Width="40px" />
                        <HeaderStyle Width="40px" />
                        <ItemTemplate>
                            <asp:CheckBox ID="CheckBox1" runat="server" OnCheckedChanged="ToggleRowSelection" AutoPostBack="True" />
                        </ItemTemplate>
                        <HeaderTemplate>
                            <asp:CheckBox ID="headerChkbox" runat="server" OnCheckedChanged="ToggleSelectedState"
                                AutoPostBack="True" />
                        </HeaderTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn DataField="Id" DataType="System.Int32" HeaderText="<%$ Resources:ContactManager.aspx, lblContactManagerId_HeaderText %>" AllowFiltering="false" UniqueName="Id" Display="false" HeaderStyle-Width="25px">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Name" FilterControlAltText="Filter Name column" HeaderText="<%$ Resources:ContactManager.aspx, lblContactManagerName_HeaderText %>" SortExpression="Name" UniqueName="Name" DataType="System.String">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="City" DataType="System.String" FilterControlAltText="Filter City column" HeaderText="<%$ Resources:ContactManager.aspx, lblContactManagerCity_HeaderText %>" SortExpression="City" UniqueName="City" ItemStyle-Width="15%" HeaderStyle-Width="15%">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Country.Name" DataType="System.String" FilterControlAltText="Filter Country column" HeaderText="<%$ Resources:ContactManager.aspx, lblContactManagerCountry_HeaderText %>" SortExpression="Country" UniqueName="Country" ItemStyle-Width="15%" HeaderStyle-Width="15%">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Address" FilterControlAltText="Filter Address column" HeaderText="<%$ Resources:ContactManager.aspx, lblContactManagerAddress_HeaderText %>" SortExpression="Address" UniqueName="Address" DataType="System.String" ItemStyle-Width="25%" HeaderStyle-Width="25%">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Phone" DataType="System.String" FilterControlAltText="Filter Phone column" HeaderText="<%$ Resources:ContactManager.aspx, lblContactManagerPhone_HeaderText %>" SortExpression="Phone" UniqueName="Phone" ItemStyle-Width="10%" HeaderStyle-Width="10%">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
            <FilterMenu CssClass="RadFilterMenu_CheckList">
            </FilterMenu>
        </telerik:RadGrid>
    </telerik:RadPageView>
</telerik:RadMultiPage>
<asp:ObjectDataSource ID="dtContactsList" runat="server" DeleteMethod="DeleteContact" SelectMethod="GetAllContacts" TypeName="LCG.Web.IAMS.AWA.Pages.ContactManager">
    <SelectParameters>
        <asp:ControlParameter ControlID="ctl00$ContentPlaceHolder1$RadTreeView1" Name="priorityId" PropertyName="SelectedValue" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>
 

 

<telerik:RadScriptBlock runat="server" ID="RadScriptBlock1">
    <script type="text/javascript">
            $(document).ready(function () {
                  
                $(window).resize(function () {
                    ResizePage($find('<%= ContactsPagesViews.ClientID %>'))
                });
  
                 ResizePage($find('<%= ContactsPagesViews.ClientID %>'))
            });
  
        function ResizePage(multiPage) {
            for (i = 0; i < multiPage.get_pageViews().get_count() ; i++) {
                var pageView = multiPage.get_pageViews().getPageView(i);
                pageView.get_element().style.height = ($(window).height() - 80) + 'px';
            }
}
        </script>
</telerik:RadScriptBlock>
 

Thank you.

 

Nencho
Telerik team
 answered on 16 Oct 2015
7 answers
195 views

Hi,
I  have a problem with Editor. When I copy content from word and paste it in the Editor (Ctrl+V) in our website line height automatically changes even if I set the StripFormattingOptions property to ‘NoneSupressCleanMessage’.
I have also tried this on telerik’s demo site and the issue occurs there as well:
http://demos.telerik.com/aspnet-ajax/editor/examples/cleaningwordformatting/defaultcs.aspx
See the snapshot of the original document and the content after pasting in the radeditor
You can see that in the html mode the line height is being set to 115%. The line height should have been identical to that in MS Word
Please I need this issue to be solved ASAP.

 

I have attached the snapshots of the site and word file

Ianko
Telerik team
 answered on 16 Oct 2015
4 answers
313 views
Hi, 

I'm trying to apply a CSS class to the <p> tag using the "Apply CSS Class".
In the latest version of Chrome the RADEditor adds a new <span> tag around text instead than adding the CSS class to the <p> tag.
Example:  <p><span class="someClass">Text</span></p>

The Firefox correctly handles applying a CSS class to an element selected via the DOM Inspector.
Example:  <p class="someClass">Text</p>

Best regards,
Andrey
Ianko
Telerik team
 answered on 16 Oct 2015
2 answers
63 views
I am very new to telerik, so sorry if you didn't understand my question​,  i'll try my best to explain

I have three links in the rrbmenugroup. see the screen1

if i click on Archive link and follow up it with alert popup, the first one still shows up (it doenst go away). see screen2

Am i missing something in css?

my QA raised the issue that it should go away, any help will be appreciated.
Sajad
Top achievements
Rank 1
 answered on 15 Oct 2015
1 answer
97 views

Hello,

I have a radGrid where I create the columns dynamically (according to the settings of the user, they decide which column to view). I have have a NestedViewTemplate not created dynamically.

After the grid is loaded, I look at the structure of the html code of the grid and I do not see the invisible row corresponding to the nested template.

I am not sure if I should add something to relate the NestedViewTemplate when creating dynamically the columns?

<telerik:RadGrid ID="rgRate" runat="server" OnNeedDataSource="rgRate_NeedDataSource"
    OnItemDataBound="rgRate_ItemDataBound" OnItemCreated="rgRate_ItemCreated"            OnSortCommand="rgRate_SortCommand"
    OnItemCommand="rgRate_ItemCommand" Skin="Investor1" EnableEmbeddedSkins="false" ClientSettings-EnablePostBackOnRowClick="false"
    AllowSorting="true" AllowPaging="true" AutoGenerateColumns="false" AllowMultiRowSelection="false"
    PagerStyle-Mode="NumericPages" PagerStyle-AlwaysVisible="true" ShowFooter="false"
    MasterTableView-NoMasterRecordsText="No Records found." SortingSettings-EnableSkinSortStyles="true">
    <ExportSettings>
        <Csv ColumnDelimiter="Tab" RowDelimiter="NewLine" FileExtension="TXT" />
    </ExportSettings>
    <ClientSettings EnableRowHoverStyle="true" AllowColumnsReorder="false" EnablePostBackOnRowClick="false" >
        <Selecting AllowRowSelect="true" />
        <Resizing AllowColumnResize="false" EnableRealTimeResize="false" />
        <ClientEvents OnGridCreated="radGrid_onGridCreated"/>
    </ClientSettings>
    <MasterTableView ShowHeadersWhenNoRecords="true" TableLayout="fixed" Width="100%" ExpandCollapseColumn-Visible="false"
        AllowNaturalSort="false" DataKeyNames="key1, key2, ..."
        CommandItemDisplay="Top">
        <CommandItemTemplate>
.....
 
        </CommandItemTemplate>
        <NestedViewTemplate>
            <div>...</div>
 
        </NestedViewTemplate>
 
        <PagerTemplate>
            <div>
                ...
            </div>
        </PagerTemplate>
    </MasterTableView>
</telerik:RadGrid>

 

     Thank you

Gregory

​

Gregory
Top achievements
Rank 2
 answered on 15 Oct 2015
1 answer
418 views

I have a RadButton on an ASPX page and I am trying to enable a disabled button in the code behind page.

I have no problem enabling ​on ​the client side (via set_enabled method), is there a magic trick to doing it in C# on the server side?

 

Code is: 

void fileList_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
    btnSave.Enabled = true;
}

 

Thank you,

SM

Simon
Top achievements
Rank 1
 answered on 15 Oct 2015
9 answers
268 views
Hi,

The documentation and demos don't seem to show much in the way of client-side functionality is this true or can you supply more information?

Essentially I'm looking for a control that can support a multi-level hierarchy where nodes can be dragged on or off the chart. Therefore lets say you have a list of people down one side and you wish to organise them by dragging and dropping them onto the OrgChart. From the looks of it I can't see any client-side functionality for creating/removing nodes. Do you think the functionality I ask is possible to implement (or extend) with this control?

Thanks,
Shane
Vinh
Top achievements
Rank 1
 answered on 15 Oct 2015
1 answer
48 views

I have created a large form which I wanted to implement Ajax on some parts. I am very new to Ajax and ASP.NET and was wondering how I should go about it.

The questions are mostly "yes" or "no" RadComboBox selections except one with the "other" option. There is one part of the form where if the user selects "yes" then a checkbox will appear. If the user selects "no" then the checkbox will not be visible to them. In another part if the user selects "yes" there is another question that will appear right below, and if they select no then it will stay hidden.In the last part of the form that needs implementation if the user selects "yes" a textbox will appear, if they select "no" a checkbox will appear, and if they select "other" a different textbox will appear.

Viktor Tachev
Telerik team
 answered on 15 Oct 2015
5 answers
203 views
I am trying to use rad menu for the top navigation in sharepoint custom master page. I noticed that it shows the home tab and every thing under that as a dropdown (2nd level) menu. Is there a way to display it from the second level, so that i see the second levels as the top level.
The hierarchy of my site is -
Home
    - Client
    - Admin
    - Research
I want to see the Client, Admin and Research items as the top level navigation.
Here is the code I have
<telerik:RadMenu ID="TopNavigationMenu" runat="server" DataSourceID="topSiteMap" EnableViewState="false" />
<asp:SiteMapDataSource
     ShowStartingNode="False"
     SiteMapProvider="SPNavigationProvider"
     id="topSiteMap"
     runat="server"
       StartingNodeUrl="sid:1002"
       StartFromCurrentNode="true"
       StartingNodeOffset="0"
       />
GACA
Top achievements
Rank 2
 answered on 15 Oct 2015
5 answers
653 views

I am having trouble with the sort function on the RadGrid.  All columns are set to allow sorting, but only some columns work.  When I click on the  header, the grid repaints but nothing changes and the previous selected sort column remains highlighted with the sort icon visible.  It will not change to some of the columns.  In the same code,these columns will not sort:  Modified Date , Client Name and Proposal Type.  The remaining columns sort fine.

 

       <telerik:RadGrid ID="ProposalGrid" DataSourceID="SqlDataSource1" runat="server" AutoGenerateColumns="False" AllowPaging="True" GroupingEnabled="False" Skin="Metro" OnItemDataBound="ProposalGrid_ItemDataBound"
            OnPreRender="ProposalGrid_PreRender" OnItemEvent="ProposalGrid_ItemEvent" CssClass="defaultText"
            OnDeleteCommand="ProposalGrid_DeleteCommand" OnUpdateCommand="ProposalGrid_UpdateCommand"
            OnPageSizeChanged="ProposalGrid_PageSizeChanged" PageSize="15" OnSortCommand="ProposalGrid_SortCommand"
            GroupPanelPosition="Top" ResolvedRenderMode="Classic" AllowMultiRowEdit="True" AllowMultiRowSelection="True" OnDataBound="ProposalGrid_DataBound" AllowSorting="True">
            <ClientSettings EnableRowHoverStyle="True">
                <Selecting AllowRowSelect="True"></Selecting>
            </ClientSettings>
            <MasterTableView DataSourceID="SqlDataSource1" ClientDataKeyNames="PropDesc" DataKeyNames="PropDesc"
                UseAllDataFields="True" TableLayout="Auto" EditMode="EditForms" NoDetailRecordsText="There are no cases for this workbook."
                NoMasterRecordsText="There are no cases for this workbook.">
                <PagerStyle AlwaysVisible="true" Wrap="False" PageButtonCount="5" ShowPagerText="True" />
                <SortExpressions>
                    <telerik:GridSortExpression FieldName="PropDesc" SortOrder="Ascending" />
                </SortExpressions>
                <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                    <HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                   <HeaderStyle Width="20px"></HeaderStyle>
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridClientSelectColumn FilterControlAltText="Filter column1 column" UniqueName="column1" DataType="System.TimeSpan">
                    </telerik:GridClientSelectColumn>
                    <telerik:GridBoundColumn DataField="PropDesc" FilterControlAltText="Filter PropDesc2 column"
                        HeaderText="Storage Description" SortExpression="PropDesc" UniqueName="PropDescEditorCol"
                        Visible="False" ColumnEditorID="PropDescEditor" HeaderButtonType="None">
                        <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Wrap="False" />
                        <ItemStyle HorizontalAlign="Left" Wrap="False" />
                    </telerik:GridBoundColumn>
                    <telerik:GridDateTimeColumn FilterControlAltText="Filter ModifiedDate column"
                        HeaderText="Modified Date" ReadOnly="True" SortExpression="ModifiedDate" UniqueName="ModifiedDate">
                        <HeaderStyle Font-Bold="True" Wrap="False" />
                        <ItemStyle Wrap="False" HorizontalAlign="Left" />
                    </telerik:GridDateTimeColumn>
                    <telerik:GridTemplateColumn FilterControlAltText="Filter ClientName column"
                        HeaderText="Client Name" ReadOnly="True" SortExpression="ClientName" UniqueName="ClientName">
                        <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Width="100px" Wrap="False" />
                        <ItemStyle HorizontalAlign="Center" Width="100px" Wrap="False" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn DataField="PresentedBy" FilterControlAltText="Filter AgentName column" HeaderText="Agent Name" UniqueName="AgentNameCol" ColumnEditorID="AgentName" ReadOnly="True" SortExpression="AgentNameCol" EmptyDataText="">
                        <HeaderStyle Font-Bold="True" Wrap="False" />
                        <ItemStyle HorizontalAlign="Left" Width="150px" Wrap="False" />
                    </telerik:GridBoundColumn>
                    <telerik:GridHyperLinkColumn DataNavigateUrlFields="PropNumber,ClientNumber,ConceptProcNum"
                        DataNavigateUrlFormatString="Prop={0}&amp;ClientID={1}&amp;WP={2}&amp;Type=Edit"
                        DataTextField="PropDesc" FilterControlAltText="Filter column column" HeaderText="Storage Description"
                        UniqueName="PropDesc" SortExpression="PropDesc">
                        <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Wrap="False" Width="160px" />
                        <ItemStyle HorizontalAlign="Left" Wrap="False" Width="160px" />
                    </telerik:GridHyperLinkColumn>
                    <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="Proposal Type"
                        ReadOnly="True" UniqueName="SalesConcept" SortExpression="SalesConcept">
                        <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Wrap="False" Width="100px" />
                        <ItemStyle HorizontalAlign="Left" Wrap="False" Width="100px" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn DataField="PolicyCaseNotation" FilterControlAltText="Filter column column"
                        HeaderText="Policy Notation" ReadOnly="True" SortExpression="PolicyCaseNotation"
                        UniqueName="PolicyCaseNotation" ItemStyle-Wrap="False">
                        <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Wrap="False" Width="120px" />
                        <ItemStyle HorizontalAlign="Left" Wrap="False" Width="120px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="PolicyInitPremium" DataFormatString="{0:$#,0}"
                        FilterControlAltText="Filter column1 column" HeaderText="Initial Premium" ReadOnly="True"
                        SortExpression="PolicyInitPremium" UniqueName="PolicyInitPremium">
                        <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Wrap="False" Width="80px" />
                        <ItemStyle HorizontalAlign="Right" Wrap="False" Width="80px" />
                    </telerik:GridBoundColumn>
                </Columns>
                <EditFormSettings PopUpSettings-Modal="True" FormCaptionStyle-Wrap="False">
                    <EditColumn ButtonType="ImageButton" InsertText="Insert Order" UpdateText="Update record"
                        UniqueName="EditCommandColumn1" CancelText="Cancel edit">
                    </EditColumn>
                    <FormCaptionStyle Wrap="False"></FormCaptionStyle>
                    <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
                    <PopUpSettings Modal="True"></PopUpSettings>
                </EditFormSettings>
            </MasterTableView>
            <HeaderStyle Wrap="False" />
            <PagerStyle AlwaysVisible="True" Mode="NextPrevNumericAndAdvanced" />
            <SelectedItemStyle Font-Bold="True" />
            <FilterMenu EnableImageSprites="False">
            </FilterMenu>
        </telerik:RadGrid>

​

Eyup
Telerik team
 answered on 15 Oct 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?