Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
150 views
Hi,

I'm trying to get my radcombobox (populated with checkboxes) to show what items are selected. Its similar to this demo:
http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/templates/defaultcs.aspx

However, my js code (copied from the above is simply returning empty strings with the .get_text() method.

Can anyone shed some light on why its returning nothing?

<telerik:RadComboBox ID="RadComboBox_User_Type" runat="server" EmptyMessage="Select Users" HighlightTemplatedItems="true"
            AllowCustomText="true" Width="225px">
            <Items>   
                <telerik:RadComboBoxItem 
                    ImagePath="../Images/OnTime_Fkeys/Access Control.png" 
                    Text_="Employee">
                </telerik:RadComboBoxItem>   
                <telerik:RadComboBoxItem 
                    ImagePath="../Images/OnTime_Fkeys/Access Control.png" 
                    Text_="Visitor">
                </telerik:RadComboBoxItem>
            </Items>
            <ItemTemplate>
                <div onclick="StopPropagation(event)" style="vertical-align: middle">
                    <asp:CheckBox runat="server" ID="chk1" Checked="false"/>
                    <asp:Label runat="server" ID="Label1" AssociatedControlID="chk1">
                        <img src='<%# DataBinder.Eval(Container, "Attributes['ImagePath']") %>' alt="" style="vertical-align:text-top"/>
                        <%# DataBinder.Eval(Container, "Attributes['Text_']") %> 
                    </asp:Label>
                </div>
            </ItemTemplate>
        </telerik:RadComboBox>




protected void Page_Load(object sender, EventArgs e)
        {
  
            String script1 = "" +
                    "function StopPropagation(e) " +
                    "{" +
                        "e.cancelBubble = true;" +
                        "if (e.stopPropagation) " +
                        "{" +
                            "e.stopPropagation();" +
                        "}" +
                    "}";
  
            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "LMP_Stop_Prop", script1, true);
  
            ClientScript.RegisterClientScriptBlock(Page.GetType(),"324nvik",
                "<script src=\"../Javascript/Live_Monitor/Live_Monitor.js\" type=\"text/javascript\"></script>");
  
            for (int i = 0; i < RadComboBox_User_Type.Items.Count; i++)
            {
                RadComboBox_User_Type.Items[i].DataBind();
  
            }
  
            foreach (RadComboBoxItem item in RadComboBox_User_Type.Items)
            {
                CheckBox chk = (CheckBox)item.FindControl("chk1");
                chk.Attributes.Add("onclick", "onCheckBoxClick(this)");
            }
  
        }
    }


Live_Monitor.js
function onCheckBoxClick(chk) {
  
    var combo = $find('RadComboBox_User_Type');
    var text = "";
    var values = "";
    var items = combo.get_items();
  
    for (var i = 0; i < items.get_count(); i++) {
        var item = items.getItem(i);
        var chk1 = $get("RadComboBox_User_Type" + "_i" + i + "_chk1");
  
        if (chk1.checked) {
            text += item.get_text() + ",";
            values += item.get_value() + ",";
        }
    }
      
    text = removeLastComma(text);
    values = removeLastComma(values);
      
  
    if (text.length > 0) {
        combo.set_text(text);
    }
    else {
        combo.set_text("Select Users");
    }
}
  
function removeLastComma(str) {
    return str.replace(/,$/, "");
}


Anyone any ideas????

Thanks,

Sunny
Sunil
Top achievements
Rank 1
 answered on 07 Apr 2011
2 answers
135 views
Hello,

I want to display drilled down data in grid which is tooltipmanager by clicking/hover on one specific bar of barchart.

Can you please suggest me how I can achieve this ?

Thanks,
Prayag
prayag ganoje
Top achievements
Rank 1
 answered on 07 Apr 2011
3 answers
95 views
I have a treeview that the user can drag items from and drop them on a grid.  Currently the dropped items go to the bottom of the grid.  Is there a way I can get the row that the user dropped the items on?

The method that handles the drop is :

protected void tvReportColumn_HandleDrop(object sender, RadTreeNodeDragDropEventArgs e)
{
    RadTreeNode sourceNode = e.SourceDragNode;
    RadTreeNode destNode = e.DestDragNode;           
    if ((e.HtmlElementID == RadGrid1.ClientID))
    {
        foreach (RadTreeNode node in e.DraggedNodes)
        {
            AddRowToGrid(node);                   
        }
    }
 
    RadGrid1.Rebind();
}

Marin
Telerik team
 answered on 07 Apr 2011
1 answer
67 views
Hello,

           I want to do functionality like - Right click edit appointment - if user select Edit series then edit whole series sucessfully. Same way i want to update the series if user drag and drop the appointment. How to update the whole series using drag and drop.

         Don't want to edit only current occurance. Now what happend if i drag drop appointment then appointment is update but recurrence rule is not change and dragged appointment date and time marked as EXDATE and it's invisiable from rad schduler.





Need urgent



Thanks
Regards
Rahul
Veronica
Telerik team
 answered on 07 Apr 2011
0 answers
95 views
Hi,

I don't understant why I have to do a rebind() after apply a filter.

Is there an other way to to this in order to speed the display ?

At init, the user have all datas. So they must be in memory ?
If I put then a filter I have to do a rebind in order to apply it and so, redownload datas....

Is there a way to keep radgrid data in memory (table ?) and then ask to the client to filter them ?

Thanks

Filleau
Top achievements
Rank 1
 asked on 07 Apr 2011
4 answers
204 views
Hi:

This is my first try with Telerik controls, so please forgive me if I seem ignorant.  I am trying to use the RadGrid to create a DataList-type look.  I follow the example "Grid / ListView/DataList View" (http://demos.telerik.com/aspnet-ajax/grid/examples/programming/listview/defaultcs.aspx) from the demos, and I successfully displayed a grid.  It looks rather odd, though, with one cell at the top of the form, then the "page counter control", then eleven cells showing below.  (See the attachment.)  Does anyone know what's happening here?  Thanks!

Steve Smith

P.S. The aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
    <link href="~/Styles/gridstyle.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>

        <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" AllowFilteringByColumn="true"
            runat="server" GridLines="None" AllowPaging="true" AllowSorting="true"
            PageSize="12">
            <MasterTableView TableLayout="Fixed">
            <PagerStyle Mode="NextPrevAndNumeric" />
                <ItemTemplate>
                    <%# (((GridItem)Container).ItemIndex != 0)? "</td></tr></table>" : "" %>
                    <asp:Panel ID="ItemContainer" CssClass='<%# (((GridItem)Container).ItemType == GridItemType.Item)? "item" : "alternatingItem" %>'
                        runat="server" HorizontalAlign="Left">
                        <b><%# Eval("PCName")%></b>
                        <br />
                        <%# Eval("ProductName")%>
                        <br />
                        sku:&nbsp
                        <%# Eval("Sku")%>
                        <br />
                        Price:&nbsp
                        <%# Eval("Price")%>
                        <br />
                        CV:&nbsp
                        <%# Eval("CV")%>
                    </asp:Panel>
                </ItemTemplate>
            </MasterTableView>
            <GroupingSettings CaseSensitive="false" />

        </telerik:RadGrid>
         
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:Database Connection String %>"
        ProviderName="<%$ ConnectionStrings:Database Connection String.ProviderName %>"
        SelectCommand="select ProductCategory.Name PCName, ProductName, Sku, ProductPricePlan.RetailPrice Price, ProductPricePlan.UnitComVol CV
from Product
join ProductCategory on Product.ProductCategoryID = ProductCategory.ProductCategoryID
join ProductPricePlan on Product.ProductID = ProductPricePlan.ProductID and ProductPricePlan.PricePlanID = 1"></asp:SqlDataSource>
    </form>
</body>
</html>

Mark
Top achievements
Rank 1
 answered on 07 Apr 2011
6 answers
211 views
I notice that setting the background color of the RadListBox does not actually change the background color within the list area of the listbox.  The background color is only changed in the button area which is not the desired behavior.  I have controls on a web form and would like them all to have a consistent background color, but I don't seem to be able to achieve that just yet.

Using IE 8 and IE 8 Compatibility Mode for IE 7.
Dan
Top achievements
Rank 1
 answered on 07 Apr 2011
4 answers
141 views
Is it possible that there is some kind of memory leak in the latest build?  I never had this problem before I installed the Telerik controls, but in the past week, I keep getting these types of messages and I need to restart Visual Studio 2010.  I'm running VS 2010 on Windows 7.  I am building an ASP.NET 4.0 Ajax application.

Error 23 Metadata file 'c:\Program Files\Telerik\RadControls for ASP.NET AJAX Q1 2011\Bin40\Telerik.Web.UI.dll' could not be opened -- 'Not enough storage is available to process this command. ' CreativeAffairsWebApp

HELP?!

Thanks
mark baer
Top achievements
Rank 1
 answered on 07 Apr 2011
3 answers
134 views
Hi all,

I have a grid with scrolling enabled. The grid has a width of 877px and a height of 475px.

Now I just noticed that in addition to the grid scrollbar there's a vertical scrollbar in the browser as well. I don't need that scrollbar because when I scroll down I just get a blank (in my case: black) page.
How can I remove the browser scrollbar?

Please see attached image.

Any tips?

Thanks!
Pavlina
Telerik team
 answered on 07 Apr 2011
3 answers
86 views
Hai Telerik Team,

In Radgrid I have number of columns like 10-15, i want horizontal scrolling
for particular columns ex : 5 to 10, and also horizontal scrollbar need in that
particular position, so how to do these task pls help me...

Thanks
Salvio
Pavlina
Telerik team
 answered on 07 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?