Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
200 views
Hello!
  I have a problem regarding use of EditFormSettings with FormTemplate and NestedViewTemplate in same RadGrid. It seems NestedViewTemplate tempers with FormTemplate in edit mode so the whole EditTemplate is off.

For easier understanding I added two pictures. The one named withoutnestedview.jpg shows the grid with EditFormSettings FormTemplate and has no NestedViewTemplate properties, and the other has NestedViewTemplate code in the grid. And I mean literally just the code <NestedViewTemplate></NestedViewTemplate> and nothing else.

I searched the forum and did't find any similar problems. Is there a workaround am I doing something wrong ?

Thanx,
Grega

Veli
Telerik team
 answered on 11 Mar 2010
5 answers
162 views
Hello,

is there a way to select all items in a group on clientside? I tried the following code but without any success.

Best regards,
Dominic

The Grid:

<

 

telerik:RadGrid ID="radGrid" AllowMultiRowSelection="true" ...>

 

 

<MasterTableView ...>

 

 

<GroupByExpressions>

 

 

<telerik:GridGroupByExpression>

 

 

<SelectFields>

 

 

<telerik:GridGroupByField FieldAlias="Zyklus" FieldName="Cycle" HeaderValueSeparator=": ">

 

 

</telerik:GridGroupByField>

 

 

</SelectFields>

 

 

<GroupByFields>

 

 

<telerik:GridGroupByField FieldName="Cycle" />

 

 

</GroupByFields>

 

 

</telerik:GridGroupByExpression>

 

 

</GroupByExpressions>

 

 

<Columns>

 

 

<telerik:GridClientSelectColumn UniqueName="appliedColumn" HeaderText="verabreicht" />
...

Inside the ItemDataBound Event

 

if

 

( e.Item is GridGroupHeaderItem )

 

{

 

    GridGroupHeaderItem item = ( GridGroupHeaderItem )e.Item;

 

 

    CheckBox check = new CheckBox();

 

    check.ID =

"CheckAll";

 

    check.Attributes.Add(

"onclick", "headerClick(this)");

 

    check.Text =

"Auswahl aller Anwendungen des Zyklus umkehren.";

 

    item.DataCell.Controls.Add( check );

}

The Javascipt:

 

function

 

headerClick(e)

 

{

 

var masterTable = $find( "ctl00_MasterContent_therapyFormView_tumourTherapy_therapyRadGrid" ).get_masterTableView();

 

 

var element = $(e).parent().parent().parent();

 

 

var children = $(element).find("~ tr");

 

 

for (var a = 0; a<children.length;a++)

 

{

 

if ($(children[a]).attr("class") == "rgRow" || $(children[a]).attr("class") == "rgAltRow" || $(children[a]).attr("class") == "rgRow rgSelectedRow" || $(children[a]).attr("class") == "rgAltRow rgSelectedRow")

 

{

 

if( e.checked ) {

 

masterTable.selectItem( $(children[a])[0] );

}

 

else {

 

masterTable.deselectItem( $(children[a])[0] );

}

}

 

else if ($(children[a]).attr("class") == "rgGroupHeader")

 

{

 

break;

 

}

}

}

Martin
Telerik team
 answered on 11 Mar 2010
1 answer
158 views
I have added some custom fields and bound them to  datasources.

<AdvancedForm Modal="true" Width="400" MaximumHeight="400" /> 
 
<ResourceTypes> 
 
<telerik:ResourceType KeyField="AccountNumber" Name="AccountNumber" TextField="AccountName" ForeignKeyField="AccountNumber"   
 
DataSourceID="sdsAccounts" /> 
 
<telerik:ResourceType KeyField="ContactNumber" Name="ContactNumber" TextField="ContactName" ForeignKeyField="ContactNumber" 
 
DataSourceID="sdsContacts" /> 
 
<telerik:ResourceType KeyField="TaskType" Name="Type" TextField="TaskType" ForeignKeyField="TaskType" 
 
DataSourceID="sdsTaskTypes" /> 
 
<telerik:ResourceType KeyField="TaskAction" Name="Action" TextField="TaskAction" ForeignKeyField="TaskAction" 
 
DataSourceID="sdsTaskActions" /> 
 
<telerik:ResourceType KeyField="RepNumber" Name="For" TextField="RepName" ForeignKeyField="For" 
 
DataSourceID="sdsReps" /> 
 
<telerik:ResourceType KeyField="RepNumber" Name="By" TextField="RepName" ForeignKeyField="By" 
 
DataSourceID="sdsReps" /> 
 
<telerik:ResourceType KeyField="PriorityText" Name="Priority" TextField="PriorityText" ForeignKeyField="PriorityText" 
 
DataSourceID="sdsPriority" /> 
 
</ResourceTypes>   
 

This is working but when the form loads each datasource has a blank value by default.  This blank value will mess up my SQL.
They are integer fields ich would need a value of   zero

I just want to get rid of the blank so only items in the datasource can be selected.

So i added:

    Protected Sub RadScheduler1_FormCreated(ByVal sender As Object, ByVal e As SchedulerFormCreatedEventArgs)  
 
 
        If e.Container.Mode = SchedulerFormMode.AdvancedEdit Then  
            Dim ddlContactNumber As RadComboBox = DirectCast(e.Container.FindControl("ContactNumber"), RadComboBox)  
            ddlContactNumber.Items.Remove(0)  
 
 
            Dim ddlAccountnumber As RadComboBox = DirectCast(e.Container.FindControl("Accountnumber"), RadComboBox)  
            ddlAccountnumber.Items.Remove(0)  
 
 
        End If  
    End Sub 

This tells me that it can not find the control by those names.  Am i referencing the names wrong ?


I can cause problems on your sample page as well.
http://demos.telerik.com/aspnet-ajax/scheduler/examples/outlook2007/defaultcs.aspx
If I edit one of the items and choose "" blank for the Calendar - that item goes into oblivion.





robertw102
Top achievements
Rank 1
 answered on 11 Mar 2010
2 answers
147 views
hi all:
  I tried to add RadCalendar and RadCombox to my application . I got the error "Error creating control". I tried to unistall telerik control then re install. I still got the same error. I added the Telerik.web.ui control under the Global assemble but I still get the same error

Did I miss any thing on my PC when I download Telerik control? Please see attached screen shot


Thanks
Helena
HL
Top achievements
Rank 1
 answered on 11 Mar 2010
1 answer
81 views
Are the partial white underline and square bottom corners of the decorated buttons in the Forest theme for the Q1 2010 release intentional?
Petio Petkov
Telerik team
 answered on 11 Mar 2010
2 answers
379 views
I'm having overflow problems in my rad docks.  They are in a user control (in an update panel), in a content page which is in a master page.  My control is generating all the rad docks dynamically.  The rad docks are overflowing the containers they are in, but my other controls are obeying the rules. 

Screen Shot 1
Master Page

 

<td> 
 <div id="MainDiv">  
  <asp:ContentPlaceHolder ID="MainPlaceHolder" runat="server">  
  </asp:ContentPlaceHolder> 
 </div> 
</td> 
------ CSS setting  
#MainDiv  
{  
    height: 458px;  
} 


Screen Shot 2
Master page has a control panel added to facilitate fitting in the allowed area.  You can see how the Rad Docks overflow above the control container.  They also overflow below the container too.  Other controls (labels, buttons, etc..) will not appear in the overfow area.  The same effect appears no matter if I put the panel control in the master page, content page, or in the user control.

 

 

            <td> 
                <div id="MainDiv">  
                <asp:Panel ID = "null3kd98" runat="server" Height="100%" ScrollBars="Vertical">  
                    <asp:ContentPlaceHolder ID="MainPlaceHolder" runat="server">  
                    </asp:ContentPlaceHolder> 
                    </asp:Panel> 
                </div> 
            </td> 


Here is my rad dock layout control in the user control

 

 

<div id="div_PrioritizePriorities">  
   <asp:UpdatePanel runat="server" ID="up1">  
 
      <ContentTemplate> 
            <telerik:RadDockLayout ID="RadDockLayout1" runat="server" 
               OnSaveDockLayout="RadDockLayout1_SaveDockLayout" 
               OnLoadDockLayout="RadDockLayout1_LoadDockLayout">  
                 
               <div id="div_rdZoneMain">  
                  <p class="p_ZoneHeader">  
                     Current Widgets  
                  </p> 
                  <telerik:RadDockZone ID="rdZoneMain" runat="server" minHeight="180px"   
                     Width="100%" BorderStyle="None">  
                  </telerik:RadDockZone> 
               </div> 
                 
               <div id="div_rdZoneNew">  
                  <p class="p_ZoneHeader">  
                     New Widgets  
                  </p> 
                  <telerik:RadDockZone ID="rdZoneNew" runat="server" minHeight="180px"   
                     Width="100%" BorderStyle="None">  
                  </telerik:RadDockZone> 
                    
               </div> 
                 
               <div id="div_rdZoneHidden2" class="div_rdZoneHidden2" runat="server">  
                  <p class="p_ZoneHeader">  
                     Hidden Widgets  
                  </p> 
                  <telerik:RadDockZone ID="rdZoneHidden" runat="server" width="100%" MinHeight="30px" 
                     BorderStyle="None" /> 
               </div> 
            </telerik:RadDockLayout> 
      </ContentTemplate> 
        
      <Triggers> 
         <asp:AsyncPostBackTrigger ControlID="ibToggleCollapseAll" EventName="Click" /> 
         <asp:AsyncPostBackTrigger ControlID="cbShowImpact" EventName="checkedchanged" /> 
         <asp:AsyncPostBackTrigger ControlID="cbShowIssues" EventName="checkedchanged" /> 
      </Triggers> 
           
   </asp:UpdatePanel> 
</div> 
 



What can I do to get my rad docks to obey their containers?

Adam Heeg
Top achievements
Rank 1
 answered on 11 Mar 2010
1 answer
135 views
We have a very annoying issue with the RadAjaxManager and RadAjaxLoadingPanel controls.

When two or more Ajax requests are sent, two or more RadAjaxLoadingPanels are shown and only the first one is hidded... so the other AjaxLoadingPanel stay on screeen... letting the user know that the application is crashed or blocked...

The bug can be easily reproduced with onlne Telerik samples pages.

For exemple with this page :
http://demos.telerik.com/aspnet-ajax/ajax/examples/loadingpanel/explicitshowhide/defaultcs.aspx

- Clicking a day in the calendar produce a postback with a LoadingPanel => OK
- Clicking the "Clear Selected Dates" produce a postback with a LoadingPanel => OK
- Clicking a day in the calendar then clicking the "Clear Selected Dates"  before the first RadAjaxPanel is hidded make the second RadAjaxLoading panel loops infinitly => BUG

Hope this bug will be fixed soon,

Best regards,
Iana Tsolova
Telerik team
 answered on 11 Mar 2010
1 answer
95 views
Hi

Can anyone throw some light on the following:

I need to add a tool bar that is visible across all the pages in the web site .. so I created a user control(.ascx file) with only a rad toolbar and all its items and added to the master page.

Questions:

1. Is there a way to enable and disable the items in the tool bar depending on some settings or values on the content pages.
2. I have items like print,save,back etc can I have client side java script functions do the handling for me? right now this is how i am doing it:

protected void RadToolBar1_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e)
        {
            if (e.Item.Value == "Back")
            {
                Response.Write("<script type='text/javascript'>history.go(-1);</script>");  -- This isn't working though
            }

            if (e.Item.Value == "Print")
            {
                Response.Write("<script type='text/javascript'>window.print();</script>");
                
            }

        }
I appreciate any help.

Thanks
Yana
Telerik team
 answered on 11 Mar 2010
1 answer
263 views
Hi,

I am using a master content page.  I am able to find the controls on content page which are outside AjaxPanel but not which are inside.


<%

@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" MasterPageFile="~/MasterPage.master" %>

 

<%

@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

 

<

 

asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server" ID="Cnt1">

 

<

 

telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnablePageMethods="true"></telerik:RadScriptManager>

 

 

 


<
asp:TextBox ID="txtTest" runat="server" Text="abc">

 

 

</asp:TextBox>

 

 

<telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" LoadingPanelID="LoadingPanel1">

 

 

<telerik:RadTextBox ID="txtRad" runat="server" Text="xyz"></telerik:RadTextBox>

 

 

</telerik:RadAjaxPanel>
<

 

script type="text/javascript">

 

alert(document.getElementById(

"<%=txtRad.ClientID%>").value);

 

 

</script>

 

 

 

</asp:Content>


I am getting error

 

 "The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). "

Below is my Master Page code

 

<%

@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>

 

<%

@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

 

<!

 

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>Untitled Page</title>

 

 

<asp:ContentPlaceHolder id="head" runat="server">

 

 

</asp:ContentPlaceHolder>

 

</

 

head>

 

<

 

body>

 

 

<form id="form1" runat="server">

 

 

<div>

 

 

<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">

 

 

 

</asp:ContentPlaceHolder>

 

 

</div>

 

 

</form>

 

</

 

body>

 

</

 

html>

 

 

 

How to find the control in RadAjaxPanel??

robertw102
Top achievements
Rank 1
 answered on 11 Mar 2010
3 answers
209 views
I have a RadGrid that is bound to a DataSet. On each row I have GridTemplateColumns with a LinkButton with the CommandName "Delete".

When clicking the link, the grid posts back data with Ajax and I expect it to catch the click event.

However, when buttons are placed inside the grid, the first event on postback is not the ItemCreated-event, instead the first event is PageLoad. It doesn't look like the grid fires the event sequence described here:
http://www.telerik.com/help/aspnet-ajax/grdeventsequence.html

If I trigger a postback with controls that are positioned outside the grid, the sequence is fired as expected with the ItemCreated event executed first.

It seems that all rows in the grid are lost during postback. Any ideas about how to track this problem down?

Thanks,
Martin
Radoslav
Telerik team
 answered on 11 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?