Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
625 views
I have a column in grid which is of " DateTime " data type. I have default filtering set ON for the grid and the code for the column goes like this :
                    <telerik:GridBoundColumn UniqueName="OrderDate" DataField="OrderDate" HeaderText="Ordered on"
                        CurrentFilterFunction="EqualTo" ShowFilterIcon="False" AutoPostBackOnFilter="True"
                        DataFormatString="{0:MM/dd/yy}" DataType="System.DateTime">
                        <ItemStyle HorizontalAlign="Right" />
                        <HeaderStyle HorizontalAlign="Right" Width="65px" />
                    </telerik:GridBoundColumn>

And the grid is showing all the columns perfectly as expected. For the above code the grid shows only the date in the column but not the time. But, I want to filter the column only by date and not by date time. As when I serach only by date, the filter results with no records for a particular date, as the time(for the provided date) does not match when I do not provide it(I think it takes the default time "00:00:00.000"). I am unable to achieve this. Please help me out.

Thanks.
Kostadin
Telerik team
 answered on 28 Mar 2016
1 answer
68 views

Hi

I have a radeditor in which text from word is copied has &nbsp; between tags which acts as spacing between two paraghraphs.

But when I use get_html via js, it scrubs this '&nbsp;' from the text, due to which the spacing between paraghraphs is cleared.

I am attaching word text for reference

 

 

 

 

Dear Tammy,

The internal audit department is currently involved in a quality assurance review (QAR) that will continue through September 12, 2014.The internal audit standards require an external review of the internal audit activity every five years. The QAR is designed to assess Internal Audit’s conformance with the standards of the auditing profession and its effectiveness in providing assurance & consulting services to the Company’s board of directors, senior leaders, and other interested parties.

We acknowledge the time constraints with your busy schedules, but would greatly appreciate your completion of this survey. The survey results will go directly to Protiviti and your response will be kept confidential.  Internal Audit will only be provided the summarized results.

If you have any questions regarding the process, please feel free to contact Sean Humphreys at Thank you in advance for participating in the QAR and helping continuously improve the effectiveness of the internal audit function.

 Thank You
Protiviti

 

 

 

Ianko
Telerik team
 answered on 28 Mar 2016
1 answer
119 views

At the current my website is using ajax:DragPanelExtender to show my grid data as a popup, and now I want to replace it with Telerik RadWindow to consistent with the UI of the website.

BUT, I still have not found a way to do it. Because ajax:DragPanelExtender is server-side while Radwindow is Client-side.
Is there any way that can solve my problem?

Please give me an advice.

Scenario: In my website, there is a button named "mybutton". When I hit it, ajaxToolkit:ModalPopupExtender will be shown my data under a popup.
Here is the code in my *.ascx file:

<asp:LinkButton ID="myHiddenControl" runat="server" Text=""></asp:LinkButton>
 
<ajaxToolkit:ModalPopupExtender runat="server"
    ID="myModalPopupExtender"
    TargetControlID="myHiddenControl"
    BehaviorID="programmaticModalPopup"
    PopupControlID="myPanel"
    BackgroundCssClass="modalBackground"
    DropShadow="True"
    RepositionMode="RepositionOnWindowScroll"
    DynamicServicePath=""
    Enabled="True">
</ajaxToolkit:ModalPopupExtender>
 
<asp:Panel runat="server"
    CssClass="modalPopup"
    ID="myPanel"
    Style="width: 440px; height: 500px; padding: 10px;" meta:resourcekey="Resource2">
 
    <div>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <table>
                    <!-- show my data in a table -->
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Panel>

And here is vb code

Protected Sub mybutton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles mybutton.Click
    myModalPopupExtender.Show()
End Sub

Marin Bratanov
Telerik team
 answered on 28 Mar 2016
1 answer
291 views

I'm following this page: http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/functionality/scrolling/how-to/scrolling-to-the-selected-item

but the scroll remains at the top of the grid...

Here is my .aspx page:

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" RenderMode="Auto" AllowSorting="False" GroupingEnabled="false" AllowPaging="False" OnNeedDataSource="RadGrid1_OnNeedDataSource" Skin="Metro" OnItemDataBound="RadGrid1_OnItemDataBound" AllowFilteringByColumn="False">
                <MasterTableView AllowNaturalSort="false">
                    <Columns>
                        <telerik:GridBoundColumn  HeaderText="" UniqueName="Position" HeaderStyle-Width="40px">
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn ItemStyle-CssClass="gridImage" HeaderStyle-Width="43px">
                            <ItemTemplate>
                                <%# getImage(Container.DataItem)  %>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn DataField="Pseudo" HeaderText="Pseudo" UniqueName="Pseudo" >
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Points" HeaderText="Points" UniqueName="Points" HeaderStyle-Width="70px">
                        </telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings ReorderColumnsOnClient="false" AllowColumnsReorder="false">
                    <Virtualization EnableVirtualization="false" InitiallyCachedItemsCount="100"
                        LoadingPanelID="RadAjaxLoadingPanel1" ItemsPerView="20" />
                    <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="300px" />
                    <Resizing AllowColumnResize="false" />
                    <ClientEvents OnGridCreated="GridCreated" />
                </ClientSettings>
            </telerik:RadGrid>

 

<script type="text/javascript">
    function GridCreated(sender, eventArgs) {
        //gets the main table scrollArea HTLM element 
        var scrollArea = document.getElementById(sender.get_element().id + "_GridData");
        var row = sender.get_masterTableView().get_selectedItems()[0];
 
        //if the position of the selected row is below the viewable grid area 
        if (row) {
            if ((row.get_element().offsetTop - scrollArea.scrollTop) + row.get_element().offsetHeight + 20 > scrollArea.offsetHeight) {
                //scroll down to selected row 
                scrollArea.scrollTop = scrollArea.scrollTop + ((row.get_element().offsetTop - scrollArea.scrollTop) +
                row.get_element().offsetHeight - scrollArea.offsetHeight) + row.get_element().offsetHeight;
            }
            //if the position of the the selected row is above the viewable grid area 
            else if ((row.get_element().offsetTop - scrollArea.scrollTop) < 0) {
                //scroll the selected row to the top 
                scrollArea.scrollTop = row.get_element().offsetTop;
            }
        }
    }
</script>

 

I select the 50th row in the RadGrid1_OnItemDataBound event handler.

In the browser, in debug mode, it goes in the GridCreated function, and at the end scrollArea.scrollTop is set to 2440 ; but the scroll remains at the top of the grid...

What's wrong?

jc mag
Top achievements
Rank 1
 answered on 25 Mar 2016
1 answer
74 views

I have a user control form set for editing and adding records but the form data fields are off the form hard to explain so I have attached a screen shot.  Looks like I need to increase the width of the form but all of my attempts to that have no effect.  Can any one explain what I am missing?  Not sure what properties I need to change and I hate to do it but below is the code I use for this grid

<body>
    <div></div>
    <form id="form1" runat="server">
        <div>
        <asp:Label ID="Label1" runat="server" Text="Search Case Nunber: "></asp:Label>    <asp:TextBox ID="txtSearchBox" runat="server"></asp:TextBox> <asp:Button ID="Button1" runat="server" Text="Go" OnClick="Button1_Click" /><br /><br />
        </div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadGrid1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="ConfiguratorPanel">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Windows7"></telerik:RadAjaxLoadingPanel>
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecorationZoneID="Grid" DecoratedControls="All" EnableRoundedCorners="false"  />
 
    <div id="Grid" class="Grid-container">
        <telerik:RadGrid ID="RadGridInvestigations"
            runat="server"
            AutoGenerateColumns="False"
            AllowPaging="True"
            AllowSorting="True"
            AllowAutomaticInserts="True"
            OnNeedDataSource="RadGridInvestigation_NeedDataSource"
            OnItemCreated="RadGridInvestigation_ItemCreated"
            OnUpdateCommand="RadGridInvestigation_UpdateCommand"
            OnInsertCommand="RadGridInvestigation_InsertCommand"
            Font-Size="Large">
            <PagerStyle Mode="NextPrevNumericAndAdvanced" />
            <MasterTableView
                EditMode="PopUp"
                AutoGenerateColumns="false"
                DataKeyNames="CaseID"
                GridLines="Horizontal"
                CommandItemDisplay="Top" 
                NoMasterRecordsText="No Records matched your search return to the search page and try again." ShowFooter="False"
                <EditFormSettings>
                    <PopUpSettings Modal="False"/>
                </EditFormSettings>
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton"></telerik:GridEditCommandColumn>
                    <telerik:GridBoundColumn DataField="CaseID" HeaderText="Case ID" ReadOnly="true" ForceExtractValue="Always" ConvertEmptyStringToNull="true" Display="false" UniqueName="CaseID" />
                    <telerik:GridBoundColumn DataField="CaseNumber" HeaderText="CaseNumber" UniqueName="CaseNumber" ReadOnly="false" Display="false"/>
                    <telerik:GridHyperLinkColumn FilterControlAltText ="Filter CaseNumber column"
                           Uniquename="CaseNumber" DataNavigateUrlFormatString ="~/InvWithTips.aspx?CaseNumber={0}"
                            DataTextField="CaseNumber" HeaderText="Case Number"
                            DataNavigateUrlFields="CaseNumber"
                            SortExpression="CaseNumber" HeaderStyle-Wrap="false" >
                    </telerik:GridHyperLinkColumn>
                        <telerik:GridBoundColumn DataField="CaseName" HeaderText="Name" SortExpression="CaseName"
                            UniqueName="CaseName" Display="True">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="InvestigativeUnit" HeaderText="Unit Assigned" SortExpression="InvestigativeUnit"
                            UniqueName="InvestigativeUnit" HeaderStyle-Wrap="True">
                        </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="PrimaryContact" HeaderText="PrimaryContact" SortExpression="PrimaryContact"
                            UniqueName="PrimaryContact">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="PrimaryContactEmail" HeaderText="PrimaryContactEmail" SortExpression="PrimaryContactEmail"
                            UniqueName="PrimaryContactEmail">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="PrimaryContactPhone" HeaderText="Primary Phone" SortExpression="PrimaryContactPhone"
                            UniqueName="PrimaryContactPhone">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="SecondaryContact" HeaderText="2nd Contact" SortExpression="PrimaryContact"
                            UniqueName="SecondaryContact">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="SecondaryEmail" HeaderText="2nd Email" SortExpression="SecondaryEmail"
                            UniqueName="SecondaryEmail">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="SecondaryPhone" HeaderText="2nd Phone" SortExpression="SecondaryPhone"
                            UniqueName="SecondaryPhone">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="DateOpened" HeaderText="DateOpened" SortExpression="DateOpened"
                            UniqueName="DateOpened" DataFormatString="{0:dd/MM/yyyy}">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Status" HeaderText="Status" SortExpression="Status"
                            UniqueName="Status">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="DateClosed" HeaderText="DateClosed" SortExpression="DateClosed"
                            UniqueName="DateClosed" DataFormatString="{0:dd/MM/yyyy}">
                        </telerik:GridBoundColumn>
                    </Columns>
                <EditFormSettings UserControlName="InvestigationDetailsControl.ascx" EditFormType="WebUserControl" PopUpSettings-Width="400px">
                        <EditColumn UniqueName="EditCommandColumn1" ></EditColumn>
                     </EditFormSettings>
            </MasterTableView>
        </telerik:RadGrid>
    </div>
        <telerik:RadInputManager runat="server" ID="RadInputManager1" Enabled="true">
                <telerik:TextBoxSetting BehaviorID="TextBoxSetting1">
                </telerik:TextBoxSetting>
            </telerik:RadInputManager>
            <telerik:RadWindowManager ID="RadWindowManager1" runat="server" />
        </form>
 
</body>

Any help would be great

 

Thanks

Perry

Pavlina
Telerik team
 answered on 25 Mar 2016
4 answers
150 views

I have a hierarchy grid that has 6 detail tables.  All the data for the grid is bound in code behind.

I need to create custom insert, edit and delete templates for each of the detail tables.  The information I have found has the datasource client side.  I need information to create these server side.

 

Maria Ilieva
Telerik team
 answered on 25 Mar 2016
3 answers
260 views

Is it possible to use .NET themes with RadStyleSheetManager?

When I use a RadStyleSheetManager to combine my external stylesheets, it places the WebResource file AFTER the .NET themes stylesheet in the Head tag, with the result that the theme I'm trying to apply from the App_Themes folder is overridden by the base styles in the external stylesheets combined by the Telerik control. As in:

<head>

<link href="../App_Themes/Demo_Theme/Demo_Theme.css" type="text/css" rel="stylesheet">

<link href="/QReg/Telerik.Web.UI.WebResource.axd?d=PMrIT5dOWaVYIcpFWUE4nL08EMI2VcWAw0rknd-hZDTwvbi5j9SontBAefw4vSph5ju3TcQNZ2u3pCuQ6PYF0RLbspBmxlwTBIWwYaZtNs3fJnQ30&amp;t=635918753441826527&amp;compress=1&amp;_TSM_CombinedScripts_=%3b%3b%7c635941629785528787%3ab27e5558%3a59f3f810%3a95dff68a%3a74ee2317%3a6cdcd2e9%3a6581de0b%3a88af4fc4" type="text/css" rel="stylesheet">

</head>

Is there a way to get the StyleSheetManager to place its webresource file before the .NET themes file?

Thanks

Veselin Tsvetanov
Telerik team
 answered on 25 Mar 2016
1 answer
149 views

Hello,

My special scenario is as follows:

A topMenu with sublinks and a boxmenu with this sublinks on the page. I don't want to show the sublinks as expanded dropdown in the topMenu. The user should only one click on the top menu to reach the subpage, where the boxMenu will be visible. The links on the box menu should be "connected" with the topMenu to let the topLink as marked.

So my idea, let the topMenu expanding disabled. I have created two sitemapProviders web.sitemapTop and web.siteMapBox with the related structure.

With "expanding" the top-menu, all works fine. But I want to avoid expanding the TopMenu because of design-reasons (surely a bit user unfriendly...).

When I delete the submenuItems from the TopSiteMap, the boxLinks don't let the TopMenuLink as marked...

How can I disable the expand functionality of a radmenu (asp.net)?

Thanks in advance.

 

regards,

lux

Ivan Danchev
Telerik team
 answered on 25 Mar 2016
5 answers
259 views
Hi Team

I am trying to load RadPageView Dyamically inside the RadTab but unable to do so.

Ex: I have a treeview and RadTab on the screen. My requirement is if user selects the value in treeeview ex: Exmployee, then I need to dispaly Employee.aspx in RadTab. Similarly if user selects Department then display Department in RadTab.

Below is my code:

<telerik:RadTab
    runat="server"
    Value="ADM110_DepotAdminManage_Tab"
    Text="Depot"
     PageViewID="RadPageView_ADM110_DepotAdminManage" />
 
                  <telerik:RadPageView
                    ID="RadPageView_ADM110_DepotAdminManage"
                    runat="server"
                    ContentUrl="ADM110_DepotAdminManage.aspx"
                    Height="90%" >
            </telerik:RadPageView>
In the above code, I am unable to change the ContentUrl dynamically. Please let me know is any method to change contentUrl dynamically.

Thanks
Sharan
Ivan Danchev
Telerik team
 answered on 25 Mar 2016
2 answers
274 views

Hi I have following structure of code

 

 
 Global.asax - conytains URL Routing as it is
 -------------------------------------------------------------------
 routes.MapPageRoute("Company",
                "/Health/Company/{ID}/{Name}",
                "~/Health/company/CompanyPro.aspx"
                );


Company.master contains tabstrip and iam creating the Dynamic url url1 url2 etc. Hoe can i assign this url to  tab strip url through javascript ?

-----------------------------------------------------
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
        <script type="text/javascript">
...........
var url1 = String.format('/Health/Company/{0}/{1}/{2}', clientid, name);
var url2 =  --- Some URL ---

</script>

please help
           
</telerik:RadScriptBlock>

 <telerik:RadTabStrip ID="radTabMain" runat="server" Width="100%" OnTabClick="radTabMain_TabClick">
            <Tabs>
                <telerik:RadTab Text="Home" runat="server" Url="">
                </telerik:RadTab>
                <telerik:RadTab Text="AboutUs" runat="server" Url="">
                </telerik:RadTab>
                <telerik:RadTab Text="Contact Us" runat="server" Url="">
                </telerik:RadTab>
                <telerik:RadTab Text="Feedback" runat="server" Url="">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>

Nencho
Telerik team
 answered on 25 Mar 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?