Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
90 views
Hello,
  I want to bind data with RadTileList and set paging to radtilelist. i have searched on google but no luck pl help me how to bind and pagination with RadTileList control its very urgent
Marin Bratanov
Telerik team
 answered on 10 Apr 2014
8 answers
307 views
I have dfdfdf
I have a user that demands we cannot continue with the project because the textbox height increases after selecting and account.  I have attached an image to show that they are seeing.  Can someone let me know how I can prevent the textbox height from changing?
  
Thank you!
  
Here is my code
<telerik:RadAutoCompleteBox ID="RadAutoCompleteBoxESI" 
EmptyMessage="Please type ESI Number here"  
InputType="Text"  
DropDownWidth="200" 
Width="200"  
runat="server" >
 <TextSettings SelectionMode="Single" />
</telerik:RadAutoCompleteBox>
Vignesh
Top achievements
Rank 1
 answered on 10 Apr 2014
2 answers
176 views
Hello Community!

I am trying to find a solution to dynamically create TabStrip with MultiPage and Pageviews with UserControls from a SQL database.

Here is what I have thus far.
SQL Table: ID, ParentID, TabName, URL, Position, NavBar, Page, and Active columns.
I store the path to the webpage and UserControls in the URL column.
The rest of the columns are for sorting and visibility per user/page/etc.

Here is my HeaderControl.ascx code.
<telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" SelectedIndex="0" CausesValidation="False" Skin="Black" Width="100%"></telerik:RadTabStrip>
 
<telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0"></telerik:RadMultiPage>

Here is my codeBehind.
public int _Page;
 
protected void Page_Load(object sender, EventArgs e)
{
    int _FID = Convert.ToInt32(Session["_FID"]);
    int _AID = Convert.ToInt32(Session["_AID"]);
 
    IMasterPage masterPage = Page.Master as IMasterPage;
    if (masterPage.bodyID == "DB")
    {
        _Page = 1;
        Page.Title = string.Format("Virtual Law Desk :: Dashboard");
    }
    else if (masterPage.bodyID == "CM")
    {
        _Page = 2;
        Page.Title = string.Format("Virtual Law Desk :: Client Management");
    }
 
 
    StandardClass SC = new StandardClass();
    {
        if (!SC.IsError)
        {
            SC.ReturnLawfirmUser(_FID, _AID);
            {
                fnLbl.Text = SC.FirstName;
                lnLbl.Text = SC.LastName;
            }
        }
    }
 
    NavigationClass NC = new NavigationClass();
    {
        if (!NC.IsError)
        {
 
            RadMenu1.DataSource = NC.ReturnTabNavigation();
            RadMenu1.DataTextField = "tabname";
            RadMenu1.DataNavigateUrlField = "url";
            RadMenu1.DataValueField = "pid";
            RadMenu1.DataFieldID = "id";
            RadMenu1.DataBind();
 
            RadTabStrip1.DataSource = NC.ReturnSubTabNavigation(_Page);
            RadTabStrip1.DataTextField = "tabname";
            //RadTabStrip1.DataNavigateUrlField = "url";
            RadTabStrip1.DataValueField = "pid";
            RadTabStrip1.DataFieldID = "id";
            RadTabStrip1.SelectedIndex = -1;
            RadTabStrip1.DataBind();
 
            RadPageView pageView = new RadPageView();
            pageView.ID = "pid";
            RadMultiPage MultiPage1 = RadMultiPage1;
            MultiPage1.PageViews.Add(pageView);
 
            NC.ReturnUserControls(_Page);
            {
                Control userControl = Page.LoadControl(NC.URL);
                pageView.Controls.Add(userControl);
            }
        }
    }
}

All classes are derived from a class.dll file I have created. Everything work perfectly except the UserControls for each of the PageViews. Each Main Navigation when clicked on will produce Sub Navigation Tabs which works fine. The PageViews are created as well but each of those PageViews will have a different UserControl. These UserControls paths are read from the URL column in SQL. BAsed on the NC.ReturnUserControls Class how can I make this work? Am I missing an iteration or something like it?

Thanks for any replies!




ADAPT
Top achievements
Rank 2
 answered on 10 Apr 2014
1 answer
97 views
How would you go about trying to group a certain range of years within a custom column group interval?

Wanted:
1992-2009 | 2010 | 2011 | 2012 | 2013 | 2014

Caveat: the 1992-2009 range is from the oldest date in the dataset to the oldest date with a stop at 5 years from the current year. So in 2015 the group would be 1997-2010

Current (not working) code below produces what I find unexpected:
1992-2009 | 1993 - 2009 | 1994 - 2009 etc etc

Any advice is greatly appreciated

public class OldYearGroup : IComparable, IComparable<OldYearGroup>, IEquatable<OldYearGroup>
{
    public OldYearGroup()
    {
 
    }
 
    internal OldYearGroup(int year)
    {
        this.year = year;
    }
 
    public int year
    {
        get;
        set;
    }
 
    public override string ToString()
    {
        if (year > DateTime.Now.AddYears(-5).Year)
            return string.Format(CultureInfo.InvariantCulture.NumberFormat, "{0}", this.year);
 
        return string.Format(CultureInfo.InvariantCulture.NumberFormat, "{0}-{1}", this.year, DateTime.Now.AddYears(-5).Year);
    }
 
    public override int GetHashCode()
    {
        return this.year * 7933;
    }
 
    public override bool Equals(object obj)
    {
        return this.Equals(obj as OldYearGroup);
    }
 
    public int CompareTo(object obj)
    {
        if (obj is OldYearGroup)
        {
            return this.CompareTo(obj as OldYearGroup);
        }
 
        throw new ArgumentException("Can not compare.", "obj");
    }
 
    public int CompareTo(OldYearGroup other)
    {
        if (other == null)
        {
            throw new ArgumentNullException("other");
        }
        return this.year.CompareTo(other.year);
    }
 
    public bool Equals(OldYearGroup other)
    {
        return other != null && this.year < DateTime.Now.AddYears(-5).Year;
    }
}


public class DefaultDateTimeGroupingDescription : PropertyGroupDescriptionBase
{
    public int Year { get; set; }
    public DefaultDateTimeGroupingDescription()
    {
 
    }
 
    protected override object GroupNameFromItem(object item, int level)
    {
 
        var baseValue = base.GroupNameFromItem(item, level);
         
        DateTime? year = ((DateTime?)baseValue);
        if (!year.HasValue)
            return null;
        return new OldYearGroup(year.Value.Year);
         
    }
 
    protected override void CloneOverride(Cloneable source)
    {
        var castedSource = source as DefaultDateTimeGroupingDescription;
        if (castedSource == null)
            return;
        if (castedSource.Year < this.Year)
            this.Year = castedSource.Year;
    }
 
    protected override Cloneable CreateInstanceCore()
    {
        return new DefaultDateTimeGroupingDescription();
    }
}

public class DefaultDateTimeGroupingField : PivotGridColumnField
{
    private GroupDescription _groupDescription;
 
    public override GroupDescription GroupDescription
    {
        get
        {
            if (_groupDescription== null)
            {
                _groupDescription = new DefaultDateTimeGroupingDescription();
            }
            return _groupDescription;
        }
        set
        {
            base.GroupDescription = value;
        }
    }
}
Marin
Telerik team
 answered on 10 Apr 2014
1 answer
57 views
I am using rad grid with webapi data source
the problem when i add a image column the image still empty
this is my grid
<telerik:RadGrid runat="server" ID="grdUsers" AllowPaging="true" AllowSorting="true"
                                    AllowFilteringByColumn="true" PageSize="5">
                                    <MasterTableView AutoGenerateColumns="False" DataKeyNames="Id" ClientDataKeyNames="Id,PasswordHash">
                                        <PagerStyle Mode="NumericPages" AlwaysVisible="true" />
                                        <Columns>
                                              <telerik:GridImageColumn DataType="System.String" DataImageUrlFields="Image" AlternateText="User image" 
                                                   UniqueName="Image"
                                                    ImageAlign="Middle" ImageHeight="50px" ImageWidth="50px" AllowFiltering="false" HeaderText="">
                                                </telerik:GridImageColumn>
                                            <telerik:GridBoundColumn  DataField="UserName" HeaderText="User Name"   UniqueName="UserName"
                                                  DataType="System.String">
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn  DataField="FullName" HeaderText="Name" UniqueName="FullName"  
                                                  DataType="System.String">
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn  DataField="Email" HeaderText="Email"  UniqueName="Email"
                                                  DataType="System.String">
                                            </telerik:GridBoundColumn>
                                             <telerik:GridBoundColumn DataField="RegistrationDate" HeaderText="Registration Date" UniqueName="RegistrationDate"  
                                                    DataFormatString="{0:dd/MM/yyyy}">
                                               </telerik:GridBoundColumn>
                                            <telerik:GridButtonColumn UniqueName="btnEdit"  ButtonType="PushButton" Text="Edit" CommandName="Edit"></telerik:GridButtonColumn>
                                            <telerik:GridButtonColumn UniqueName="btnDelete" ButtonCssClass="del" ButtonType="PushButton" Text="Delete" CommandName="Delete"></telerik:GridButtonColumn>
                                        </Columns>
                                    </MasterTableView>
                                    <ClientSettings>
                                        <Selecting AllowRowSelect="True" />
                                        <ClientEvents OnCommand="RadGridCommand" />
                                        <DataBinding Location="/SecuHostapi/Security/User/GetAll"  ResponseType="JSON">
                                            <DataService TableName="SecuHostUser" Type="OData" />
                                        </DataBinding>
                                    </ClientSettings>
                                </telerik:RadGrid>

and the result like the attachment
Radoslav
Telerik team
 answered on 10 Apr 2014
5 answers
543 views
Hi,

I have a required field validator and a custom validator tied to an asp:textbox within a RadGrid.  The required field validator fires and displays my error message when the textbox is empty.  The custom validator fires its OnServerValidate call, my code checks the text length and sets the args.IsValid = false if the text is too large.

But the Update continues to proceed and tries to update the database with some text that is too large for the database field.
The custom validator error message never displays.

What am I missing?

 

<EditItemTemplate>

 

 

 

    <asp:TextBox ID="txbDescription" Style="width: 390px; margin-left: 4px;" runat="server"

 

 

        TextMode="MultiLine" Rows="3" Text='<%# Bind("Description") %>' MaxLength="1000" Wrap="true" />

 

 

 

    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txbDescription"

 

 

        ErrorMessage="A Document description is required" Enabled="true" runat="server">

 

 

    </asp:RequiredFieldValidator>

 

 

    <asp:CustomValidator ID="val_txbDescription" Enabled="true" runat="server"

 

 

        ErrorMessage="Description is too large. Please limit text to 1000 characters."

 

 

        OnServerValidate="val_txbDescription_ServerValidate" Display="Dynamic" ControlToValidate="txbDescription">

 

 

    </asp:CustomValidator>

 

 

 

</EditItemTemplate>

 

 

 

 

protected

 

void val_txbDescription_ServerValidate(object source, ServerValidateEventArgs args)

 

{

args.IsValid =

true;

 

 

if (args.Value.Length > 1000) args.IsValid = false;

 

}

 
Princy
Top achievements
Rank 2
 answered on 10 Apr 2014
1 answer
134 views
Hello

 need to create a web page to capture and maintain payment details. The user will have say 3 options of how to pay (Credit Card, Direct Debit, Invoice). user can only select 1 option. if user selects credit card, need to show more text boxes to allow credit card number and expire date etc. 

I was thinking that a Dock would work well, but might be good to have an option tick box in the heading and I guess some code to ensure only 1 option is selected, but just wondered if telerik has a solution which wouldn't involve lots of code?

thanks

graham
Shinu
Top achievements
Rank 2
 answered on 10 Apr 2014
1 answer
251 views
Hello.

I'm currently working on a project that includes RadGrid
I'm trying to export to PDF, to Languages that the Direction of their writing is from right to left.
Unfortunately, the order of the letters comes out backwards.

When I export to Office files I do not have this problem, only when I try to export to PDF it's creates this problem. 

I would love to have a solution


Thank

Daniel
Princy
Top achievements
Rank 2
 answered on 10 Apr 2014
1 answer
158 views
Hello,

I found a couple posts about syncing the scheduler with Outlook. I have a couple questions.

Does this only work with exchange server? What if I have a user name, password and the server name that use in Outlook instead of a URL for the exchange server?

I need to show the appointments I have in Outlook along with the tasks.

And last, I want to update the tasks as completed and then sync it back with Outlook so the changes are updated there also.

Can all of this be done?

Thanks,

Warren
Plamen
Telerik team
 answered on 10 Apr 2014
1 answer
181 views
Hi there,
I am using the Scheduler for Ajax.

I am trying to set the background-color for appointments via css.
The intention is that the appointment is populated from a DataView which may contain the field Style. If present then the style will be added to the cssStyle for the appointment. This will then be converted to a color via css. I don't want to have to set the background-color within the code behind, since different colors may be needed depending on what view is used, and I want this to be configurable without changing source code.

I know that I can get rid of the default background using 
.RadScheduler .rsAptContent,   
    .RadScheduler .rsAptIn,   
    .RadScheduler .rsAptMid,   
    .RadScheduler .rsAptOut   
    {          
        background-image: none !important;  
        background-color : transparent !important;
    }  

but I would prefer to not have to fight against the WebResource.axd
Is there any way to do this?
I am currently using the 2013 Q3 release.

regards

Roger



Magdalena
Telerik team
 answered on 10 Apr 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?