Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
135 views
Hi Telerik Team,


I'm trying to set the position of the RadSplitter in RadFileExplorer but no success with that.
I attached two images, the first image is the way it look's now and the second image is how I want it to be
please help me to achieve what I desire
Vessy
Telerik team
 answered on 28 Aug 2014
2 answers
334 views
Hi to all,

I'm trying to use the basic filtering of the grid but in my GridDateTimeColumn i'm getting this error when trying to filter the column:

The argument types 'Edm.DateTimeOffset' and 'Edm.String' are incompatible for this operation. Near greater than or equals expression, line 6, column 21.

Here is my code:

HTML

<%@ Page Title="Logs" Language="C#" MasterPageFile="~/Platform/Site.Platform.Master" AutoEventWireup="true" CodeBehind="LogsList.aspx.cs" Inherits="UI.LogsList" %>

<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeaderContent" runat="server">
</asp:Content>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <div style="height: 50px;">
        <asp:Label runat="server" ID="LabelPageTitle" CssClass="h3 GridTitle">Logs</asp:Label>
    </div>
    <div>
        <!-- Define the datasource -->
        <ef:EntityDataSource ID="EntityDataSourceLogs" runat="server" ContextTypeName="Common.EntityModels.PlatformDB" ConnectionString="name=PlatformDB"
            DefaultContainerName="PlatformDB"
            EnableUpdate="False" EnableDelete="False" EnableInsert="False"
            EntitySetName="Logs" OrderBy="it.CreatedDateTime desc" />
        <!-- Define the grid -->
        <telerik:RadGrid runat="server" ID="RadGridLogs" AllowPaging="True" AllowSorting="true" Height="578" DataSourceID="EntityDataSourceLogs">
            <GroupingSettings CaseSensitive="false"></GroupingSettings>
            <MasterTableView DataKeyNames="Id" AutoGenerateColumns="False" AllowPaging="true"
                AllowAutomaticInserts="false" ClientDataKeyNames="Id" AllowFilteringByColumn="true" >
                <Columns>
                    <telerik:GridBoundColumn DataField="Id" HeaderText="Id" SortExpression="Id" UniqueName="Id" Visible="false" MaxLength="100">
                    </telerik:GridBoundColumn>
                    <telerik:GridDateTimeColumn DataField="CreatedDateTime" HeaderText="Date" SortExpression="CreatedDateTime" Visible="true" MaxLength="50" ItemStyle-Width="50" FilterControlWidth="150px" PickerType="DatePicker" DataFormatString="{0:d}" AutoPostBackOnFilter="true" CurrentFilterFunction="GreaterThanOrEqualTo" ShowFilterIcon="false" EnableTimeIndependentFiltering="true">
                    </telerik:GridDateTimeColumn>

                    <telerik:GridBoundColumn DataField="Description" HeaderText="Description" SortExpression="Description" UniqueName="Description" Visible="true" MaxLength="100" ItemStyle-Width="100" FilterControlWidth="300px" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" >
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Server" HeaderText="Server" SortExpression="Server" UniqueName="Server" Visible="true" MaxLength="50" ItemStyle-Width="50" FilterControlWidth="150px" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" >
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Application" HeaderText="Application" SortExpression="Application" UniqueName="Application" Visible="true" MaxLength="50" ItemStyle-Width="50" FilterControlWidth="150px" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" >
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Module" HeaderText="Module" SortExpression="Module" UniqueName="Module" Visible="true" MaxLength="50" ItemStyle-Width="50" FilterControlWidth="150px" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" >
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Function" HeaderText="Function" SortExpression="Function" UniqueName="Function" Visible="true" MaxLength="50" ItemStyle-Width="50" FilterControlWidth="150px" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" >
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings EnableRowHoverStyle="true">
                <Selecting AllowRowSelect="False"></Selecting>
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            </ClientSettings>
            <PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric" Position="Bottom" PageSizeControlType="RadComboBox"></PagerStyle>
        </telerik:RadGrid>
    </div>
</asp:Content>

C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace UI
{
    public partial class LogsList : DetailBasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}


The entity value of the field is:

namespace Common.EntityModels
{
    using System;
    using System.Collections.Generic;
    
    public partial class Log
    {
        public long Id { get; set; }
        public System.DateTimeOffset CreatedDateTime { get; set; }
        public short Type { get; set; }
        public string Description { get; set; }
        public string Server { get; set; }
        public string Application { get; set; }
        public string Module { get; set; }
        public string Function { get; set; }
        public Nullable<int> TenantId { get; set; }
        public Nullable<int> UserId { get; set; }
        public string SessionId { get; set; }
    }
}


And in SQL is:

[CreatedDateTime]   DATETIMEOFFSET (7)  NOT NULL

Can you tell me what i'm doing wrong??

Thanks.




Marco
Top achievements
Rank 2
 answered on 28 Aug 2014
12 answers
467 views
I am currently working on a web app that involves choosing multiple ranges of hours per day of the week.  Using the scheduler control would be way overboard with what I am trying to accomplish.  I was wondering, before I commit to using this as a solution, if the slider control has functionality for multiple ranges or if I would easily be able to modify it in order to do this?  Thanks.
Slav
Telerik team
 answered on 28 Aug 2014
3 answers
205 views
Hi,

I m using telerik rad grid control to populate the data's in parent and child tables structure. Both parent and child tables are dynamically popluated with different number of columns based on the input selection. The parent table is populating the values in all the times even number of output columns changed. But, the child tables are loaded correctly for the first timeonly. After that, we change the input field values and output for child table changed from the first time loading records, the child tables values are not refreshed. It shows the old records only. Thanks in advance.

Senthilraja. 
Eyup
Telerik team
 answered on 28 Aug 2014
2 answers
225 views
Hello,

I have created a webform (ASP.NET C#) named "SendEmails.aspx".

This webform has RadGrid named 'RadGrid1' and a button inside the Record Edit-Template area of RadGrid1 which, when clicked, sends out an email message to the email address typed in to the text box named 'txtEmail' which is also inside the template area of RadGrid1.

The email message's body text comes from the message typed in to the Telerik RAD editor named 'RadEditor1' placed inside the Edit-Template area of RadGrid1.

The email message's subject comes from the text typed into the text box named 'txtEmailSubject' which is also placed on the Edit-Template area of RadGrid1.

The code I'm using to send out the email when the button is clicked is shown below.

protected void Send_Confirmation_Email(object sender, EventArgs e)
        {
            MailMessage myMessage = new MailMessage();
 
 
            //The 4 lines of code shown below is for receiving the content stored in the RADEditor control 'RadEditor1'.
            //and stores in the string variable named 'content'.
            Button GetContent = (Button)sender;
            GridEditFormItem item = (GridEditFormItem)GetContent.NamingContainer;
            RadEditor radEditor = ((RadEditor)item.FindControl("RadEditor1"));
            string content = radEditor.Content;
 
 
            TextBox txtEmail = item.FindControl("txtEmail") as TextBox;
            TextBox txtFirstname = item.FindControl("txtFirstname") as TextBox;
            TextBox txtSurname = item.FindControl("txtSurname") as TextBox;
            TextBox txtEmailSubject = item.FindControl("txtEmailSubject") as TextBox;
 
            string EmailAddress = txtEmail.Text;
            string ToName = txtFirstname.Text + " " + txtSurname.Text;
            string EmailSubject = txtEmailSubject.Text;
 
            myMessage.Body = content;
            myMessage.From = new MailAddress("admin@mydomainname.com", "Support");
            myMessage.To.Add(new MailAddress(EmailAddress, ToName));
            myMessage.Subject = EmailSubject;
            //myMessage.Subject = "New email message subject";
            SmtpClient mySmtpClient = new SmtpClient();
            myMessage.IsBodyHtml = true;
            mySmtpClient.UseDefaultCredentials = true;
            mySmtpClient.Send(myMessage);
 
 
        }

When the button is clicked, the email message is sent out OK.

But, the strange thing is, the email message's subject line always shows the subject text that I have been using 3 days ago ("Confirmation Letter") and it doesn't show/use the text typed in to the 'txtEmailSubject' by the user where this email message should get it's subject line from. No matter whatever text I typed into the 'txtEmailSubject' text box, the email message always uses the text "Confirmation letter" as the subject of the email message. Even if I hard type the subject as "New email message subject" into the code shown above, the change isn't reflected.

Moreover, again, strangely, the email message's SENDER isn't admin@mydomainname.com that I have typed in to the code shown above, but the email message shows the sender is info@mydomainname.com that I have been using 3 days ago.How can this happen?Is this caused by ASP.NET or IIS caching? I have tried changing the SMTP server, deleting all caches for IE, Firefox, Chrome but didn't solve the problem at all.

But. the email message's body text shows the correct message typed into the Telerik Rad editor.

Please explain how to solve this problem.

Thank you.



ILJIMAE
Top achievements
Rank 1
 answered on 28 Aug 2014
5 answers
188 views
Hi,

How to open the drop down when mouse hovered as well as close it on mouse out?

Thank you,
Freddy.
Nencho
Telerik team
 answered on 28 Aug 2014
2 answers
166 views
Display confirm window when click on pagination button, means grid should display the pages according to confirm window result. for example we are in 1st page of grid if i click next button it has to show confirm window if press OK button it should move to next page otherwise it should stay on the current page only. 
suresh
Top achievements
Rank 1
 answered on 28 Aug 2014
1 answer
217 views
I have created a radgrid where the items are populated via a datatable. Whilst in edit mode i have created a dropdownlist of which is populated during the radgrid itemdatabound event.The dropdownlists on selectedindexchanged then populates textboxes according to what is selected, but my problem at the moment is that when the dropdown autopostbacks nothing happens as the dropdown is being repopulated again during postback. It isn't even getting to the SelectedIndexChanged fucntion.
How can I stop this from happening. hope this makes sense! here is some of the code being used. 

Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles radgrid.ItemDataBound
        If TypeOf e.Item Is GridEditFormItem AndAlso e.Item.IsInEditMode Then
            Dim item As GridEditFormItem = DirectCast(e.Item, GridEditFormItem)
            Dim ddl As DropDownList = DirectCast(item.FindControl("dropdown"), DropDownList)
            'Populate the dropdownlist 
            createDropDown(ddl)
        End If
    End Sub

Protected Sub ddl_OnSelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
        Dim ddl As DropDownList = DirectCast(sender, DropDownList)
        Dim item As GridEditableItem = DirectCast(ddl.NamingContainer, GridEditableItem)
        DimID As Integer = ddl.SelectedValue

        ''locate relevant textboxes
        Dim txtBox As TextBox = DirectCast(item.FindControl("txtBox"), TextBox)
      
        'Assign the data to relevant boxes
        Dim dt As DataTable = riskAssessment_BLL.getGenericData(ID)
        If dt.Rows.Count <> 0 Then
            For Each statement As DataRow In dt.Rows
                txtbox.Text = statement.Item("data").ToString()
            Next
        End If
        dt.Dispose()
    End Sub
 




K W
Top achievements
Rank 1
 answered on 28 Aug 2014
2 answers
47 views
Hi,

I am using RAD controls for ASP.NET Ajax Q3 2010 extensively in a web site and now i have a request to modify this web site to cater for mobile(smart phones).Mostly i would have to cater for selective Tabs/Phones.

I tried by putting viewport meta tag but the web pages are not responsive.
Following are some of the RAD controls used in web site

RadTabStrip
RadGrid
RadMultiPage
RadPageView

I would like to know what is the best way to redesign the existing telerik based web site to serve on mobile as well.

Thanks
Kishor.
karnam
Top achievements
Rank 1
 answered on 28 Aug 2014
1 answer
272 views
Hello,

I am working on a project with a RadGrid inside a RadMenu.

The RadGrid has the following settings:

AllowDragToGroup="True"
ShowGroupPanel="True"

When I drag a column to the Group panel, I cannot see the column while I drag it.
Only when I drag a column to the Group panel outside the RadGrid’s boundaries I can
see it. [see video]. 

How do I solve this?

Thank you,
Daniel.
Shinu
Top achievements
Rank 2
 answered on 28 Aug 2014
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?