Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
210 views
I use RadControls for ASP.NET AJAX Q1 2010.

One of my aspx-pages contain two different usercontrols, which both
open up a radwindow after a postback/button-push.

What happens is that if I've opened one of the windows, and closed it,
it will REAPPEAR when I try to open the radwindow from the other
usercontrol.

So - open first radwindow (postback) => OK.
Open second radwindow (postback) => Both windows open.

The same thing happens when refreshing the browser - If I've
had, say, a dozen radwindows open, they will reappear one by one.

What is it that I've done wrong or forgotten?
Georgi Tunev
Telerik team
 answered on 23 Sep 2010
0 answers
169 views
Hai Telerik,

i have a Employee combo box, with in which i bind checkboxes dynamically with employee name as text . used Item Template to do this.
 
<telerik:RadComboBox ID="cmbEmployee" Height="150px" DropDownWidth="150px" DataTextField="employee_name"
                                                DataValueField="employee_name" runat="server" Skin="Office2007" Width="150px"
                                                TabIndex="8" HighlightTemplatedItems="True" meta:resourcekey="cmbTechnicianResource1">
                                                <HeaderTemplate>
                                                    <table style="font-family: Verdana; font-size: xx-small">
                                                        <tr>
                                                            <td>
                                                                Employee
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                   <div onclick="stopProp(event)">
                                                    <asp:CheckBox ID="chk" runat="server" onClick="onClick(event)" Text='<%#  
DataBinder.Eval(Container.DataItem, "employee_name") %>' meta:resourcekey="chkResource2" />
                                                   </div>                                                            
                                                             
                                                </ItemTemplate>
                                                <CollapseAnimation Duration="200" Type="OutQuint" />
                                            </telerik:RadComboBox>

i learned multi selecting check boxes with in combo box from the forum.
My combo box is having 'Select All' check box as a first item and other combo box items(list of employees) as check boxes. Now when i check 'Select All' check box, all employees (check boxes) should be checked. And when i uncheck 'Select All'  check box, all employees must be unchecked. Also after unchecking 'Select All', i should be able to check selected employees. Finally, text of all checked check boxes (except 'Select All') should be set as text to Employee combo box.

My java script is as below,

function StopProp(e) {
            e.cancelBubble = true;
                        if (e.stopPropagation) {
                            e.stopPropagation();
                        }
        }
 
function onClick(e) {
            
            var combo = $find("<%= cmbEmployee.ClientID %>");
            var newText = "";
            var items = combo.get_items();
 
            for (var i = 0; i < items.get_count(); i++) {
                var item = items.getItem(i);
                var checkbox = item.get_element().getElementsByTagName("input")[0];
 
                if (item.get_text() != "Select All" && checkbox.checked) {
                    newText += item.get_text() + ", ";
                }
                if (item.get_text() == "Select All" && checkbox.checked == true) {
                    var newText1 = "";
                    newText = "";
                    for (var i = 0; i < items.get_count(); i++) {
                        var item = items.getItem(i);
                        var checkbox = item.get_element().getElementsByTagName("input")[0];
                        newText1 = item.get_text();
                        checkbox.checked = true;
                        if (newText1 != "Select All") {
                            newText += item.get_text() + ", ";
                        }
                    }
                }
                
            }
            combo.set_text(newText);
        }

Now the behavior is like,

1. When Click on 'Select All' All the employees are checked and text of those check boxes (employees) set as text to combo box. Now i am not able to uncheck employees.
2. when i uncheck 'Select All', now i am able to check or uncheck employees and corresponding checked employee name (check box text) is set to combo box.
3. Now i need to uncheck all the employees with unchecking 'Select All' check box. For this i have added the following code as another condition with in 'for' loop.


if (item.get_text() == "----Select----" && checkbox.checked == false) {
                                   var newText1 = "";
                                   newText = "";
                                   for (var i = 0; i < items.get_count(); i++) {
                                       var item = items.getItem(i);
                                       var checkbox = item.get_element().getElementsByTagName("input")[0];
                                       newText1 = item.get_text();
                                       checkbox.checked = false;
                                       newText = "----Select----";
                                   }
                               }

Now, when i check 'Select All' all the employees are checked and when i uncheck 'Select All' all the employees are unchecked. Setting text to combo box is also fine. But now i am not able to check/uncheck selected employees. How can i achieve this?
Please reply me.
james
Top achievements
Rank 1
 asked on 23 Sep 2010
1 answer
153 views
We've noticed that at some point recently all the ComboBoxes that use the Filter property have become case-sensitive. This is true for both StartsWith and Contains settings, and seems to be the opposite of what the documentation suggests (which states that Filter is case-insensitive). 

We've fairly recently upgraded to the Q2 Telerik release from Q1, and I think it may have been after this upgrade. 

I'm just wondering if this is a new default behaviour, and if so how do you override it to the previous case insensitive version, or if this is a bug? 

Our Telerik DLL version is 2010.2.713.40, using .NET 4. 

This is a slightly stripped down markup of one of the ComboBoxes which has this problem. 

<telerik:RadComboBox ID="Combo" runat="server" AutoPostBack="true" Skin="Windows7" AllowCustomText="true" DataSourceID="OurDS" EnableAutomaticLoadOnDemand="true" EnableVirtualScrolling="true" EnableLoadOnDemand="true" ItemsPerRequest="30" EnableItemCaching="true" Filter="Contains" ShowMoreResultsBox="true" DataTextField="TextField" DataValueField="ValueID"                         EmptyMessage="Search..." OnSelectedIndexChanged="Method_SelectedIndexChanged" Width="175px" />
Simon
Telerik team
 answered on 23 Sep 2010
1 answer
68 views
Hello,

We're still using Rad Editor 6.6.1.0 for .NET 2.0 and recent some browsers don't support some of the markup the editor generates. For example, setting the text alignment in table cells adds inline markup like align="right" and vAlign="top" to the <td> element. I have noticed that the latest release of Rad Editor uses inline CSS for this.

I know it's not likely, but my boss asked me to come and ask you guys if there is a patch to make our old Rad Editor render out CSS-based markup.

Kind regards,
Kristof
Rumen
Telerik team
 answered on 23 Sep 2010
1 answer
153 views
Hi,

How can I set an Empty Text when the RadCombo is loaded?

In the attached code, after the binding, The item "Mark" is automatically highlighted (but not selected, as I want).
My goal is to have, after the binding, no selected elements and an empty Text in the combobox.
The dropdown has to stay "read-only" (user cannot input text)

<form id="form1" runat="server">
<telerik:RadScriptManager runat="server">
</telerik:RadScriptManager>
<telerik:RadComboBox DataValueField="ID" EnableTextSelection="false"
    Skin="Default" DataTextField="Name" ID="RadComboBox1" runat="server" >
<ItemTemplate>
    <asp:CheckBox runat="server" ID="chk1"/>
    <asp:Label runat="server" ID="Label1" AssociatedControlID="chk1" Text='<%# Eval("Name") %>'></asp:Label>
</ItemTemplate>
</telerik:RadComboBox>
 
 
</form>
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
using System.Web.UI.MobileControls;
using RadControlsWebApp1;
using System.Collections.Generic;
 
public partial class Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        List<Item> items = new List<Item>();
        items.Add(new Item() { Id = 1, Name = "Mark" });
        items.Add(new Item() { Id = 2, Name = "Jon" });
        items.Add(new Item() { Id = 3, Name = "Frank" });
 
        //RadGrid1.DataSource = items;
        if (!IsPostBack)
        {
            RadComboBox1.DataSource = items;
            RadComboBox1.DataBind();
        }
    }
 
}


How can I achieve this?

thanks.

Leo

Shinu
Top achievements
Rank 2
 answered on 23 Sep 2010
2 answers
155 views
Hi 


I'm trying to get access to the RadDatePicker and RadTimePicker from client-side code. I've read that I should use $find() function, which is shortcut for $findComponent(), in Sys.Application.  But I can't find it, to get/set date!  

Could you tell me what's the problem plese?  Can  jquery cause this problem?
John John
Top achievements
Rank 1
 answered on 23 Sep 2010
1 answer
75 views
I'm getting the SessionPageStatePersister in design view on a radComboBox that's in a radGrid which is in a radPageView.
   radMultiPage>radPageView>radGrid>radComboBox

I have no problems with the SessionPageStatePersister if the radComboBox is outside the radMultiPage.

It's just design view, so it's not the end of the world (just annoying trying to format).

Anyone have an idea?

Thanks
Simon
Telerik team
 answered on 23 Sep 2010
1 answer
354 views
Hi,
I have a requirement in RadGrid.
I have a grid assume there are 2 pages in it. When im on the first page , then Go to first Page and prev buttons has to be disabled.
When im on the last page then go to next page and go to last page buttons has to be disabled.
Is there any provisions in telerik radgrid for that?

Regards,
Krishnan
Princy
Top achievements
Rank 2
 answered on 23 Sep 2010
4 answers
103 views
Hi

our users are complaining about the height of the RadEditor in Annoucment Lists. I have reviewed our configuration and looked at the HTML markup rendered by RadEditor and I was suprised to see that the height is not 400px as defined in the config.xml files (which seems to be the default value anyway). The height is acutally 210px for a OOTB Announcement List.

I started investigating and I looked at the RadTextfield class and there is a if condition which checks for the NumberOfLines property of the multiline field and if more than 6 lines are defined the height gets somehow calculated...

if (this.baseField.NumberOfLines > 6)
{
    this.Height = (this.baseField.NumberOfLines * this.FontSizeCoef) * 2;
}

Using the default value of 6 lines resuls in a regular sized editor based on the config values (e.g. 400px). Using a higher number results in some calculation which will (at least in our configuraiton) render much to small editor windows.
I don't want to tell our editor to replace the Annoucement List line number to 6 after creating a new list as a workaround. Is it possible to change this behavior? Is it possible to configure the FontSizeCoef property?
I attached a screenshot as reference.

Version: 7.5.2.0 / 2010.1.415.20

thanks
regards
göran
Göran Tänzer
Top achievements
Rank 1
 answered on 23 Sep 2010
0 answers
91 views
Hi,

we are Creating bar chart and that are coming very well. This we are generating dynamically. Please see the attached Image.

now my problem is I want to set the width for bars. For example I have giving width for my chart is 500. and when I add 2 Items then it shows 2 bars in whole 500 width.

When I add 10 Items then it shows 10 bars in same 500 width.

now I want to set the width for bar so I can fix the bar width and it will show from left to right . so when I add only 2 Items then it comes from left and will have empty space in right side. It will not take whole space (500) in chart.

Please see the attached Image for my current graph.

Regards
Reetesh
Reetesh
Top achievements
Rank 1
 asked on 23 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?