Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
247 views
I am using this code:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
    <telerik:AjaxSetting AjaxControlID="RadComboBox1">
        <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel" />
            <telerik:AjaxUpdatedControl ControlID="Label1" />
        </UpdatedControls>
    </telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
 
<telerik:RadAjaxPanel ID="RadAjaxPanel" runat="server">
    
    <telerik:RadComboBox ID="RadComboBox1" runat="server"
        onselectedindexchanged="RadComboBox1_SelectedIndexChanged" AutoPostBack="True">
        <Items>
            <telerik:RadComboBoxItem runat="server" Text="item1"
                Value="RadComboBoxItem1" />
            <telerik:RadComboBoxItem runat="server" Text="item2"
                Value="RadComboBoxItem2" />
            <telerik:RadComboBoxItem runat="server" Text="item3"
                Value="RadComboBoxItem3" />
            <telerik:RadComboBoxItem runat="server" Text="item4"
                Value="RadComboBoxItem4" />
            <telerik:RadComboBoxItem runat="server" Text="item5"
                Value="RadComboBoxItem5" />
            <telerik:RadComboBoxItem runat="server" Text="item6"
                Value="RadComboBoxItem6" />
        </Items>
    </telerik:RadComboBox>
 
    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
 
</telerik:RadAjaxPanel>

inside a .ascx file and I keep getting the 'The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>) ' error.  Any suggestion on how to fix this?


Maria Ilieva
Telerik team
 answered on 18 Jun 2014
1 answer
209 views
Hi,

I updated my RadTabStrip and RadMultiPage controls ajax manager per this - http://demos.telerik.com/aspnet-ajax/tabstrip/examples/application-scenarios/ajax-enabled-tabstrip-and-multipage/defaultcs.aspx

But now on one of the .ascx pages where I have several Ajaxified RadGrids the controls in the grid won't post? The ajaxmanager on the page is question looks like this:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
             <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">  
                    <UpdatedControls>  
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />  
                                <telerik:AjaxUpdatedControl ControlID="RadGrid3" />  
                                <telerik:AjaxUpdatedControl ControlID="RadGrid4" />  
                    </UpdatedControls>  
                </telerik:AjaxSetting>  
            <telerik:AjaxSetting AjaxControlID="RadGrid4">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadWindow1" />
                    <telerik:AjaxUpdatedControl ControlID="RadWindow2" />
                    <telerik:AjaxUpdatedControl ControlID="RadGrid3" UpdatePanelCssClass="" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadGrid2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadWindow2" />
                    <telerik:AjaxUpdatedControl ControlID="Label1" UpdatePanelCssClass="" />
                    <telerik:AjaxUpdatedControl ControlID="RadGrid2" />
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" UpdatePanelCssClass="" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid2" UpdatePanelCssClass="" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
Maria Ilieva
Telerik team
 answered on 18 Jun 2014
7 answers
384 views
Dear All,

I've been struggling to make RadGrid work with UseStaticHeaders and FrozenColumnsCount properties set. It was working yesterday before we introduced any client-side functionality and today we realized that it wasn't working correctly.

With hours of research in Google, we were not able to find any remedy for the behaviour.

Issue
Column headers won't scroll horizontally in RadGrid although following parameters are set :
AllowScroll="true" SaveScrollPosition="true" UseStaticHeaders="true" FrozenColumnsCount="1"

Remedy
During our development, we have assigned grid's ClientIDMode="Static". Having a static ClientID was the cause of this wierd problem. Once removed, horizontal scrolling was back to normal (as well as frozen columns).

Maybe it will help someone with similar issue.

Kind Regards,

OZAN GUNCELER
Vasil
Telerik team
 answered on 18 Jun 2014
5 answers
259 views
orgchart with image i have to show the images but problem is condition based visible true/false the images 
   
 please provide me sample code 
Plamen
Telerik team
 answered on 18 Jun 2014
8 answers
916 views
Hi,

For this:

<telerik:GridTemplateColumn 
    UniqueName="Value" 
    HeaderText="Values">      
    <HeaderTemplate>     
        <asp:Label 
            Text="Value" 
            runat="server">
        </asp:Label>     
    </HeaderTemplate>     
    <ItemTemplate>     
        <asp:Label 
            ID="CurrentValues" 
            runat="server" 
            Text='<%# Eval("Values") %>'>
        </asp:Label>     
    </ItemTemplate>     
    <EditItemTemplate>     
        <telerik:RadListBox 
            ID="Values" 
            runat="server" 
            DataTextField="ValueTitle" 
            DataValueField="ValueId">
        </telerik:RadListBox>     
    </EditItemTemplate>     
</telerik:GridTemplateColumn>

On firing, OnItemDataBound, this works:

var gridEditFormItem = (GridEditFormItem)e.Item;
  
var radListBox = (RadListBox)gridEditFormItem["Value"].FindControl("Values");

But this does not (Label is null):

var label = (Label)gridEditFormItem["Value"].FindControl("CurrentValues");

I can't see the wood for the trees, I think. Why can't I get a reference to the label?

Thanks,
Richard
Shinu
Top achievements
Rank 2
 answered on 18 Jun 2014
1 answer
92 views
I've got radgrid control which is inside a user ascx file. I'm doing this because I should use radgrid in mvc(so there is no other way - is should wrap it in user control)3

So can someone help me - is it possible to show the nesteditemtemplate because when I click the button infront of each row nothing happens



<%@ Control Language="C#" AutoEventWireup="true" Inherits="MvcBeaWeb.ProductsShowTile" CodeFile="ProductsShowTile.ascx.cs" %>
<%@ Import Namespace="MvcBeaWeb" %>
<%@ Register Assembly="Telerik.Web.UI" TagPrefix="telerik" Namespace="Telerik.Web.UI" %>
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>


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

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" >
</telerik:RadScriptManager>
  
     <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanelTilesShow" LoadingPanelID="RadAjaxLoadingPanelTilesShow"
         HorizontalAlign="Center"   Width="472px" >
         <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="radGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="radGrid1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
         <div class="mainHolder">
                 <div class="qsf-ib tileListHolder">        
                      <telerik:RadGrid runat="server" OnPreRender="RadGrid1_PreRender" OnItemCommand="RadGrid1_ItemCommand" OnNeedDataSource="RadGrid1_NeedDataSource" ID="RadGrid1" AutoGenerateColumns="false" AllowCustomPaging="true" AllowPaging="true" PageSize="3" OnPageIndexChanged="RadGrid1_PageIndexChanged1">                        <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom"  PageSizeControlType="RadComboBox" ></PagerStyle>
                             <MasterTableView>
                                <Columns>
                                      <telerik:GridBoundColumn DataField="ArticlegroupID"  UniqueName="101">                           
                                      </telerik:GridBoundColumn>
                                 
                                       <telerik:GridBoundColumn DataField="SpecialWord" HeaderText="ProductDescription" UniqueName="200" >
                                       </telerik:GridBoundColumn>  
                                       <telerik:GridImageColumn DataType="System.String" DataImageUrlFields="ImageFile"  UniqueName="500"
                                            AlternateText="Customer image" 
                                            ImageAlign="Middle" ImageHeight="100px" ImageWidth="82px" HeaderText="Image Column">
                                       </telerik:GridImageColumn>   
                                </Columns>
                               

                            <NestedViewTemplate>

                        <div class="carBackground">

                            <div style="float: left; padding-left: 40px">

                                <asp:Image ID="CarImage" runat="server" AlternateText="Car Image" ImageUrl='Images/logoIcon.jpg' />

                            </div>

                            <div style="float: right; width: 50%">

                                <div class="carTitle">

                                   

                                </div>

                              </NestedViewTemplate>
                             </MasterTableView>
                       
                          

                      </telerik:RadGrid>    
                                                                   
                 </div>
         </div>
     </telerik:RadAjaxPanel> 
    
</form>
Princy
Top achievements
Rank 2
 answered on 18 Jun 2014
1 answer
263 views
What I am trying to do is align one item to the right and the other to the left side of the column.

Inside the column is an up and down arrow. The up arrow should be on the left while the down arrow is on the right.

The reason I need to align them is because if I remove the up arrow for the first section(because it can't go higher than first) the down arrow then is on the left, being in-line with the other up arrows, and vice-versa.

These two buttons are ImageButtons inside a single GridTemplateColumn. Looks like this:

<telerik:GridTemplateColumn AllowFiltering="false">
                                <ItemTemplate>
                                    <asp:ImageButton ID="btnUp" runat="server" CommandName="moveup" ImageUrl="~/images/up.gif"/>
                                    <asp:ImageButton ID="btnDn" runat="server" CommandName="movedn" ImageUrl="~/images/dn.gif"/>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>

I do not want to align the whole row either. Just the column/buttons.

I could however just align the column to be center, but I would rather have the buttons be in-line with the similar buttons.

I tried attaching an ID to the TemplateColumn, but there is no ID method. Also attempted a HorizontalAlign on the ImageButtons, but there isn't a method there either.

Is there currently a way to do this? Or am I being too picky.
Shinu
Top achievements
Rank 2
 answered on 18 Jun 2014
2 answers
541 views
i want to fire refresh event of gridview after inserting data in database without calling databind function because data bind function is not working up to my desire , i want to fire the event of refresh gridview immediately after inserting Data into database.
Thanks in Advance.

Regards,
Muhammad Arsal Khan
Princy
Top achievements
Rank 2
 answered on 18 Jun 2014
1 answer
414 views
I have a radcombobox which has the checkbox property set to true and I am also using an item template for my radcombobox in order to display a tooltip for each item.  Upon implementing all of this, the functionality actually works, however each checkbox along with its description is outlined by separate rows.  I would like the checkbox associated to each item to be in the same row.  How would I be able to achieve this format.  I have attached an image to this forum post visually showing my issue.  I am also posting code below to show how I am coding my radcombobox.  Please Assist!



Code:

<telerik:RadComboBox EmptyMessage="Show All" ID="ddStatusFilter" checkboxes="True" runat="server" Width="130px" HighlightTemplatedItems="true" style="margin-left:14px;">

<itemtemplate>
<asp:Label runat="server" ID="lblEventName" Text='<%# Eval("Event_Name")%> '></asp:Label>
<telerik:RadToolTip ID="RadToolTip1" runat="server" Width="150" Height="10" TargetControlID="lblEventName" AutoCloseDelay="8000"
Position="BottomRight" Text='<%# Eval("Event_Desc")%>'>
</telerik:RadToolTip>

</itemtemplate>

</telerik:RadComboBox>
Shinu
Top achievements
Rank 2
 answered on 18 Jun 2014
1 answer
116 views
Is there a way to add column (preferably static) at the end of a grid to contain sum of other columns? Thank you
Princy
Top achievements
Rank 2
 answered on 18 Jun 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?