Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
83 views
I'm watching the demo "MediaPlayer - Video Gallery" (http://demos.telerik.com/aspnet-ajax/media-player/examples/applicationscenarios/video-gallery/defaultcs.aspx), in the RadLightBox pop up the volumen bar and the progressrail bar didn't work. I'm using IE 11.

I'm built my own webapp and I found the same problem.
Eyup
Telerik team
 answered on 17 Mar 2014
4 answers
1.4K+ views
I've got a RadGrid on my page with one level of DetailTables.  Each detail table has a chevron next to it that collapses that table.  I'd like to have a chevron on the master table that expands or collapses all the detail tables (if any are expanded, it collapses them all; otherwise, it expands them all).  Is this a setting that can be set?  I would rather have the same look and feel, rather than using a button to expand or collapse all the tables. 
Eyup
Telerik team
 answered on 17 Mar 2014
1 answer
81 views
Hi.

My requirement is for a grid that will be dynamically populated,
Because of this I build the entire grid in my code behind.

I have this 99% working except for this issue with grouping:

When I group by a column and expand the group, then collapse the same group again it will collapse without any problem.

I also have these tabs which is essentially just a string value that I pass in from a hidden field it can optionally be used as a filter when I bring back a search result that will populate my grid.

The problem come in when I pass in this string; I am able to expand any of my groups, but when I want to collapse the group the page posts back but does not collapse the group again.
protected void Page_Init(object sender, System.EventArgs e)
       {
              string filterValue = HorizontalTabFilter();
               string verticalFilterValue = VerticalTabFIlter();
 
 
           DefineGridStructure();
 
       }
 
 
private void DefineGridStructure()
       {
           string searchColumns = gf.GetConfigValue(HttpContext.Current.Session["APPLICATION"].ToString(), "SEARCHCOLUMNS");
           List<string> searchColumnList = searchColumns.Split('|').ToList();
 
           RadGrid grid = new RadGrid();
           grid.ID = "RadGrid1";
           grid.AllowSorting = true;
           grid.GroupingEnabled = true;
           grid.ClientSettings.AllowGroupExpandCollapse = true;
           grid.ClientSettings.AllowDragToGroup = true;
           grid.ClientSettings.Scrolling.AllowScroll = true;
           grid.ClientSettings.Scrolling.UseStaticHeaders = true;
           grid.ClientSettings.Scrolling.SaveScrollPosition = true;
           grid.ClientSettings.Scrolling.EnableVirtualScrollPaging = true;
           grid.ClientSettings.Resizing.ResizeGridOnColumnResize = true;
           grid.ClientSettings.Resizing.AllowColumnResize = true;
           grid.ClientSettings.Resizing.EnableRealTimeResize = true;
           grid.ClientSettings.Resizing.ResizeGridOnColumnResize =  true;
           grid.ClientSettings.Resizing .AllowResizeToFit = true;
           grid.HorizontalAlign = HorizontalAlign.Left;
           grid.HeaderStyle.HorizontalAlign = HorizontalAlign.Left;
           grid.ItemStyle.HorizontalAlign = HorizontalAlign.Left;
           grid.AlternatingItemStyle.HorizontalAlign = HorizontalAlign.Left;
           grid.EnableViewState = true;
 
if (selectedTab != "" || selectedVerticalTab != "")
           {
               grid.DataSource = null;
               grid.Rebind();
           }
 
 
           grid.DataSource = dt = ed.SearcheDOCS(selectedTab, selectedVerticalTab, selectedVerticalTabIndex);
 
           colCount = dt.Columns.Count;
           rowCount = dt.Rows.Count;
 grid.Width = Unit.Percentage(99);
           grid.Height = Unit.Percentage(99);
           grid.PageSize = Convert.ToInt32(gf.GetConfigValue(HttpContext.Current.Session["APPLICATION"].ToString(), "PAGINATION"));
           if (Convert.ToInt32(gf.GetConfigValue(HttpContext.Current.Session["APPLICATION"].ToString(), "PAGINATIONALLOWED")) == 1)
           {
               grid.AllowPaging = true;
           }
           else
           {
               grid.AllowPaging = false;
           }
           grid.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;
           grid.AutoGenerateColumns = false;
           grid.ShowGroupPanel = true;
           grid.HeaderStyle.CssClass = "HEADER";
           grid.MasterTableView.Width = Unit.Percentage(100);
           grid.HeaderStyle.HorizontalAlign = HorizontalAlign.Left;
           grid.MasterTableView.DataKeyNames = new string[] { "DOCNUM" };
            
           GridBoundColumn boundColumn = new GridBoundColumn();
           GridImageColumn gi;
           GridButtonColumn gb;
           GridHyperLinkColumn hyperlinkColumn;
 
           boundColumn = new GridBoundColumn();
           gi = new GridImageColumn();
           gb = new GridButtonColumn();
           hyperlinkColumn = new GridHyperLinkColumn();
           grid.MasterTableView.TableLayout = GridTableLayout.Fixed;
           grid.HeaderStyle.HorizontalAlign = HorizontalAlign.Left;
           GridTableView tableViewOrders = new GridTableView(grid);
           grid.MasterTableView.Columns.Add(boundColumn);
 
 
           if (colCount == 10)
           {
               boundColumn.DataField = "icon";
               boundColumn.HeaderText = "icon";
               boundColumn.Visible = false;
               boundColumn.FilterImageUrl = "icon_icon.gif";
 
               string[] fld0 = { "icon" };
               gi = new GridImageColumn();
               gi.DataImageUrlFields = fld0;
               gi.DataImageUrlFormatString = "~/images/{0}";
               gi.HeaderText = "";
 
               gi.HeaderStyle.Width = Unit.Pixel(30);
               gi.ImageHeight = Unit.Pixel(20);
               gi.ImageWidth = Unit.Pixel(20);
 
               grid.MasterTableView.Columns.Add(gi);
 
               grid.MasterTableView.GroupsDefaultExpanded = false;
               GridGroupByExpression expression = new GridGroupByExpression();
               GridGroupByField gridGroupByField = new GridGroupByField();
               gridGroupByField = new GridGroupByField();
               gridGroupByField.FieldName = "AUTHOR";
               gridGroupByField.HeaderText = "AUTHOR";
               expression.SelectFields.Add(gridGroupByField);
 
               gridGroupByField = new GridGroupByField();
               gridGroupByField.FieldName = "AUTHOR";
               gridGroupByField.HeaderText = "AUTHOR";
               expression.GroupByFields.Add(gridGroupByField);
 
               boundColumn = new GridBoundColumn();
               grid.MasterTableView.Columns.Add(boundColumn);
               boundColumn.DataField = "application";
               boundColumn.HeaderText = searchColumnList[0].ToString();
               boundColumn.Visible = false;
 
               boundColumn = new GridBoundColumn();
               grid.MasterTableView.Columns.Add(boundColumn);
               boundColumn.DataField = searchColumnList[1].ToString();
               //boundColumn.ItemStyle.Width = Unit.Pixel(70);
               boundColumn.HeaderStyle.Width = Unit.Pixel(70);
               boundColumn.HeaderText = gf.GetHeadingText(searchColumnList[1].ToString());
 
               string[] fld = { "link" };
               hyperlinkColumn.DataNavigateUrlFields = fld;
               hyperlinkColumn.ItemStyle.CssClass = "hyperlink";
               hyperlinkColumn.DataNavigateUrlFormatString = "{0}";
               hyperlinkColumn.HeaderText = gf.GetHeadingText(searchColumnList[2].ToString());
               hyperlinkColumn.ItemStyle.Width = Unit.Pixel(300);
               hyperlinkColumn.HeaderStyle.Width = Unit.Pixel(300);
               hyperlinkColumn.DataTextField = "DOCNAME";
               hyperlinkColumn.AllowSorting = true;
               hyperlinkColumn.ItemStyle.Wrap = false;
               grid.MasterTableView.Columns.Add(hyperlinkColumn);
 
               hyperlinkColumn = new GridHyperLinkColumn();
               string[] fld4 = { "ABSTRACTLINK" };
               hyperlinkColumn.DataNavigateUrlFields = fld4;
               hyperlinkColumn.ItemStyle.CssClass = "hyperlink";
               hyperlinkColumn.DataNavigateUrlFormatString = "{0}";
               hyperlinkColumn.HeaderText = "Comments";
               hyperlinkColumn.HeaderStyle.Width = Unit.Pixel(75);
               hyperlinkColumn.ItemStyle.Width = Unit.Pixel(75);
               hyperlinkColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
               hyperlinkColumn.DataTextField = "ABSTRACT";
               hyperlinkColumn.AllowSorting = true;
               hyperlinkColumn.ItemStyle.Wrap = false;
               grid.MasterTableView.Columns.Add(hyperlinkColumn);
 
               hyperlinkColumn = new GridHyperLinkColumn();
               string[] fld2 = { "editlink" };
               hyperlinkColumn.DataNavigateUrlFields = fld2;
               if (gf.GetConfigValue(HttpContext.Current.Session["APPLICATION"].ToString(), "ALLOWEDIT") == "0")
               {
                   hyperlinkColumn.Visible = false;
               }
               hyperlinkColumn.DataNavigateUrlFormatString = "{0}";
               hyperlinkColumn.HeaderText = "Edit";
               hyperlinkColumn.HeaderStyle.Width = Unit.Pixel(45);
               hyperlinkColumn.ItemStyle.Width = Unit.Pixel(45);
               hyperlinkColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Left;
               hyperlinkColumn.DataTextField = "editlink";
               hyperlinkColumn.ImageUrl = "~/images/EditProfile2.png";
               grid.MasterTableView.Columns.Add(hyperlinkColumn);
 
               hyperlinkColumn = new GridHyperLinkColumn();
               string[] fld3 = { "versionLink" };
               hyperlinkColumn.DataNavigateUrlFields = fld3;
               if (gf.GetConfigValue(HttpContext.Current.Session["APPLICATION"].ToString(), "ALLOWVERSION") == "0")
               {
                   hyperlinkColumn.Visible = false;
               }
               hyperlinkColumn.DataNavigateUrlFormatString = "{0}";
               hyperlinkColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
               hyperlinkColumn.HeaderStyle.Width = Unit.Pixel(55);
               hyperlinkColumn.ItemStyle.Width = Unit.Pixel(55);
               hyperlinkColumn.HeaderText = "Version";
               hyperlinkColumn.DataTextField = "versionLink";
               hyperlinkColumn.ImageUrl = "~/images/NewVersion2.png";
               grid.MasterTableView.Columns.Add(hyperlinkColumn);
 
               boundColumn = new GridBoundColumn();
               grid.MasterTableView.Columns.Add(boundColumn);
               boundColumn.DataField = "link";
               boundColumn.HeaderText = "Link";
               boundColumn.Visible = false;
 
               boundColumn = new GridBoundColumn();
               grid.MasterTableView.Columns.Add(boundColumn);
               boundColumn.DataField = "ABSTRACTLINK";
               boundColumn.HeaderText = "ABSTRACTLINK";
               boundColumn.Visible = false;
               this.PlaceHolder1.Controls.Add(grid);
           }

On page Page_Init I use  DefineGridStructure(); to build my grid and bind the datatable that comes from ed.SearcheDOCS(selectedTab, selectedVerticalTab, selectedVerticalTabIndex);

Then depending on the number of columns returned I build the grid,
when one of these filter values I mentioned above is passed in while grouped I use the code below, so when it posts back to collapse after having been expanded the code runs as expected but will not collapse the expanded group.
if (selectedTab != "" || selectedVerticalTab != "")
{
    grid.DataSource = null;
    grid.Rebind();
} grid.DataSource = dt = ed.SearcheDOCS(selectedTab, selectedVerticalTab, selectedVerticalTabIndex);
I could really use some help with this.
Any ideas?
Viktor Tachev
Telerik team
 answered on 17 Mar 2014
3 answers
53 views
I'm currently upgrading Telerik for our company, however it looks like the combo box layout that we used to use isn't there anymore.

I was hoping we would have the images that were used here, however it looks like we are missing those.

Attached is a screenshot of the combobox that we are using.
Magdalena
Telerik team
 answered on 17 Mar 2014
3 answers
756 views
Hi,

I am using Rad-grid hierarchical. when i am trying to rebind the grid after update or insert. i am getting "FixedId" is neither a DataColumn nor a data Relation"  Here i added my design and code behind please let me know where i am going wrong.
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" Skin="Black" OnItemDataBound="RadGrid1_ItemDataBound" OnItemCreated="RadGrid1_ItemCreated"
    AllowSorting="True" AllowMultiRowSelection="False" OnItemCommand="RadGrid1_ItemCommand" AutoGenerateEditColumn="false"
    OnDetailTableDataBind="RadGrid1_DetailTableDataBind" OnNeedDataSource="RadGrid1_NeedDataSource" OnInsertCommand="RadGrid1_InsertCommand" OnDataBound="RadGrid1_DataBound"
    OnPreRender="RadGrid1_PreRender" >
 
    <MasterTableView DataKeyNames="TempAccountsId" ShowFooter="true" TableLayout="Fixed" AllowMultiColumnSorting="True" EditMode="InPlace" >
        <DetailTables>
            <telerik:GridTableView DataKeyNames="FixedId" CommandItemDisplay="Top"  TableLayout="Fixed" Name="Fixed" ShowFooter="true" EditMode="InPlace" AllowAutomaticUpdates="false">
                <Columns>
                    <telerik:GridTemplateColumn Visible="false">
                        <ItemTemplate>
                            <asp:Label ID="lblFixedId" runat="server" Text='<%#Eval("FixedId") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderText="Edit" UniqueName="Edit" ItemStyle-Width="25px" HeaderStyle-HorizontalAlign="Center"
                        EditImageUrl="../Images/edit.gif" ItemStyle-HorizontalAlign="Center">
                    </telerik:GridEditCommandColumn>
                    <telerik:GridTemplateColumn HeaderText="Delete" UniqueName="Delete" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="40px" ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <asp:ImageButton runat="server" ID="imgdelete" OnClientClick="return confirm('Are you sure that you want to Delete?');"
                                ImageUrl="../Images/delete.gif" CommandName="Delete" CommandArgument="" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                     
                    <telerik:GridTemplateColumn UniqueName="Jan" HeaderText="Jan" HeaderStyle-HorizontalAlign="Center" FooterStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="70px">
                        <ItemTemplate>
                            <asp:Label ID="lblJan" runat="server" Text='<%# string.Format("{0:n}", Convert.ToDecimal(Eval("Jan"))) %>'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox ID="txtJanEdit" Width="70px" runat="server" MaxLength="11" Text='<%# string.Format("{0:n}", Convert.ToDecimal(Eval("Jan"))) %>' CssClass="AlgRgh"
                                onkeypress="javascript:return Allownumbersonly(event);" BorderWidth="1px"></asp:TextBox>
                        </EditItemTemplate>
                        <InsertItemTemplate>
                            <asp:TextBox ID="txtJanInsert" runat="server" Width="70px" MaxLength="11" CssClass="AlgRgh"
                                onkeypress="javascript:return Allownumbersonly(event);" BorderWidth="1px"></asp:TextBox>
                        </InsertItemTemplate>
                        <FooterTemplate>
                            <asp:Label ID="lblJanFooter" runat="server"></asp:Label>
                        </FooterTemplate>
                    </telerik:GridTemplateColumn>
                    
                </Columns>
            </telerik:GridTableView>
        </DetailTables>
        <Columns>
            <telerik:GridTemplateColumn HeaderText="AccountId" UniqueName="TempAccountsId" Visible="false">
                <ItemTemplate>
                    <asp:Label ID="lblTempAccountsId" runat="server" Text='<%#Eval("TempAccountsId") %>'></asp:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Account Number" UniqueName="AccountNumber" ItemStyle-Width="120px" HeaderStyle-Width="120px" HeaderStyle-HorizontalAlign="left" ItemStyle-HorizontalAlign="left">
                <ItemTemplate>
                    <asp:Label ID="lblAccountNumber" runat="server" Text='<%#Eval("AccountNumber") %>'></asp:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Account Name" UniqueName="AccountName" ItemStyle-Width="140px" HeaderStyle-Width="140px" HeaderStyle-HorizontalAlign="left" ItemStyle-HorizontalAlign="left">
                <ItemTemplate>
                    <asp:Label ID="lblAccountName" runat="server" Text='<%#Eval("AccountName") %>'></asp:Label>
                </ItemTemplate>
                <FooterTemplate>
                    <asp:Label ID="lbltotalFooter" runat="server" Text="Total:"></asp:Label>
                </FooterTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderStyle-Width="60" UniqueName="Jan" HeaderText="" ItemStyle-HorizontalAlign="Right"
                HeaderStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right"
                Aggregate="Sum" DataField="Jan" FooterAggregateFormatString="{0:n}">
            </telerik:GridTemplateColumn>
           
 
        </Columns>
    </MasterTableView>
    <ClientSettings AllowKeyboardNavigation="true" EnableRowHoverStyle="true">
        
    </ClientSettings>
</telerik:RadGrid>

protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            if (!e.IsFromDetailTable)
            {
                //DGeneral gen = new DGeneral();
                //RadGrid1.DataSource = gen.GetAccountDetailsbyTabName("Fixed");
                Dfixed fix = new Dfixed();
                RadGrid1.DataSource = fix.GetFixedAccountsDetails(Convert.ToInt32(Session["Propertyid"].ToString()), Convert.ToInt32(Session["BudgetYear"].ToString()));
            }
        }
 
protected void RadGrid1_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)
        {
            Dfixed fix = new Dfixed();
            GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;
            switch (e.DetailTableView.Name)
            {
                case "Fixed":
                    {
                        int AccountID = Convert.ToInt32(dataItem.GetDataKeyValue("TempAccountsId").ToString());
                        e.DetailTableView.DataSource = fix.GetFixedByAccountId(AccountID, Convert.ToInt32(Session["BudgetYear"].ToString()), Convert.ToInt32(Session["Propertyid"].ToString()));
                        break;
                    }
 
                case "OrderDetails":
                    {
                        //string OrderID = dataItem.GetDataKeyValue("OrderID").ToString();
                        //e.DetailTableView.DataSource = GetDataTable("SELECT * FROM [Order Details] WHERE OrderID = " + OrderID);
                        break;
                    }
            }
        }
 protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
        {
            string exepUpdate = "";
            try
            {
                if (e.CommandName.Equals(RadGrid.UpdateCommandName))
                {
                    if (e.Item.OwnerTableView.Name == "Fixed")
                    {
                        bool ResultSuccess = false;
                        Dfixed fix = new Dfixed();
                        GridEditableItem item = e.Item as GridEditableItem;
                        Label lblFixedId = (Label)item.FindControl("lblFixedId");
                        int GenId = Convert.ToInt32(lblFixedId.Text.Trim().ToString());
                        TextBox txtDescriptionEdit = (TextBox)item.FindControl("txtDescriptionEdit");
                        TextBox txtJanEdit = (TextBox)item.FindControl("txtJanEdit");
                        if (txtJanEdit.Text.Trim().ToString() != string.Empty)
                        {
                            Jan = Convert.ToDouble(txtJanEdit.Text.Trim().ToString());
                        }
                        
                        total = Jan + Feb + Mar + Apr + May + Jun + July + Aug + Sep + Oct + Nov + Dec;
 
                        long? Retablesqfeet = fix.GetPropertyRentalsqfeet(Convert.ToInt32(Session["Propertyid"].ToString()));
 
                        double? genpersqft = total / Retablesqfeet;
 
                        ResultSuccess = fix.EditFixedDetails(GenId, Jan, Feb, Mar, Apr, May, Jun, July, Aug, Sep, Oct, Nov, Dec, total, genpersqft, txtDescriptionEdit.Text.Trim().ToString());
                        if (ResultSuccess)
                        {
                             RadGrid1.Rebind();
 
                        }
                        else
                        {
                            DisplayMessage("Please Verify the values");
                            e.Canceled = true;
                        }
                    }
                }
            }
            catch (Exception)
            {
                exepUpdate = "Please Verify the values you have changed in editable fields";
            }
            finally
            {
                if (exepUpdate != "")
                {
                    e.Canceled = true;
                    DisplayMessage("Fixed Record cannot be Updated. Reason: " + exepUpdate.ToString());
                }
            }
 
 
 
        }

 
Eyup
Telerik team
 answered on 17 Mar 2014
1 answer
62 views
The PivotGrid on my webpage is running very slowly when using Internet Explorer 10.  However, the performance is greatly improved when using Firefox instead.

As Internet Explorer 10 is part of my company's SOE, is there anything that can be done to improve the performance of the PivotGrid when using IE10 as the browser?
Galin
Telerik team
 answered on 17 Mar 2014
1 answer
38 views
Hi,
         In the treeview we have nodes that has child elements not visible , For this we add icon using rtPlus and rtMinus class. On the same treeview we have nodes that does not have any child.We need to place an icon . How do i target these nodes in CSS?


Shinu
Top achievements
Rank 2
 answered on 17 Mar 2014
1 answer
160 views
Hello,

I have many radgrids in my solution & most of them have export to excel feature implemented. Recently, we added Summay & Caption Statements to these grids in the ASPX files. In order not to show the Captions when the grid is displayed, I added a CSS class like "rgCaption" or "MasterTable_Default caption" or "DetailTable_Default caption".

Here is the example of the class.

.rgCaption
{
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    visibility: hidden;
    line-height: 0;
}


So when the grid is displayed in the webpage, the caption is hidden. I also want to do something similar when I do the export to excel (using CSS). Currently all my exported excels show the Caption which I don't want. I can always say Grid.MasterTable.Caption = String.Empty() in OnExcelExportCellFormatting or OnGridExporting. But this approach would make me edit all of the pages where export is involved & is too tedious & time-taking. I also tried 

Any Ideas?

Thanks
Bobby

Kostadin
Telerik team
 answered on 17 Mar 2014
1 answer
97 views
how to bind ad drop down tree with sqldata reader
Shinu
Top achievements
Rank 2
 answered on 17 Mar 2014
1 answer
82 views
So I have a kind of interesting problem here. I am using the Telerik control suite for ASP.NET AJAX, inside a number of custom user controls.

When assigning client side event handlers, I have changed my approach from defining functions at the window scope, to using the $create method to create an object for my control, and assigning the control's client side event to a method defined on the prototype. Here is the basic setup:

From an external js file:

function genericControl_init(sender, args){
  $create(GenericObject, sender);
}
 
function GenericObject(){};
GenericObject.prototype = {
  someFunction: function (sender, args) {
    console.log(this.someProperty)//undefined
    console.log(this);//this is not the GenericObject
  },
  get_id: function () { return this.id },
  set_id: function (id) { this.id = id },
  beginUpdate: function () { return true },
  endUpdate: function () { return true }
}

And on the page, generated in the code behind, this uses the control's ClientID for the id property on the JSON object:
genericControl_init({ "id": "ct101_someControl", "someProperty": "ct101_someControl_someClientID" });

and in the codebehind, to assign the event:
RadComboBox1.OnClientSelectedIndexChanged = String.Format("$find('{0}').{1}", ClientID, "someFunction");

This is just using a RadComboBox as an example, this happens with any Telerik control. Basically, it appears that the scope of this has changed when assigning the function as an event handler for a Telerik control and no longer references my GenericObject object.

A workaround I have found is storing the ClientID as an attribute on the Telerik control, and then grabbing it like sender.get_attributes().getAttribute('controlClientId') and using $find to get the reference to the original object and access it's individual properties. This feels sloppy though, and I was just wondering if anyone had a suggestion on how to better handle this.
Ivan Zhekov
Telerik team
 answered on 17 Mar 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?