Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
390 views
Hi,
There tons of sample for "get a control in an itemtemplate with javascript". But I have a problem.

I have a grid like below. When cbAllCanSelect is checked, I try to find all checkboxes in a column and check them all.

<telerik:RadGrid ID="rgOptions" runat="server" AutoGenerateColumns="False"
            ResolvedRenderMode="Classic" AllowMultiRowEdit="True">
            <MasterTableView>
                <Columns>
                    <telerik:GridBoundColumn DataField="KARAKTERTANIM"
                        FilterControlAltText="Filter column column" HeaderText="Option"
                        UniqueName="column">
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn FilterControlAltText=""
                        HeaderText="Selection" UniqueName="TemplateColumn">
                        <ItemTemplate>
                            <asp:HiddenField ID="hfKarakter" runat="server" Value = '<%# Eval("KARAKTER") %>'/>
                            <asp:CheckBox ID="cbCanSelect" runat="server"   Checked = '<%#bool.Parse( Eval("CANSELECT").ToString()) %>'/>
                        </ItemTemplate>
                        <HeaderTemplate>
                            <telerik:RadButton ID="cbAllCanSelect" runat="server" ToggleType="CustomToggle" ButtonType="ToggleButton"
               AutoPostBack="false" onclienttogglestatechanged="toggleCanSelectCheckBoxes">
               <ToggleStates>
                    <telerik:RadButtonToggleState Text="" PrimaryIconCssClass="rbToggleCheckbox">
                    </telerik:RadButtonToggleState>
                    <telerik:RadButtonToggleState Text=""  PrimaryIconCssClass="rbToggleCheckboxFilled">
                    </telerik:RadButtonToggleState>
                    <telerik:RadButtonToggleState Text=""  PrimaryIconCssClass="rbToggleCheckboxChecked">
                    </telerik:RadButtonToggleState>
               </ToggleStates>
          </telerik:RadButton>
                        </HeaderTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>



My script (ignore button toogle and just check them all):

function toggleCanSelectCheckBoxes(sender, args) {
            //alert(sender.get_selectedToggleState().get_index());
 
            var dataItems = $find('<%=rgOptions.ClientID%>').get_masterTableView().get_dataItems();
            for (var i = 0; i < dataItems.length; i++) {
                var cb = dataItems[i].findControl("cbCanSelect");
                alert(cb);
                if (cb != null)
                    cb.checked = true;
            }
        }



I cant find "cbCanSelect". "cb" is always return null.

What is my mistake?

Thanks a lot.
Eyup
Telerik team
 answered on 09 Dec 2014
4 answers
55 views
 Hello,

I have three radgirds in RadTabStrip (1 grid in 1 tab), I want to achive the resize to fit facility. so I have written following code with "AllowColumnResize='True' AllowRowResize='false' ResizeGridOnColumnResize='true' AllowResizeToFit='true'" property settings of grid.

var grdstQ = $find("<%= Grid1.ClientID %>");
                    var clmstQ = grdstQ.get_masterTableView().get_columns();
                    for (var i = 0; i < clmstQ.length; i++) {
                        clmstQ[i].resizeToFit(false, true);
                    }

I have applied the above code solution for all three grids, the first grid in tab working fine but columns in other two grids disappeared after apply the same solution.

Please suggest, I am not getting how to resolve this strange issue.

Thanks in advance.

Regards,
Vishal
vishal
Top achievements
Rank 1
 answered on 09 Dec 2014
2 answers
103 views
Can someone please explain why this code does nothing on my page? 


public partial class SettingsDialog : System.Web.UI.Page
{
 
    public RadSkinManager rsm;
 
    protected void Page_Load(object sender, EventArgs e)
    {
        rsm = new RadSkinManager();
        rsm.Skin = "Glow";
        Form.Controls.Add(rsm);
         
    }
}
Al
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 09 Dec 2014
7 answers
106 views
I am using the RadScheduler for a website that will display bar events. Many of these events will end after midnight. I am trying to avoid having such events appear across 2 days on the calendar when in Month or Week view. Is there a way to do this? Can the Scheduler be configured so that days start at 6:00AM and end at 5:59AM?

Thanks for any help.
Boyan Dimitrov
Telerik team
 answered on 09 Dec 2014
0 answers
95 views
Hi,
I have a database sql server on the remote web server, there are some tables that contain thousands of data on which I have to do some research display.
My question is the following, for example, using a control radcombobox, which technique is faster to load and display the data?

1) SqlDataSource
2) Entity datasouce
3) Web Service?

thanks
Fabio Cirillo
Top achievements
Rank 1
 asked on 09 Dec 2014
1 answer
198 views
I am trying to create a Bubble chart but when bubbles occupy the same space the series labels are rendered on top of each other.

Is there anyway to keep this from happening.  Maybe add some sort of offset?
Danail Vasilev
Telerik team
 answered on 09 Dec 2014
2 answers
86 views
LS,

After changing the value of the property 'ClientSettings-Scrolling-AllowVerticalScroll" to "true" the layout of the grid changes in an undesired way.
(Check the images).

The width of the second header column cannot hold the text anymore. The second header column seems to be rendered with the width of the first (85px) and vice versa (300px).


I'm fairly new to this control and have no idea why such a simple change has such an impact. I must be doing something else wrong but i cannot find anything strange in the code (provided below).

Anyone any idea why the grid behaves like this?


<telerik:RadPivotGrid ID="pivControles" runat="server"
                      Skin="Metro"
                      AllowSorting="true"
                      AllowPaging="false"
                      RowGroupsDefaultExpanded="false"
                      TotalsSettings-RowGrandTotalsPosition="Last"
                      TotalsSettings-RowsSubTotalsPosition="None"
                      TotalsSettings-ColumnsGrandTotalsPosition="Last"
                      TotalsSettings-ColumnsSubTotalsPosition="None"
                      TotalsSettings-GrandTotalsVisibility="RowsAndColumns"
                      OnNeedDataSource="PivControles_NeedDataSource"
                      OnItemCommand="PivControles_ItemCommand"
                      OnCellDataBound="pivControle_CellDataBound"
                      ShowFilterHeaderZone="false"
                      ShowColumnHeaderZone="false"
                      ShowRowHeaderZone="false"
                      ShowDataHeaderZone="false"
                      EnableToolTips="true"
                      ClientSettings-ClientEvents-OnToolTipShow="showToolTip"
                      ClientSettings-ClientEvents-OnCellMouseOut="CellMouseOut"
                      ClientSettings-ClientEvents-OnCellMouseOver="CellMouseOver"
                      ClientSettings-Scrolling-AllowVerticalScroll="true" >
                    <Fields>
                        <telerik:PivotGridColumnField DataField="SpecialismeOmschrijving"
                                                      CellStyle-BackColor="#F0F0F0"
                                                      Caption="Specialisme"
                                                      UniqueName="Specialisme" />
                        <telerik:PivotGridRowField DataField="ClusterIdEnCode"
                                                   ShowGroupsWhenNoData="false"
                                                   CellStyle-Width="85px"
                                                   CellStyle-BackColor="#F0F0F0"
                                                   Caption="Cluster" />
                        <telerik:PivotGridRowField DataField="ControleCodeEnOmschrijving"
                                                   CellStyle-CssClass="controleomschrijvingcell"
                                                   Caption="Controle" 
                                                   CellStyle-Width="300px"
                                                   CellStyle-BackColor="#F0F0F0" />
                        <telerik:PivotGridAggregateField DataField="AantalControleResultaten"
                                                         Caption="Aantal resultaten"
                                                         Aggregate="Sum"
                                                         CellStyle-CssClass="pivotcell">
                            <CellTemplate>
                                <asp:LinkButton ID="btnGoToWerklijst" runat="server" 
                                                onmouseover="BtnMouseOver(this)"
                                                onmouseout="BtnMouseOut(this)"
                                                ForeColor="#153291" 
                                                Text="<%# Container.DataItem %>" />
                            </CellTemplate>
                        </telerik:PivotGridAggregateField>
                    </Fields>
</telerik:RadPivotGrid>

Galin
Telerik team
 answered on 09 Dec 2014
4 answers
198 views
Hi,

I have many error with the constructor of 'Telerik.Web.UI.ExternalScriptHelper'.
I can not reproduce this error in local, and we only have it from time to time in production
So I need your help to understand what could cause that.

In my call stack I have this.
This call stack was created with DebugDiag v2.0

[[GCFrame]][[PrestubMethodFrame] (Telerik.Web.UI.ExternalScriptHelper.ResolveSecurePath)] Telerik.Web.UI.ExternalScriptHelper.ResolveSecurePath(System.String)Telerik.Web.UI.RadScriptManager.OnResolveScriptReference(System.Web.UI.ScriptReferenceEventArgs)+19dSystem_Web_Extensions_ni!System.Web.UI.ScriptManager.RegisterScripts()+10fSystem_Web_Extensions_ni!System.Web.UI.ScriptManager.OnPagePreRenderComplete(System.Object, System.EventArgs)+c8[[MulticastFrame] (System.EventHandler.Invoke)] System.EventHandler.Invoke(System.Object, System.EventArgs)System_Web_ni!System.Web.UI.Page.OnPreRenderComplete(System.EventArgs)+aa368eSystem_Web_ni!System.Web.UI.Page.ProcessRequestMain(Boolean, Boolean)+e58System_Web_ni!System.Web.UI.Page.ProcessRequest(Boolean, Boolean)+a0System_Web_ni!System.Web.UI.Page.ProcessRequest()+5bSystem_Web_ni!System.Web.UI.Page.ProcessRequest(System.Web.HttpContext)+f0ASP.catalog_learner_home_aspx.ProcessRequest(System.Web.HttpContext)+9System_Web_ni!System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()+257System_Web_ni!System.Web.HttpApplication.ExecuteStep(IExecutionStep, Boolean ByRef)+abSystem_Web_ni!System.Web.HttpApplication+PipelineStepManager.ResumeSteps(System.Exception)+511System_Web_ni!System.Web.HttpApplication.BeginProcessRequestNotification(System.Web.HttpContext, System.AsyncCallback)+72System_Web_ni!System.Web.HttpRuntime.ProcessRequestNotificationPrivate(System.Web.Hosting.IIS7WorkerRequest, System.Web.HttpContext)+269System_Web_ni!System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32)+411System_Web_ni!System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32)+2bSystem_Web_ni!DomainNeutralILStubClass.IL_STUB(Int64, Int64, Int64, Int32)+24System_Web_ni!DomainNeutralILStubClass.IL_STUB(IntPtr, System.Web.RequestNotificationStatus ByRef)+4b[[NDirectMethodFrameStandalone] (System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion)] System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr, System.Web.RequestNotificationStatusByRef)System_Web_ni!System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32)+540System_Web_ni!System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32)+2bSystem_Web_ni!DomainNeutralILStubClass.IL_STUB(Int64, Int64, Int64, Int32)+24[[ContextTransitionFrame]]


Exception Type   MessageStack TraceRemote Stack Trace34System.TypeInitializationException   Une exception a été levée par l'initialiseur de type pour 'Telerik.Web.UI.ExternalScriptHelper'.    Remote Stack Trace not available


In this Dump I have also some other error.
Telerik.Web.UI.ConfigurationSettingMissingException   1   <none>   Telerik.Web.UI.ExternalScriptHelper..cctor()
System.OutOfMemoryException   1   <none>   Telerik.Web.UI.ExternalScriptHelper..cctor()
   System.StackOverflowException   1   <none>   Telerik.Web.UI.ExternalScriptHelper..cctor()
   System.ExecutionEngineException   1   <none>   Telerik.Web.UI.ExternalScriptHelper..cctor()
   System.Threading.ThreadAbortException   2   <none>   Telerik.Web.UI.ExternalScriptHelper..cctor()
   

christophe
Top achievements
Rank 1
 answered on 09 Dec 2014
0 answers
106 views
Hi Telerik Team,

I am getting the Error while Executing the Stored Procedure regarding Time out Error, While Generating Telerik Reports.

Would you please suggest to me if any idea regarding Time out Error.

below is the screenshot for this

I am using Softwares are: MY SQL Workbench 6.0 CE

                                          MY SQL Server 5.7.
                                          MY SQL Connector Net 6.3.5









Venkateswarlu
Top achievements
Rank 1
 asked on 09 Dec 2014
1 answer
278 views
We are suddenly receiving the error detailed below but I am unable to determine the cause. The Telerik assembly is from 2011 so it is a few years old.

Exception Details: System.Reflection.TargetParameterCountException: Parameter count mismatch.

Stack Trace: 
[TargetParameterCountException: Parameter count mismatch.]
System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +10910101
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +54
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
Talifun.Web.Compress.Decryptor.DecryptString(String input) +217
Talifun.Web.Compress.WebResourceCompressionModule.GetDataFromQuery(NameValueCollection queryString) +141
[HttpException (0x80004005): This is an invalid webresource request.]
Talifun.Web.Compress.WebResourceCompressionModule.GetDataFromQuery(NameValueCollection queryString) +312
Talifun.Web.Compress.WebResourceCompressionModule.OnPreRequestHandlerExecute(Object sender, EventArgs e) +259
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18408
Pavlina
Telerik team
 answered on 09 Dec 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?