Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
127 views
Hi.

I've developed a page with a RadGrid, sourced by a List of POCO's, using an EditFormType of WebUserControl.  My user control handles the DataBinding event (attaching to it in the control's Page_Load(), if that's important).  I click my edit button in the grid... the control pops up, mostly with populated data.  I seem to at least be doing something right...

The one input in the user control I can't seem to get populated is the drop-down, which I've tried implementing as both a plain old ASP.NET DropDownList or a RadComboBox.  If I debug and step through my DataBinding handler.  I can see that it's been properly selected.  But sometime between the end of the DataBinding() call and rendering, the list has lost its selection, and renders showing the first item in the dropdown.

The grid itself is inside a RadAjaxPanel, but I it doesn't appear to be an ajax issue because the problem persists when I set the panel's EnableAjax=false.

All I'm doing to select an item is:

public void SelectBU(string s)
{
    lstBU.ClearSelection();
    lstBU.FindItemByValue(s).Selected = true;
}

The function that databinds the list itself checks the item-count of the list, and skips the data binding if there are already items.  So it's not losing the selection due to an extra bind.

If I just throw this control on a blank page and call SelectBU() from the .aspx codebehind, it works fine.

I'm on 2014.1.225.40 in ASP.NET 4.0, and I'm targeting IE9 primarily.  (I've seen this same behavior in the versions of Chrome and Firefox I have installed on my box.)

Thanks for any guidance anyone can provide.



Princy
Top achievements
Rank 2
 answered on 18 Jun 2014
10 answers
139 views
I'm using OLAP connection to pivot grid. I have noticed that all of my attributes in dimensions are listed in "more fields" group. i don't want that grouping. (excel it doesn't group that way)

Regards,
Yohan
Maria Ilieva
Telerik team
 answered on 18 Jun 2014
4 answers
233 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
206 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
370 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
258 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
906 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
91 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
257 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
532 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?