Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
375 views
I am trying to get a RadComboBox to dynamically load the content when a user attempts to open the combo box.

The ComboBox is displayed in a RadGrid under the ItemTemplate (yes, not EditItemTemplate).

The problem is I get an error that says "The target {obj} for the callback could not be found or did not implement the ICallbackEventHandler.

What am I missing?   Here is my aspx:

<telerik:GridTemplateColumn HeaderText="Employee Type" DataType="System.String" >
    <ItemTemplate>
        <telerik:RadComboBox ID="uxEmployeeType" runat="server" Width="50px"
            DataTextField="Name" DataValueField="ID" EnableAutomaticLoadOnDemand="true"
            OnItemsRequested="uxEmployeeType_ItemsRequested" >
        </telerik:RadComboBox>
    </ItemTemplate>
</telerik:GridTemplateColumn>


And here is my code.  

protected void uxEmployeeType_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
    RadComboBox uxEmployeeType = (RadComboBox)sender;
    uxEmployeeType.DataSource = _empTypes.EmployeeTypesMembers;
    uxEmployeeType.DataBind();
}
Konstantin Dikov
Telerik team
 answered on 17 Feb 2015
1 answer
144 views
hi
can I,use  DropDownTree. with write on it for select Such as autoCompletebox?

in other words. I need DropDownTree with search  when I write on it .

thanks
Aneliya Petkova
Telerik team
 answered on 17 Feb 2015
2 answers
96 views
I'm having an issue with a RadGrid not displaying right-click context menus in IE. Specifically, when choosing the auto-generated "Add New Item" button, the editor area (which opens in an iframe within the grid) does not allow me to right-click to open a Cut/Copy/Paste/etc context menu. This issue only occurs for me under IE, right-clicking generates a context menu in both Chrome and Firefox. I'm also not using any custom context menus and there is nothing in the code behind that should be affecting this. I'm wondering if there is a known solution to this or if the problem is could be caused by certain settings on the RadGrid or MasterTable?

Angel Petrov
Telerik team
 answered on 17 Feb 2015
1 answer
89 views
Hello, I am using 2014.1.403.40, I have a RadEditor inside a RadWindow. I launch the RadWindow from code using the following:

string script = "function f() {$find(\"" + wPopup.ClientID + "\").show(); setTimeout(function(){$find(\"" + edContent.ClientID + "\").onParentNodeChanged();}, 10); Sys.Application.remove_load(f); EditorWindowVisible = true;} Sys.Application.add_load(f);";
                ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, true);

When I click/open any of the editor toolbar dropdown controls they will not close unless I click/open another editor toolbar dropdown control. This only happens in Chrome and it doesn't happen the first time I load the site? I don't think it matters but the site is a Sitefinity site. Otherwise the editor looks and is working correctly. I notice if I remove the editor from the RadWindow this problem does not happen and it does not happen in IE 11.
Ianko
Telerik team
 answered on 17 Feb 2015
3 answers
378 views
Hi,

I am attempting to update the checkbox of a GridTemplateColumn via a button on the grid's command bar.
This button should check all rows within the grid, but at the minute my script is updating all rows other than the first one.
It seems as though I must be missing something very simple but I can't seem to spot it!

It's worth noting that the checkbox in the ItemTemplate does get checked for the first row, however it doesn't appear to change the batch editor state, i.e. all rows are checked, but the first row does not have the red indicator to show that the value has changed, therefore a command object is never passed to my OnBatchEditCommand server side function for this row.

I would appreciate any help on this.

Regards,
Mike.

Column definition: -
<telerik:GridTemplateColumn UniqueName="HasAccess" HeaderText="Access" DataField="HasAccess" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="125px"
                                            GroupByExpression="Group By HasAccess">
                    <ItemTemplate>
                        <asp:CheckBox ID="HasAccessCheckBox" runat="server" Checked='<%#Eval("HasAccess") %>' onclick="changeEditor(this);" />
                        <telerik:RadScriptBlock runat="server">
                            <script type="text/javascript">
                                function changeEditor(sender, args) {
                                    var grid = $find("<%=Grid.ClientID%>");
                                    var batchManager = grid.get_batchEditingManager();
                                    batchManager.openCellForEdit(sender.parentElement.parentElement);
                                    sender.checked = !sender.checked;
                                }
                            </script>
                        </telerik:RadScriptBlock>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:CheckBox ID="HasAccessCheckBox" runat="server" />
                    </EditItemTemplate>
                    <FilterTemplate>
                        <telerik:RadComboBox ID="HasAccessFilter" runat="server" OnClientSelectedIndexChanged="HasAccessFilter_SelectedIndexChanged"
                                             SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("HasAccess").CurrentFilterValue %>' Width="110px">
                            <Items>
                                <telerik:RadComboBoxItem Text="All" />
                                <telerik:RadComboBoxItem Text="Has Access" Value="True" />
                                <telerik:RadComboBoxItem Text="No Access" Value="False" />
                            </Items>
                        </telerik:RadComboBox>
                        <telerik:RadScriptBlock runat="server">
                            <script type="text/javascript">
                                
                            </script>
                        </telerik:RadScriptBlock>
                    </FilterTemplate>
                </telerik:GridTemplateColumn>

Command Bar: -
<CommandItemTemplate>
                <telerik:RadToolBar ID="commandToolbar" runat="server" Width="100%" OnClientButtonClicking="commandToolbar_ButtonClicking">
                    <Items>
                        <telerik:RadToolBarButton Text="Save changes" ImageUrl="/Images/save_16.png" Value="SaveChanges" />
                        <telerik:RadToolBarButton Text="Cancel changes" ImageUrl="/Images/Cancel.gif" Value="Rebind" />
                        <telerik:RadToolBarButton Text="Set Access"  ImageUrl="/Images/Update.gif" Value="SetAllAccess" />
                        <telerik:RadToolBarButton Text="Revoke Access" ImageUrl="/Images/Delete.gif" Value="RevokeAllAccess" />
                    </Items>
                </telerik:RadToolBar>
            </CommandItemTemplate>

Scripts: -
<telerik:RadScriptBlock runat="server">
        <script type="text/javascript">
            function commandToolbar_ButtonClicking(sender, args) {
                var value = args.get_item().get_value();
                if (value == "SetAllAccess") {
                    args.set_cancel(true);
                    radconfirm("This action will give access to all of the visible pages for the selected Employees.<br /><br />Would you like to continue?", setAccessCallback, 330, 160, null, "Confirm Access");
                }
                else if (value == "RevokeAllAccess") {
                    args.set_cancel(true);
                    radconfirm("This action will remove access to all of the visible pages for the selected Employees.<br /><br />Would you like to continue?", revokeAccessCallback, 330, 160, null, "Confirm Revoke Access");
                }
                else if (value == "SaveChanges") {
                    var grid = $find("<%=Grid.ClientID%>");
                    grid.get_batchEditingManager().saveChanges(grid.get_masterTableView());
                }
                else if (value == "Rebind"){
                    var grid = $find("<%=Grid.ClientID%>");
                    grid.get_masterTableView().rebind();
                }
            }
 
            function setAccessCallback(arg) {
                if (arg) {
                    checkAll(true);
                }
            }
 
            function revokeAccessCallback(arg) {
                if (arg) {
                    checkAll(false);
                }
            }
 
            function checkAll(isChecked) {
                var grid = $get("<%= Grid.ClientID %>");
                var inputList = grid.getElementsByTagName("input");
 
                var batchManager = $find("<%=Grid.ClientID%>").get_batchEditingManager();
 
                for (var i = 0; i < inputList.length; i++) {
                    if (inputList[i].type == "checkbox") {
                        batchManager.openCellForEdit(inputList[i].parentElement.parentElement);
                        inputList[i].checked = isChecked;
                    }
                }
            }
        </script>
    </telerik:RadScriptBlock>

Mike
Top achievements
Rank 2
 answered on 17 Feb 2015
2 answers
146 views
I have got the Telerik CDN setup as listed in the URL below:
http://www.telerik.com/help/aspnet-ajax/cdn-custom-provider.html

However, it causes scripts to load twice. One file - jQuery.Easing is loaded as part of jQuery.plugins.js and ScriptResource.axd. There are other files that load twice similarly. 

The settings I have made are exactly as provided in the URL above. Please let me know if I have missed something and how to resolve this issue.

We are using telerik version 2011.
Dimitar Terziev
Telerik team
 answered on 17 Feb 2015
1 answer
116 views

I am getting small arrows in  the radtreeview . Every Node has a small arrow like ">" before it  . I am not sure its a bug in the control or whether its a setting . Please help to get rid of this arrow.

+ > Mainnode .

     > Subnode one .

     > Subnode two.

I have tried to recreate the  issue.

Bala
Top achievements
Rank 1
 answered on 17 Feb 2015
6 answers
173 views
Hi

How to Implemented Filter and Sorting Radgrid using Datatable in C# Code for example my field this

ex:Name,Empno,Amout,Dob Fields

any one guide me how will do this?

Thanks
for supports to all
Pavlina
Telerik team
 answered on 16 Feb 2015
2 answers
106 views
I'm trying to resize a splitter using the HeightOffset="60" property. It works perfect until I add a RadAjaxManager to the page. After that the splitter no longer takes up the full screen like i want it too. This is a simple example just to demo my issue. Obviously i need to keep the radajaxmanager otherwise i would just remove it. Thanks. Any help would be great!!!

Notice in the code below it does not size correctly, but if i remove  the radajaxmanager block it works perfect.
         <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
             <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="LatePanel"  LoadingPanelID="RadAjaxLoadingPanel1"/>
                </UpdatedControls>
            </telerik:AjaxSetting>
          </AjaxSettings>
        </telerik:RadAjaxManager>

<%@ Page Language="C#" %>
<%@ Import Namespace="System.Data" %>
 
<!DOCTYPE html>
 
<script runat="server">
    protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        DataTable dt = new DataTable();
        dt.Columns.Add("EmployeeID");
        dt.Columns.Add("LastName");
        dt.Columns.Add("FirstName");
        dt.Columns.Add("Title");
        dt.Columns.Add("ReportsTo");
        dt.Rows.Add(new object[] { 1, "Davalio", "Nancy", "Sales Representative", 2 });
        dt.Rows.Add(new object[] { 2, "Fuller", "Andrew", "Vice President, Sales", null });
        dt.Rows.Add(new object[] { 3, "Leverling", "Janet", "Sales Representative", 2 });
        dt.Rows.Add(new object[] { 4, "Peacock", "Margaret", "Sales Representative", 2 });
        (sender as RadGrid).DataSource = dt;
    }
</script>
 
<head runat="server">
    <title></title>
    <style>
        html,
        body,
        form {
            height: 100%;
            width: 100%;
            margin: 0px;
            padding: 0px;
        }
 
        .header {
            width: 100%;
            height: 20px;
            background: blue;
            color: white;
        }
 
        .menu {
            width: 100%;
            height: 20px;
            background: black;
            color: white;
        }
 
        .footer {
            height: 20px;
            width: 100%;
            background: blue;
            color: white;
            position: absolute;
            bottom: 0;
        }
    </style>
 
 
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnableTheming="True">
        </telerik:RadScriptManager>
 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
             <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="LatePanel"  LoadingPanelID="RadAjaxLoadingPanel1"/>
                </UpdatedControls>
            </telerik:AjaxSetting>
          </AjaxSettings>
        </telerik:RadAjaxManager>
 
        <div class="header">Header</div>
 
        <div class="menu">Menu</div>
 
      <asp:Panel ID="LatePanel" runat="server" Height="100%" Width="100%" >
      <telerik:RadSplitter runat="server" id="InnerSplitter" Orientation="Vertical" VisibleDuringInit="false" Width="100%" Height="100%" HeightOffset="60">
 
              <telerik:RadPane ID="LeftMenuPane" runat="server" Scrolling="None" BackColor="SteelBlue" Width="27%"  >
                    right           
              </telerik:RadPane>
 
              <telerik:RadSplitBar runat="server" id="RadSplitBar4" />
         
              <telerik:RadPane ID="RightMenuPane" runat="server" Scrolling="None" BackColor="Tomato" >      
                           <%-- >>RADGRID--%>
                        <telerik:RadGrid ID="RadGrid1" Height="100%" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource"
                            AllowSorting="true">
                        <ClientSettings EnablePostBackOnRowClick="true" EnableRowHoverStyle="true">
                            <Selecting AllowRowSelect="true" />
                            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                        </ClientSettings>
                            <MasterTableView Width="100%" TableLayout="Fixed" AutoGenerateColumns="false">
                                <Columns>
                                    <telerik:GridBoundColumn DataField="EmployeeID" HeaderText="EmployeeID"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="LastName" HeaderText="LastName"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="FirstName" HeaderText="FirstName"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Title" HeaderText="Title"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="ReportsTo" HeaderText="ReportsTo"></telerik:GridBoundColumn>
                                </Columns>
                            </MasterTableView>
                            <ClientSettings>
                                <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                            </ClientSettings>
                        </telerik:RadGrid>
                        <%-- <<RADGRID--%>
              </telerik:RadPane>
 
      </telerik:RadSplitter>
    </asp:Panel>
 
        <div class="footer">Footer</div>
 
    </form>
</body>
</html>

Vessy
Telerik team
 answered on 16 Feb 2015
1 answer
68 views
I know that the Express editions of the Visual IDEs don't support third-party extensions (but the controls can be manually added using the zip distribution) and I'm guessing this includes registering the "Creation and Configuration Wizard" but is there any documentation on how to replicate the wizard features manually?  I've found the "web.config Settings Overview", which seems to cover some of it but the wizard seems to provide a lot more functionality.

Cheers
Marin Bratanov
Telerik team
 answered on 16 Feb 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
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?