Telerik Forums
UI for ASP.NET AJAX Forum
33 answers
767 views
Hello,

We need to style RadInput (RadTextBox) with rounded corners. The ideal solution of course would be to use FormDecorator, but at this point it does not apply to RadInput. After searching through support forums I found following workaround:

http://www.telerik.com/community/forums/aspnet-ajax/form-decorator/raddatepicker-rounded-corners.aspx

Which basically requires to add following code to each and every RadTextBox present on the page:

<script runat="server">  
  
    protected void Page_PreRenderComplete(object sender, EventArgs e)  
    {  
        if (Request.Browser.IsBrowser("IE"))  
        { 
            RadTextBox1.EnabledStyle.CssClass = String.Empty; 
            RadTextBox1.HoveredStyle.CssClass = String.Empty; 
            RadTextBox1.FocusedStyle.CssClass = String.Empty; 
            RadTextBox1.InvalidStyle.CssClass = String.Empty;  
        }  
        else  
        { 
            RadTextBox1.EnabledStyle.CssClass = "rfdInput rfdRoundedCorners"
            RadTextBox1.HoveredStyle.CssClass = "rfdInput rfdRoundedCorners"
            RadTextBox1.FocusedStyle.CssClass = "rfdInput rfdRoundedCorners"
            RadTextBox1.InvalidStyle.CssClass = "rfdInput rfdRoundedCorners";  
        }  
    } 
     
</script>  

The good thing - it works, not so good - you can imagine what needs to be done if there are multiple RadTextBoxes on multiple pages. Which brings me to my question - is there a better way of handling this? Can this be done by modifying CSS for the Skin that we're using without actually adding any code?

Thank you,
Andrei



Ivan Zhekov
Telerik team
 answered on 25 Oct 2013
0 answers
53 views
Hi 
I m using the rad scheduler with mvc
I m  facing the issue that my Get Appointment method is calling multiple times.
Gaurav
Top achievements
Rank 1
 asked on 25 Oct 2013
2 answers
933 views
Hi,

Is there a way to use the dataformatstring on a gridboundcolumn to display negative numbers in red?

DataType="System.Int16" DataFormatString="{0:#,###,##0;-#,###,##0}"



Thank You
Tracy
Tracy
Top achievements
Rank 1
 answered on 25 Oct 2013
5 answers
242 views
Hello,

I have an application with several pages that contain RadComboBoxes.  When I select an option in the first RadComboBox it triggers the other RadComboBoxes to load options based on that selection.  Or rather, it used to do this.  This application has been working this way for years after having been developed in Visual Studio 2008 targeting the 3.5 .NET framework.  Recently, I tried upgrading this application to the 4.0 .NET framework so I could develop in Visual Studio 2010.  Now the RadComboBoxes will not be updated properly when the 1st one's selected option is changed.

Here is the first combobox:
<telerik:radcombobox id="ebaCountry" runat="server" DataTextField="Text" DataValueField="Value" MarkFirstMatch="True" AllowCustomText="False" OnClientSelectedIndexChanging="LoadCountryDependentCombos" OnItemsRequested="ebaCountry_ItemsRequested" OnClientSelectedIndexChanged="EbaChangeCountry" OnClientBlur="EbaChangeCountry" OnClientLoad="SetCountryClientId"></telerik:radcombobox>

The important attribute here is OnClientSelectedIndexChanging.  It triggers javascript code that should cause other RadComboBoxes to be populated with data.  The javascript looks like this:
var item = eventArqs.get_item();
ebaParticipant.set_text(" Loading...");
ebaParticipant.requestItems(item.get_value(), false);

Here is what the second combobox looks like:
<telerik:RadComboBox runat="server" ID="ebaParticipant" MarkFirstMatch="true" DataSourceID="objdsParticipant" OnClientItemsRequested="ItemsLoaded" AllowCustomText="False" OnClientSelectedIndexChanged="EbaChangeParticipant" OnClientBlur="EbaChangeParticipant" OnItemDataBound="ebaParticipant_ItemDataBound" OnClientLoad="SetParticipantClientId" OnItemsRequested="ebaParticipant_ItemsRequested">
                        <ItemTemplate>
                            <ul>
                                <li style="float: left; width: 110px; margin: 0; padding: 0 5px 0 0; line-height: 14px">
                                    <%# DataBinder.Eval(Container.DataItem, "PersonName") %></li>
                                <li style="float: left; width: 110px; margin: 0; padding: 0 5px 0 0; line-height: 14px">
                                    <%# DataBinder.Eval(Container.DataItem, "MinistryName") %></li>
                            </ul>
                        </ItemTemplate>
</telerik:RadComboBox>

The function in the code-behind, ebaParticipant_ItemsRequested, triggered by the OnItemsRequested event sets up a couple of parameters for ObjectDataSource used by the RadComboBox then calls "ebaParticipant.DataBind()" to fill this second combobox with data based on the selected option in the first combobox. 

While debugging in VS2010 I can step through the code and see that the SelectMethod defined for the ObjectDataSource is being called and I can see the data returned from its database query.  The correct data is being returned.  And here is where something breaks down.  For some reason the second combobox on the web page is no longer being filled with the returned data.  Can anyone suggest a way to debug this step in the process?  Any ideas what's going wrong?  Does it have something to do with the change from .NET 3.5 to 4.0?  I'm using version 2011.1.519.35 of Telerik.Web.UI.dll.

-- Tom 
 
Hristo Valyavicharski
Telerik team
 answered on 25 Oct 2013
4 answers
1.2K+ views
Hi All,
If HTML tags (eg: <<test>>) are entered in the textboxes, throws exception.
This is a problem in asp.net textbox as well. To fix this problem there are two solutions I know:
1) turn of the ValidationRequest.
2) Write a javascript to encrypt/decrypt or replace the tags with &lt; and &gt;
I would like to know if anyone has a better suggestion to resolve this issue.
As turning off validationRequestion opens it for cross-site scripting attacks.
If I try the second option, when the page is rendered and displayed, it shows as &lt; for fraction of seconds and then changes to <. This looks odd to the users. The problem exists both in VS2008/.net3.5 and VS2010/.net4.0
Any suggestions would be highly appreciated.
Thanks,
Richa
Vasil
Telerik team
 answered on 25 Oct 2013
2 answers
151 views
Hi all,

I have created a RadScheduler that uses a TimelineView. I have an issue with the height of the rows. Ideally the height of the rows would match the appointments' height, but it seems it has some other height defined which is much higher than the appointment (see screenshot). When I change the RowHeight property I change the height of the appointment, but not of the entire row. I guess it is somehow related to the grouping.
I feel I've tried changing all height properties I can find, but no success.

How can I make each row be only as high as the appointment (all appointments have a fixed height, so if I can hardcode the rows to be 25px thats fine)?

My markup is shown below:

<div style="clear:both;">
<telerik:RadScheduler runat="server"
    ID="Scheduler"
    DataStartField="Start"
    DataEndField="End"
    DataSubjectField="CustomText"
    DataKeyField="Id"
     
    ShowResourceHeaders="True"
    AllowDelete="False"
    AllowEdit="False"
    AllowInsert="False"
    SelectedView="TimelineView"
    GroupingDirection="Vertical"
    DayStartTime="08:00:00"
    DayEndTime="19:00:00"
    TimeZoneOffset="02:00:00"
    OverflowBehavior="Expand"
    ReadOnly="True"
    RowHeight="25"
    FirstDayOfWeek="Monday"
    LastDayOfWeek="Sunday"
    AppointmentStyleMode="Simple"
    NumberOfHoveredRows="0"
 
    OnAppointmentDataBound="AppointmentDatabound"
    OnResourceHeaderCreated="ResourceCreated"
     
>
    <TimelineView
        GroupingDirection="Vertical"
        SlotDuration="7.00:00:00"
        NumberOfSlots="12"
        ColumnHeaderDateFormat="dd/MM"
        UserSelectable="False" >
    </TimelineView>
    <MonthView UserSelectable="False" />
    <DayView UserSelectable="False" />
    <WeekView UserSelectable="False" />
    <AppointmentTemplate>
        <div >
            <label style="color:black; font-size:7pt; display:block; text-align: center;"><%# Eval("Subject") %></label>
        </div>
    </AppointmentTemplate>
</telerik:RadScheduler>
Michael
Top achievements
Rank 1
 answered on 25 Oct 2013
4 answers
136 views
How do I determine (client-side) if a tile is being moved to a different group?
zAxis
Top achievements
Rank 1
 answered on 25 Oct 2013
4 answers
402 views
Hi,

Iam having a rad grid, when i press tab on rad grid, the first header gets focussed and then it goes till last header, after that it goes to paging links(1,2,3,4) and then to inner content of grid. where as i need the following sequence

1.Headers
2. Inner content
3. pagination links

So as per screenshot it should go from from start date->Inner checkbox->Pagination Links

Kindly suggest me what needs to be done in this regard.
Venelin
Telerik team
 answered on 25 Oct 2013
2 answers
361 views
Hello All, 
          Is there a way to merge these two columns? This is what I have right now   (please look at the current file). This is how I created these two columns from code-behind
GridEditCommandColumn EditColumn = new GridEditCommandColumn();
 this.RadGrid1.MasterTableView.Columns.Add(EditColumn);
 EditColumn.ButtonType = GridButtonColumnType.ImageButton;
 EditColumn.UniqueName = "EditCommandColumn";
 EditColumn.HeaderText = "SingleAction";
 EditColumn.ColumnGroupName = "test";
                          
 GridButtonColumn DeleteColumn = new GridButtonColumn();
 this.RadGrid1.MasterTableView.Columns.Add(DeleteColumn);
 DeleteColumn.CommandName = "Delete";
 DeleteColumn.ButtonType = GridButtonColumnType.ImageButton;
 DeleteColumn.UniqueName = "DeleteCommandColumn";
 DeleteColumn.ConfirmDialogType = GridConfirmDialogType.Classic;
 DeleteColumn.HeaderText = "SingleAction";
 DeleteColumn.ConfirmText = "Do you really want to delete?";
 I want to achieve something like this (please look at desired file). I have tried to do the GridCalculatedColumn. And the code for that is
GridCalculatedColumn calcol = new GridCalculatedColumn();   
 calcol.DataFields =new string[]{"EditCommandColumn","DeleteCommandColumn"};   
 calcol.Expression ="{0}-{1}";  
 tableViewProjects.Columns.Add(calcol);                          
I get an error column [EditCommandColumn] does not exist, which I think makes sense, because it not a data field from the database.
 So, is there a way to achieve this. Please help

Thank you in advance 

Smart
Top achievements
Rank 1
 answered on 25 Oct 2013
9 answers
381 views
Hello, I understand that there's not built-in printing capability in the current RadScheduler.  We have a method that kind of does the job, but I'd like to add the print button to the Header Bar, perhaps next to the view buttons.  Is there an elegant way I can do this?
Kate
Telerik team
 answered on 25 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?