Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
221 views
I'm using version: 2010.1.519.35 of the Telerik controls
We have a control that inherits from RadDateTimePicker that when used in a scenario that does partial postbacks with RadAjaxManager does not display the calendar popup after an ajax postback.  I have tried setting EnableAjaxSkinRendering = True with no luck.
Tim
Top achievements
Rank 1
 answered on 24 Jul 2014
9 answers
344 views
Quick question: Can I use the new client-side databinding method and have the data grouped?

I'd like to change from doing full postbacks to populate a grid, but the only stumbling block I have is trying to keep the grouping I have.

Thanks,

Stephen
Hardik
Top achievements
Rank 1
 answered on 24 Jul 2014
1 answer
75 views
Dear Telerik,

I'm following your demo here, I wonder if it's possible to have a way of comparing different fields by also showing its original field? As if using the DifferenceFrom total function, the difference from of the own field will always be zero.

Thanks.
Maria Ilieva
Telerik team
 answered on 24 Jul 2014
2 answers
79 views
I have a grid as follows. On first click it sorts one way. Than when I click on the arrow, the next column gets the sort arrow instead!
    class AssignBanGridCtrl : WebControl
    {
        #region Fields
        private RadAjaxLoadingPanel _RadLoadingPanel = new RadAjaxLoadingPanel();
        private UpdatePanel _UpdatePanel = new UpdatePanel();
        private RadGrid _RadGrid1 = new RadGrid();
        private PriceDealProductBanTable _PriceDealProductBanTable = new PriceDealProductBanTable();
        private PriceDealProposal _Proposal = null;    
        private GXButton _btnCopyToSelect = new GXButton();
        private GXButton _btnSaveSelected = new GXButton();
        private GXTextBox _TbBAN = new GXTextBox();
        public SmartOrderQuote OrderQuote;
        private string _BanColumnName;
        private string _ServiceColumnName;    
 
        #endregion     
 
        #region Constructors
 
        public AssignBanGridCtrl(PriceDealProposal proposal, bool hasOrderRequest)
            : base()
        {
        }    
 
        #endregion
 
        #region Overrides
 
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            this._ProductTable = new _ProductTable().ExecuteTypedDataTable();
            this._RadLoadingPanel.ID = "_RadLoadingPanel";
            this._RadLoadingPanel.Transparency = 30;
            this._RadLoadingPanel.Skin = "WebBlue";
            this._RadLoadingPanel.BackgroundPosition = AjaxLoadingPanelBackgroundPosition.Center;
            this.Controls.Add(this._RadLoadingPanel);
             
            #region Grid1
            this._RadGrid1.MasterTableView.CommandItemSettings.ShowAddNewRecordButton = false;
            this._RadGrid1.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top;
            this._RadGrid.ID = "RadGrid1";
            this._RadGrid.Skin = "WebBlue";
            this._RadGrid.Width = Unit.Percentage(100);
            this._RadGrid.GridLines = GridLines.None;
            this._RadGrid.PageSize = 100;
            this._RadGrid.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;
 
            this._RadGrid.AllowPaging = true;         
            this._RadGrid.AutoGenerateColumns = false;           
            this._RadGrid.EnableLinqExpressions = false;
            this._RadGrid.AllowAutomaticInserts = false;
            this._RadGrid.AllowAutomaticUpdates = false;
            this._RadGrid.AllowAutomaticDeletes = false; 
              
            if(this._ProductTable.Count>=100)
                this._RadGrid1.AllowFilteringByColumn = true;
            this._RadGrid1.AllowSorting = true;
            this._RadGrid1.MasterTableView.AllowNaturalSort = false;         
            
            this._RadGrid1.MasterTableView.DataKeyNames = new string[] { this._ProductTable.PriceDealEntityProductItemIdColumn.ColumnName };
            this._RadGrid1.MasterTableView.ClientDataKeyNames = new string[] { this._ProductTable.PriceDealEntityProductItemIdColumn.ColumnName };                                            
            this._RadGrid1.EnableLinqExpressions = false;         
 
            this._RadGrid1.MasterTableView.NoMasterRecordsText = "No Products found.";
            this._RadGrid1.MasterTableView.Width = Unit.Percentage(100);
             
            this._RadGrid1.ClientSettings.Selecting.AllowRowSelect = true;
            this._RadGrid1.ClientSettings.Selecting.UseClientSelectColumnOnly = true;
            this._RadGrid1.AllowMultiRowSelection = true;           
             
            this._RadGrid1.NeedDataSource += RadGrid1_NeedDataSource;
            this._RadGrid1.ItemDataBound += RadGrid1_ItemDataBound;
            this._RadGrid1.ItemCreated += RadGrid1_ItemCreated;
 
            GridBoundColumn boundColumn = new GridBoundColumn();
            string columnName;
            
            #region RadGrid Columns
            GridClientSelectColumn selectAll = new GridClientSelectColumn();
            selectAll.UniqueName = "SelectOne";
            this._RadGrid1.MasterTableView.Columns.Add(selectAll);
 
            string templateColumnName;
            GridTemplateColumn templateColumn = new GridTemplateColumn();
 
            columnName = this._ProductTable.SupplementalOriginalPriceDealEntityProductItemIdColumn.ColumnName; ;
            boundColumn = new GridBoundColumn();         
            boundColumn.DataField = columnName;
            boundColumn.UniqueName = "SupplementalOriginalPriceDealEntityProductItemId";
            boundColumn.Display = false;
            this._RadGrid1.MasterTableView.Columns.Add(boundColumn);   
             
             columnName = this._ProductTable.IsCustomProductColumn.ColumnName; ;
            boundColumn = new GridBoundColumn();         
            boundColumn.DataField = columnName;
            boundColumn.UniqueName = "IsCustomProduct";
            boundColumn.Display = false;
            this._RadGrid1.MasterTableView.Columns.Add(boundColumn);
 
            columnName = this._ProductTable.SupplementalActionCodeColumn.ColumnName; ;
            boundColumn = new GridBoundColumn();         
            boundColumn.DataField = columnName;
            boundColumn.UniqueName = "SupplementalActionCode";
            boundColumn.Display = false;
            this._RadGrid1.MasterTableView.Columns.Add(boundColumn);
 
            columnName = this._ProductTable.IsLockedColumn.ColumnName; ;
            boundColumn = new GridBoundColumn();        
            boundColumn.DataField = columnName;
            boundColumn.UniqueName = "IsLocked";
            boundColumn.Display = false;
            this._RadGrid1.MasterTableView.Columns.Add(boundColumn);
 
            columnName = this._ProductTable.DescriptionColumn.ColumnName; ;
            boundColumn = new GridBoundColumn();       
            boundColumn.DataField = columnName;
            boundColumn.HeaderText = "Location";
            boundColumn.UniqueName = "Location";
            boundColumn.SortExpression = columnName;
            this._RadGrid1.MasterTableView.Columns.Add(boundColumn);           
 
            columnName = this._ProductTable.CatalogProductColumn.ColumnName;
            boundColumn = new GridBoundColumn();
            boundColumn.FilterTemplate = new DropdownTemplate(columnName, _RadGrid1, this._ProductTable.SelectDistinct(columnName));             
            boundColumn.DataField = columnName;
            boundColumn.HeaderText = "Product";
            boundColumn.UniqueName = "Product";          
            boundColumn.AllowFiltering = true;
            boundColumn.SortExpression = columnName;
            this._RadGrid1.MasterTableView.Columns.Add(boundColumn);      
 
            columnName = this._ProductTable.CountryColumn.ColumnName;
            boundColumn = new GridBoundColumn();        
            boundColumn.FilterTemplate = new DropdownTemplate(columnName, _RadGrid1, this._ProductTable.SelectDistinct(columnName));
            boundColumn.DataField = columnName;           
            boundColumn.HeaderText = "Country";
            boundColumn.UniqueName= "Country";          
            boundColumn.AllowFiltering = true;
            boundColumn.SortExpression = columnName;
            this._RadGrid1.MasterTableView.Columns.Add(boundColumn);
 
            columnName = this._ProductTable.StateColumn.ColumnName;
            boundColumn = new GridBoundColumn();       
            boundColumn.FilterTemplate = new DropdownTemplate(columnName, _RadGrid1, this._ProductTable.SelectDistinct(columnName));
            boundColumn.DataField = columnName;
            boundColumn.HeaderText = "State/Province";
            boundColumn.UniqueName = "StateProvince";         
            boundColumn.AllowFiltering = true;
            boundColumn.SortExpression = columnName;
            this._RadGrid1.MasterTableView.Columns.Add(boundColumn);
 
            columnName = this._ProductTable.SourceSystemTypeDescriptionColumn.ColumnName;
            boundColumn = new GridBoundColumn();          
            boundColumn.FilterTemplate = new DropdownTemplate(columnName, _RadGrid1, this._ProductTable.SelectDistinct(columnName));
            boundColumn.DataField = columnName;
            boundColumn.HeaderText = "OE System";
            boundColumn.UniqueName = "OESystem";
            boundColumn.SortExpression = columnName;
            boundColumn.AllowFiltering = true;
            this._RadGrid1.MasterTableView.Columns.Add(boundColumn);
 
            templateColumn = new GridTemplateColumn();
            _BanColumnName = this._ProductTable.BillingAccountNumberColumn.ColumnName;         
            templateColumn.DataField = _BanColumnName;
            templateColumn.ItemTemplate = new TextBoxTemplate(_BanColumnName);
            templateColumn.HeaderText = "BAN";
            templateColumn.UniqueName = "BAN";           
            templateColumn.AllowFiltering = false;
            this._RadGrid1.MasterTableView.Columns.Add(templateColumn);
 
            if (IsSupplementOrChangeQuote)
            {
                _ServiceColumnName = this._ProductTable.AssetServiceIdColumn.ColumnName;
                templateColumn = new GridTemplateColumn();             
                templateColumn.ItemTemplate = new TextBoxTemplate(_ServiceColumnName);
                templateColumn.DataField = _ServiceColumnName;
                templateColumn.HeaderText = "Asset/Service ID";
                templateColumn.UniqueName = "AssetServiceID";
                templateColumn.AllowFiltering = false;
                this._RadGrid1.MasterTableView.Columns.Add(templateColumn);
            }
 
            #endregion
            #endregion
 
            this._UpdatePanel.UpdateMode = UpdatePanelUpdateMode.Conditional;
            this._UpdatePanel.ContentTemplateContainer.Controls.Add(this._RadGrid1);
             
            this._TbBAN.ID = "TbBAN";
            this._TbBAN.ShowTitle = true;
            this._TbBAN.MaxLength = 30;
            this._TbBAN.WikiKeyword = "Assignment";
            this._TbBAN.Title = "BAN :";
            this._UpdatePanel.ContentTemplateContainer.Controls.Add(this._TbBAN);
             
            this._btnCopyToSelect.ID = "BtCopyToSelected";
            this._btnCopyToSelect.Text = "Copy To Selected";
            this._btnCopyToSelect.ToolTip = "This will save the BAN above to all selected items.";
            this._btnCopyToSelect.CssClass = "GxButtonBlue";
            this._btnCopyToSelect.Click += new EventHandler(BtnCopyToSelected_Click);
            this._UpdatePanel.ContentTemplateContainer.Controls.Add(this._btnCopyToSelect);
           
            this._btnSaveSelected.ID = "BtSaveToSelected";
            this._btnSaveSelected.Text = "Save Selected";
            this._btnSaveSelected.CssClass = "GxButtonBlue";
            this._btnSaveSelected.Click += new EventHandler(BtSaveToSelected_Click);
            this._UpdatePanel.ContentTemplateContainer.Controls.Add(this._btnSaveSelected);
 
            this.Controls.Add(this._UpdatePanel);
            this._btnCopyToSelect.OnClientClick = "OnClientClick('" + _RadGrid1.ClientID + "')";
            this._btnSaveSelected.OnClientClick = "OnClientClick('" + _RadGrid1.ClientID + "')";          
        }
       
 
        private void BtnCopyToSelected_Click(object sender, EventArgs e)
        {
             
        }
 
        void BtSaveToSelected_Click(object sender, EventArgs e)
        {
           
        }     
 
        protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                 
            }
 
        }      
 
        protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem dataItem = (GridDataItem)e.Item;
                RadTextBox txtBan = (RadTextBox)dataItem.FindControl(_BanColumnName);// pass the TextBox ID
                txtBan.Attributes.Add("onfocus", "SelectRow('" + dataItem.ItemIndex + "','" + _RadGrid1.ClientID + "')");              
            }
        }
 
 
        #endregion
        void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            try
            {
                this._ProductTable = new _ProductTable().ExecuteTypedDataTable();
            }
            catch (Exception) { }
            this._RadGrid1.DataSource = this._ProductTable;
        }
 
        protected override void OnPreRender(EventArgs e)
        {          
 
            base.OnPreRender(e);
            RadAjaxManager ajaxManager = RadAjaxManager.GetCurrent(Page);          
            if (ajaxManager != null)
                ajaxManager.AjaxSettings.AddAjaxSetting(this._UpdatePanel, this._RadGrid1, this._RadLoadingPanel);
        }    
    }
}



Kostadin
Telerik team
 answered on 24 Jul 2014
1 answer
212 views
Dear Telerik,

I'm using advanced databinding on pageload in c#, and enabled batch edit mode as follow:

RadGrid_Strategy.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top;
                    RadGrid_Strategy.MasterTableView.EditMode = GridEditMode.Batch;
                    RadGrid_Strategy.MasterTableView.BatchEditingSettings.EditType = GridBatchEditingType.Cell;
                    RadGrid_Strategy.MasterTableView.CommandItemSettings.ShowAddNewRecordButton = false;
                    RadGrid_Strategy.MasterTableView.CommandItemSettings.ShowSaveChangesButton = true;
                    RadGrid_Strategy.MasterTableView.CommandItemSettings.ShowCancelChangesButton = true;
But I have 4 columns in table and would like to set readonly = "false" to some of them, as created programmatically, what property/event should I set to get access to these generated-on-the-fly column? Many thanks.

Shinu
Top achievements
Rank 2
 answered on 24 Jul 2014
5 answers
276 views
Hello,

I am working on a project with a RadGrid that has DetailView.
The RadGrid has a lot of columns.
I want the columns’ width to auto-size by content.

I have the following code: 
VB.NET:
RadGrid1.AllowSorting = True
adGrid1.MasterTableView.AllowSorting = True
adGrid1.ClientSettings.Scrolling.UseStaticHeaders = True
adGrid1.MasterTableView.PageSize = 30
adGrid1.MasterTableView.AllowPaging = True
adGrid1.AllowPaging = False

ASPX:
    <style type="text/css">
 
        #RadGrid1Panel, .RadGrid, .RadGrid_Default{
            width: 700px !important;
        }
    </style>
 
<telerik:RadGrid ID="RadGrid1" runat="server" MasterTableView-EnableHeaderContextMenu="true" Height="900px" Width="700px" >
                            <ClientSettings>
                                   <Scrolling AllowScroll="True"></Scrolling>
                                 
                            </ClientSettings>
 </telerik:RadGrid>

When I add the following code, all columns’s width get “squashed”:
Dim tableViewOrders = New GridTableView(RadGrid1)
RadGrid1.MasterTableView.DetailTables.Add(tableViewOrders)

How can I solve this?

I have attached video link that shows this issue:
[video link]


Thanks,
Daniel.
Princy
Top achievements
Rank 2
 answered on 24 Jul 2014
6 answers
271 views
Hi,

We are logging all error on the webserver, and for some of our customers (they are hosting their own web-server), there are thousands of errors each day like the following:
System.Web.HttpException (0x80004005): This is an invalid webresource request.

We have managed to locate the resource to a background image for the telerik tooltip.
A client that has this issue, can reset the browser cache and the error will go away for that client, but this is impossible to tell thousands of users to do so we would like to prevent this on the server!

I don't know for sure, but I think this is caused by for some reason the Machine Key has changed for our web application.
I guess this could change for several reasons, a "simple" one is a re-install of the web-server (new hardware) and then give the new server the same name.

I could easily reproduce this error by changing the Machine Key manually.

The following will happen when changing the Machine Key:
All links to WebResource.axd will be changed, BUT if using combined css with telerik, the combined css link will NOT change, it still looks like:
Telerik.Web.UI.WebResource.axd?compress=1&_TSM_CombinedScripts_=%3b%3bTelerik.Web.UI%2c+Version%3d2013.3.1029.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3ac2b8033d-3a83-4465-9875-b583e310bb14%3aed2942d4

And inside that css are links to background images that leads to an invalid WebResource.axd!!!

To solve this, the combined link should also in some way be different if a different Machine Key!

Regards
Andreas
Aneliya Petkova
Telerik team
 answered on 24 Jul 2014
2 answers
211 views
Good Day 

i am using a Tab-Strib with Multipage Views. I have a SubTab and when the Main Tab is being Selected the Subtab contents still show. 
Here is the example running Project http://www.audit.vetauinvest.com/default.aspx  and here is my code below. The name of the tab with a Sub is "Risk Assessment" after clicking it , click on the any main Tab like "Audit Planning" you will notice that the contents of the SubTab still show.  

<div class="exampleWrapper"   style="margin-top:10px;margin-left:50px;">
    <telerik:RadTabStrip runat="server" ID="RadTabStrip1" MultiPageID="MainMenu" SelectedIndex="0"  UnSelectChildren="True" ClickSelectedTab="True" EnableSubLevelStyles="True">
        <Tabs>
            <telerik:RadTab Text="Risk Assessments" Width="180px" >
 
            </telerik:RadTab>
            <telerik:RadTab Text="Audit Planning" Width="180px" Selected="True"></telerik:RadTab>
            <telerik:RadTab Text="Audit Execution" Width="180px"></telerik:RadTab>
            <telerik:RadTab Text="Draft Report" Width="180px"></telerik:RadTab>
            <telerik:RadTab Text="Management comments" Width="200px"></telerik:RadTab>
            <telerik:RadTab Text="Audit Rating" Width="180px" Selected="True"></telerik:RadTab>
            <telerik:RadTab Text="Final report" Width="180px"></telerik:RadTab>
            <telerik:RadTab Text="Follow Ups" Width="180px" Selected="True"></telerik:RadTab>
        </Tabs>
    </telerik:RadTabStrip>
    <!--Risk Assessment Multi View -->
 
    <telerik:RadMultiPage ID="MainMenu" runat="server"  SelectedIndex="0" CssClass="outerMultiPage"  >
        <telerik:RadPageView  Height="100%" runat="server" ID="PageView1">
 
            <telerik:RadTabStrip runat="server" ID="RiskAssessmentSubTab" CssClass="innerMultiPage" MultiPageID="MultiPageRiskAssessmentSubMenu"  SelectedIndex="0" >
                <Tabs>
                    <telerik:RadTab runat="server" Text="Risk Heatmap" >
                    </telerik:RadTab>
                    <telerik:RadTab runat="server" Text="Risk Assessment Criteria">
                    </telerik:RadTab>
                    <telerik:RadTab runat="server" Text="Detailed Plan">
                    </telerik:RadTab>
                    <telerik:RadTab runat="server" Text="Inherent Risk Score Explanation">
                    </telerik:RadTab>
                    <telerik:RadTab runat="server" Text="Controls Risk Score Explanation">
                    </telerik:RadTab>
                    <telerik:RadTab runat="server" Text="Help">
                    </telerik:RadTab>
                </Tabs>
            </telerik:RadTabStrip>
        </telerik:RadPageView>
        <telerik:RadPageView runat="server" ID="PageAuditPlanning">
            Audit Planning
        </telerik:RadPageView>
        <telerik:RadPageView runat="server" ID="PageAuditExecution">
            Audit Execution
        </telerik:RadPageView>
        <telerik:RadPageView runat="server" ID="PageDraftReport">
            Draft Report
        </telerik:RadPageView>
        <telerik:RadPageView runat="server" ID="PageManagementcomments">
            Management comments
        </telerik:RadPageView>
        <telerik:RadPageView runat="server" ID="PageAuditRating">
            Audit Rating
        </telerik:RadPageView>
        <telerik:RadPageView runat="server" ID="PageFinalreport">
            Final report
        </telerik:RadPageView>
        <telerik:RadPageView runat="server" ID="PageFollowUps">
            Follow Ups
        </telerik:RadPageView>
    </telerik:RadMultiPage>
 
    <telerik:RadMultiPage runat="server" ID="MultiPageRiskAssessmentSubMenu" SelectedIndex="0" CssClass="innerMultiPage"  >
 
        <!--Main Views -->
        <telerik:RadPageView   Height="100%" runat="server" ID="PageRiskHeatmap">
         Risk Heatmap
        </telerik:RadPageView>
        <telerik:RadPageView runat="server" ID="PageRiskAssessmentCriteria">
        Risk Assessment Criteria
        </telerik:RadPageView>
        <telerik:RadPageView runat="server" ID="PageDetailedPlan">
        Detailed Plan
        </telerik:RadPageView>
        <telerik:RadPageView runat="server" ID="PageInherentRiskScoreExplanation">
        Inherent Risk Score Explanation
        </telerik:RadPageView>
        <telerik:RadPageView runat="server" ID="PageControlsRiskScoreExplanation">
        Controls Risk Score Explanation
        </telerik:RadPageView>
        <telerik:RadPageView runat="server" ID="PageHelp">
        Help
        </telerik:RadPageView>
 
    </telerik:RadMultiPage>
</div>
 

i will keep on looking for a solution while one of you point out the issue. 

Thanks for the help again

Vuyiswa
Top achievements
Rank 2
 answered on 24 Jul 2014
1 answer
84 views
How can i specify an area in a image in image editor on that we can attach another image or insert text on the other portion we will not be able to add anything and another problem is how can i show the rectangular portion using dotted line on that image to let user know what portion designates what? please help me.
for more details check this site :
http://www.customink.com/lab#shared
i want to create image editor like the above one.
Thank u .  
Vessy
Telerik team
 answered on 24 Jul 2014
1 answer
95 views
hello

Iam using telerik report viewer in sharepoint 2013

Report does not display and also Report viewer is missing icons.


below is attach image.

please help to solve this problem.



thanks
Kishor
Top achievements
Rank 2
 answered on 24 Jul 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?