Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
160 views
I have downloaded the trial version of the Telerik controls to play around before purchasing.

I found a video on Telerik TV demostrating how to retreive primary keys from the RadGrid control.

I've followed the code in the video exactly but never is the DataKeyValues property populated.

Does anyone have any suggestions?
Shinu
Top achievements
Rank 2
 answered on 05 Jul 2010
2 answers
114 views
Is this possible, are there any decent guides?  I have searched for this and found a video, however it is using client side databinding, I would like to bind data server side, but do the sorting client side.  I would like no postbacks.  Any help on this would be much appreciated.
mabs
Top achievements
Rank 1
 answered on 05 Jul 2010
1 answer
147 views
I have noticed that at times, there is an issue with the display of data in the grid rows. It's hard to explain, but the text does not line up with the row as it should - it usually displays at the bottom of the row, or even slightly outside of the row. When alternating item styles are used this issue is more noticeable, as part of the text will show up in another row. When you hover over the misaligned rows however, they will move back to their proper place and stay there until the next form post. In my experience, it seems that this happens when the grid is ajaxified most of the time too. It's possible that this is a browser issue too, but I'm hoping that there is a way to fix it. It's not a show stopper, but it puts a small dent in an otherwise meticulously consistent interface.

It doesn't happen frequently, and thus is kind of hard to reproduce, but I have included a screenshot which illustrates the problem - if you look at the header row, you will see that the alignment of the column headers is inconsistent. Something similar to this happens with the rows as well.

Can someone explain why this happens, and what I can do to fix it? Thanks!


Dimo
Telerik team
 answered on 05 Jul 2010
3 answers
132 views
TELIRIK GRID Aggregate count method of how the statistics of non-null value
Princy
Top achievements
Rank 2
 answered on 05 Jul 2010
5 answers
401 views
We've having a problem with deleting rows from a GridTableView nested inside a RadGrid.

The basic layout of the page is that we have a list of security roles, and each role is granted a set of permissions. If you delete one of the permissions, you get an InvalidOperationException with the following message: "Could not find a row that matches the given keys in the original values stored in ViewState.  Ensure that the 'keys' dictionary contains unique key values that correspond to a row returned from the previous Select operation."

However, deleting a record from a nested table works if it's the last table in the list, or if you first add a record to that table.
 

 

<telerik:RadGrid runat="server" ID="securityRolesRadGrid" Skin="Vista" AllowSorting="true"

 

          DataSourceID="rolesDataSource" Width="775px" AutoGenerateColumns="false">

 

    <MasterTableView CommandItemDisplay="Top" HierarchyDefaultExpanded="false" HierarchyLoadMode="Client" InsertItemDisplay="Top" CommandItemSettings-AddNewRecordText="Add new role"

 

              AllowAutomaticDeletes="true" AllowAutomaticInserts="true" AllowAutomaticUpdates="true"

 

              DataKeyNames="RoleID" EditMode="InPlace">
       
<ExpandCollapseColumn Visible="True"></ExpandCollapseColumn>

 

        <Columns>

 

            <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderStyle-CssClass="rgHeader rgImgCol" ItemStyle-CssClass="rgImgCol"></telerik:GridEditCommandColumn>

 

            <telerik:GridBoundColumn DataField="Name" HeaderText="Role"></telerik:GridBoundColumn>

 

            <telerik:GridDropDownColumn HeaderText="Scope" DropDownControlType="DropDownList" DataSourceID="scopesDataSource" DataField="ScopeID" ListTextField="Name" ListValueField="ScopeID"></telerik:GridDropDownColumn>

 

            <telerik:GridBoundColumn DataField="Description" HeaderText="Description" ColumnEditorID="fullWidthTextboxEditor"></telerik:GridBoundColumn>

 

            <telerik:GridButtonColumn ConfirmText="Are you sure you want to delete this Role? Users assigned to this role may lose permissions on the site." ConfirmTitle="Delete" CommandName="Delete" ButtonType="ImageButton" HeaderStyle-CssClass="rgHeader rgImgCol" ItemStyle-CssClass="rgImgCol"></telerik:GridButtonColumn>

 

 

        </Columns>

 

        <DetailTables>

 

            <telerik:GridTableView DataSourceID="rolePermissionsDataSource" Width="100%" NoDetailRecordsText="No permissions assigned for this role." CommandItemSettings-AddNewRecordText="Add new permission"

 

                     AllowAutomaticDeletes="true" AllowAutomaticInserts="true" AllowAutomaticUpdates="true"

 

                     DataKeyNames="RolePermissionID,RoleID" CommandItemDisplay="Top" InsertItemDisplay="Top" EditMode="InPlace">

 

                <ParentTableRelation>

 

                    <telerik:GridRelationFields DetailKeyField="RoleID" MasterKeyField="RoleID" />

 

                </ParentTableRelation>

 

                <Columns>

 

                    <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderStyle-CssClass="rgHeader rgImgCol" ItemStyle-CssClass="rgImgCol"></telerik:GridEditCommandColumn>

 

                    <telerik:GridDropDownColumn HeaderText="Permission" DropDownControlType="DropDownList" DataSourceID="permissionsDataSource" DataField="PermissionID" ListTextField="Permission" ListValueField="PermissionID"></telerik:GridDropDownColumn>

 

                    <telerik:GridDropDownColumn HeaderText="Project Phase" DropDownControlType="RadComboBox" DataSourceID="projectStatusesDataSource" DataField="ProjectStatusID" ListTextField="Status" ListValueField="ProjectStatusID" EnableEmptyListItem="true" EmptyListItemText="" EmptyListItemValue="" ConvertEmptyStringToNull="true"></telerik:GridDropDownColumn>

 

                    <telerik:GridButtonColumn ConfirmText="Delete Permission?" ConfirmTitle="Delete" CommandName="Delete" ButtonType="ImageButton" HeaderStyle-CssClass="rgHeader rgImgCol" ItemStyle-CssClass="rgImgCol"></telerik:GridButtonColumn>

 

                </Columns>

 

            </telerik:GridTableView>

 

        </DetailTables>

 

    </MasterTableView>

 

 

</telerik:RadGrid>

 

<asp:LinqDataSource runat="server" ID="rolesDataSource"

 

 

          ContextTypeName="SecurityDataContextEx"

 

          TableName="SecurityRoles"

 

          EnableDelete="true" EnableInsert="true" EnableUpdate="true">

 

</asp:LinqDataSource>

 

<asp:LinqDataSource runat="server" ID="scopesDataSource"

 

          ContextTypeName="SecurityDataContextEx"

 

          TableName="SecurityRoleScopes">

 

</asp:LinqDataSource>

 

<asp:LinqDataSource runat="server" ID="rolePermissionsDataSource"

 

          ContextTypeName="SecurityDataContextEx"

 

 

          TableName="SecurityRolePermissions"

 

          EnableDelete="true" EnableInsert="true" EnableUpdate="true"

 

          Where="RoleID == @RoleID">

 

 

 

    <WhereParameters>

 

 

 

       <asp:Parameter Name="RoleID" Type="Int32" />

 

 

 

    </WhereParameters>  

 

 

</asp:LinqDataSource>

 

<asp:LinqDataSource runat="server" ID="permissionsDataSource"

 

          ContextTypeName="SecurityDataContextEx"

 

          TableName="SecurityPermissions"

 

          Where="@isSiteLevelScope && isSiteLevelScope == true ||

                @isProjectLevelScope && isProjectLevelScope == true ||

                @isProjectOwnerLevelScope && isProjectOwnerLevelScope == true">

 

 

    <WhereParameters>

 

        <asp:Parameter Name="isSiteLevelScope" Type="Boolean" DefaultValue="false" />

 

 

        <asp:Parameter Name="isProjectLevelScope" Type="Boolean" DefaultValue="false" />

 

        <asp:Parameter Name="isProjectOwnerLevelScope" Type="Boolean" DefaultValue="false" />

 

    </WhereParameters>

 

</asp:LinqDataSource>

 

<asp:LinqDataSource runat="server" ID="projectStatusesDataSource" 
          ContextTypeName="SecurityDataContextEx"

 

 

          TableName="ProjectStatus" Where="Disabled==null || Disabled==false" OrderBy="SortOrder">

 

</asp:LinqDataSource>

 

 

 

 

Veli
Telerik team
 answered on 05 Jul 2010
2 answers
111 views
I have a grid with a MasterTable and a DetailTable.

There are times in the life of my app when I have the DetailTable open on a particular row of the MasterTable and I do something that requires the grid to be rebound.

I know the MasterTable row index and the row index on the DetailTable.

After I have rebound the grid, how can I get the grid to expand the relevant MasterTable row, populate the DetailTable and select the relevant row in it?

The best I could come up with is something like this...
RadGrid1.MasterTableView.Items[MasterTableRowIndex].ChildItem.Expanded = true; 

Sadly this doesn't do what I thought it might.

Anyone have any clues?

-- 
Stuart

Stuart Hemming
Top achievements
Rank 2
 answered on 05 Jul 2010
1 answer
482 views
Hi,

I am using telerik radgrid. The radgrid performance is worst in following  scenarios. Please let me know if there is any other way to improve the performance.

1. I have radgrid with PagerStyle Mode="NextPrevAndNumeric" option, In dropdown i implemented "viewall" option to show all rows in a grid. When i selected view all option the radgrid performance is very slow in both  IE6, IE7 and Firefox. Even its getting stuck (See the attached image) in both browsers. I am showing around 6000 records in radgrid. Its taking around 30sec - 40sec to show the all rows in a grid and the grid is very slow for swapping, filtering, sorting and even for scrolling down.

2. I have GridClientSelectColumn in my radgrid. When I am showing all rows in a grid and when I am trying to select all rows in a grid using check box column its getting very slow in IE7(around 6 - 7 sec to select all rows) But in Firefox it is better( 2 sec).

Is there any better way to improve performance of a radgrid. Is there other way to bind the data to the grid when user select "viewall" option?

Please find my attached code.

.ASPX

<asp:Content ID="Content1" ContentPlaceHolderID="CSS_ScriptPlaceHolder" runat="Server"> 
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> 
        <link href="CSS/Css.css" rel="stylesheet" type="text/css" /> 
        <script type="text/javascript"> 
 
            function onAgrtypeOther() { 
                if (document.getElementById('tabTskDet_tabAgreInfo_ddlAgreementType').selectedIndex == 4) 
                    document.getElementById('trAgrTypeOther').style.visibility = 'visible'; 
                else 
                    document.getElementById('trAgrTypeOther').style.visibility = 'hidden'; 
                return false; 
            } 
            function onPertypeOther() { 
                if (document.getElementById('tabTskDet_tabPermit_ddlPermitType').selectedIndex == 3) 
                    document.getElementById('tdPerTypeOther').style.visibility = 'visible'; 
                else 
                    document.getElementById('tdPerTypeOther').style.visibility = 'hidden'; 
                return false; 
            } 
            function onSitetypeOther() { 
                if (document.getElementById('tabTskDet_tabGenTskDet_ddlSiteType').selectedIndex == 4) 
                    document.getElementById('tabTskDet_tabGenTskDet_tdSiteTypeOth').style.visibility = 'visible'; 
                else 
                    document.getElementById('tabTskDet_tabGenTskDet_tdSiteTypeOth').style.visibility = 'hidden'; 
                return false; 
 
            } 
            function onPwrtypeOther() { 
                if (document.getElementById('tabTskDet_tabGenTskDet_ddlPwrStatus').selectedIndex == 4) 
                    document.getElementById('tabTskDet_tabGenTskDet_tdPwrStatusOth').style.visibility = 'visible'; 
                else 
                    document.getElementById('tabTskDet_tabGenTskDet_tdPwrStatusOth').style.visibility = 'hidden'; 
                return false; 
            } 
            function onEqiLoctypeOther() { 
                if (document.getElementById('tabTskDet_tabGenTskDet_ddlEquiLocDesc').selectedIndex == 3) 
                    document.getElementById('tabTskDet_tabGenTskDet_tdEquiLocDescOth').style.visibility = 'visible'; 
                else 
                    document.getElementById('tabTskDet_tabGenTskDet_tdEquiLocDescOth').style.visibility = 'hidden'; 
                return false; 
            } 
            function showOthRea() { 
                var dt1 = new Date(document.getElementById("tabTskDet_tabGenTskDet_txtConstSchCompDate").value); 
                var dt2 = new Date(document.getElementById("tabTskDet_tabGenTskDet_txtConstActCompDate").value); 
                if (dt1 < dt2) { 
                    document.getElementById("tabTskDet_tabGenTskDet_tdDtLateRea306").style.display = "block" 
                } 
                else { 
                    document.getElementById("tabTskDet_tabGenTskDet_tdDtLateRea306").style.display = "none" 
                    document.getElementById("tabTskDet_tabGenTskDet_lblDueDtLateRea").value = '' 
                } 
            } 
            function showOthRea303() { 
                var dt1 = new Date(document.getElementById("tabTskDet_tabGenTskDet_txtContSchComDt").value); 
                var dt2 = new Date(document.getElementById("tabTskDet_tabGenTskDet_txtConstActComDt").value); 
                if (dt1 < dt2) { 
                    document.getElementById("tabTskDet_tabGenTskDet_tdDtLateRea303").style.display = "block" 
                } 
                else { 
                    document.getElementById("tabTskDet_tabGenTskDet_tdDtLateRea303").style.display = "none" 
                    document.getElementById("tabTskDet_tabGenTskDet_lbl303DueDtLateRea").value = '' 
                } 
            } 
            function DisplayDateToday(sender, args) { 
                if (sender._selectedDate == null) { 
                    sender._selectedDate = new Date(); 
                } 
            } 
            function onRequestStart(sender, args) { 
                if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0 || 
                    args.get_eventTarget().indexOf("ExportToWordButton") >= 0 || 
                    args.get_eventTarget().indexOf("ExportToPdfButton") >= 0 || 
                    args.get_eventTarget().indexOf("ExportToCsvButton") >= 0) { 
 
                    args.set_enableAjax(false); 
                } 
            } 
        </script> 
 
        <style> 
            .modalBackground 
            { 
                background-color: Gray; 
                filter: alpha(opacity=70); 
                opacity: 0.7; 
            } 
            .AjaxCalendar .ajax__calendar_container 
            { 
                border: 1px solid #646464; 
                background-color: White; 
                color: Black; 
            } 
            .AjaxCalendar .ajax__calendar_other .ajax__calendar_day, .AjaxCalendar .ajax__calendar_other .ajax__calendar_year 
            { 
                color: #999999; 
            } 
            .AjaxCalendar .ajax__calendar_hover .ajax__calendar_day, .AjaxCalendar .ajax__calendar_hover .ajax__calendar_month, .AjaxCalendar .ajax__calendar_hover .ajax__calendar_year 
            { 
                color: Red; 
            } 
            .AjaxCalendar .ajax__calendar_active .ajax__calendar_day, .AjaxCalendar .ajax__calendar_active .ajax__calendar_month, .AjaxCalendar .ajax__calendar_active .ajax__calendar_year 
            { 
                background-color: #78C43C; 
                color: Black; 
                text-align: center; 
                font-weight: bold; 
            } 
            .rgPageFirst, .rgPagePrev, .rgPageNext, .rgPageLast 
            { 
                display: none !important; 
            } 
            div.RadGrid_Default .rgHeader, div.RadGrid_Default th.rgResizeCol 
            { 
                background-image: none; 
            } 
        </style> 
    </telerik:RadCodeBlock> 
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="PagePlaceholder" runat="Server"> 
    <div style="width: 100%; padding-top: 20px"> 
        <table style="width: 98%"> 
            <tr> 
                <td colspan="2"> 
                    <asp:Label runat="server" Font-Bold="true" Font-Size="14pt" ID="lblTskName"></asp:Label> 
                </td> 
            </tr> 
            <tr> 
                <td colspan="2"> 
                    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
                    </telerik:RadScriptManager> 
                    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> 
                        <ClientEvents OnRequestStart="onRequestStart" /> 
                        <AjaxSettings> 
                            <telerik:AjaxSetting AjaxControlID="rg209"> 
                                <UpdatedControls> 
                                    <telerik:AjaxUpdatedControl ControlID="rg209" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                                </UpdatedControls> 
                            </telerik:AjaxSetting> 
                        </AjaxSettings> 
                    </telerik:RadAjaxManager> 
                    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"> 
                    </telerik:RadAjaxLoadingPanel> 
                    <telerik:RadGrid ID="rg209" runat="server" AutoGenerateColumns="false" Height="550px" 
                        OnNeedDataSource="rg209_NeedDataSource" Width="100%" AllowPaging="True" AllowSorting="True" 
                        AllowMultiRowSelection="True" EnableHeaderContextMenu="true" GridLines="None" 
                        EnableHeaderContextFilterMenu="true" AllowMultiRowEdit="true" AllowFilteringByColumn="True" 
                        OnPreRender="rg209_PreRender" OnItemCreated="rg209_ItemCreated" EnableViewState="false"> 
                        <HeaderStyle Height="20px" BackColor="#004000" Font-Size="8pt" Font-Bold="True" ForeColor="White" 
                            HorizontalAlign="Center" BorderColor="White" BorderWidth="1px" /> 
                        <ExportSettings IgnorePaging="true" ExportOnlyData="true"> 
                            <Pdf AllowModify="false" AllowPrinting="true" PageBottomMargin="" PageFooterMargin="" 
                                PageHeaderMargin="" PageHeight="11in" PageLeftMargin="" PageRightMargin="" PageTopMargin="" 
                                PageWidth="14in" /> 
                        </ExportSettings> 
                        <MasterTableView DataKeyNames="orderId" CommandItemDisplay="Top" EditMode="InPlace" 
                            PageSize="10"> 
                            <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true" 
                                ShowExportToCsvButton="true" ShowExportToPdfButton="true" ShowAddNewRecordButton="false" /> 
                            <Columns> 
                                <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-Width="3%" 
                                    ItemStyle-Width="3%"> 
                                </telerik:GridClientSelectColumn> 
                                <telerik:GridBoundColumn UniqueName="sId" HeaderText="sId" DataField="sId" Visible="false"> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="orderId" HeaderText="orderId" DataField="orderId" 
                                    Visible="false"> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Customer Name" HeaderText="Customer Name" DataField="Customer Name" 
                                    ReadOnly="true"> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Market Name" HeaderText="Market Name" DataField="Market Name" 
                                    ReadOnly="true"> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="LOB" HeaderText="LOB" DataField="LOB" ReadOnly="true"> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Headend Name" HeaderText="Headend Name" DataField="Headend Name" 
                                    ReadOnly="true"> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Project Name" HeaderText="Project Name" DataField="Project Name" 
                                    ReadOnly="true"> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Site Name" HeaderText="Site Name" DataField="Site Name" 
                                    ReadOnly="true"> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Task Status" HeaderText="Task Status" DataField="Task Status" 
                                    ReadOnly="true"> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Sch SM Imp Date" HeaderText="Sch SM Imp Date" 
                                    DataField="Sch SM Imp Date" ReadOnly="true"> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Target PTD" HeaderText="Target PTD" DataField="Target PTD"> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Actual PTD" HeaderText="Actual PTD" DataField="Actual PTD"> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Foc Date" HeaderText="Foc Date" DataField="Foc Date"> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Notification Date" HeaderText="Notification Date" 
                                    DataField="Notification Date"> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridCheckBoxColumn UniqueName="Include FOC?" HeaderText="Include FOC?" DataField="Include FOC?"> 
                                </telerik:GridCheckBoxColumn> 
                                <telerik:GridCheckBoxColumn UniqueName="Include DLR?" HeaderText="Include DLR?" DataField="Include DLR?"> 
                                </telerik:GridCheckBoxColumn> 
                                <telerik:GridEditCommandColumn UniqueName="ECC209"> 
                                </telerik:GridEditCommandColumn> 
                            </Columns> 
                        </MasterTableView> 
                        <ClientSettings EnableRowHoverStyle="true" ReorderColumnsOnClient="false" AllowDragToGroup="false" 
                            AllowColumnsReorder="True"> 
                            <Scrolling AllowScroll="true" EnableVirtualScrollPaging="false" UseStaticHeaders="true" /> 
                            <Selecting AllowRowSelect="True"></Selecting> 
                            <Resizing AllowRowResize="true" AllowColumnResize="True" EnableRealTimeResize="True" 
                                ResizeGridOnColumnResize="False"></Resizing> 
                        </ClientSettings> 
                        <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle> 
                    </telerik:RadGrid> 
                </td> 
            </tr> 
            <tr> 
                <td colspan="2"> 
                    &nbsp; 
                </td> 
            </tr> 
        </table> 
    </div> 
</asp:Content> 
 


.CS

public partial class Tak209 : System.Web.UI.Page 
{ 
    protected void Page_Load(object sender, EventArgs e) 
    { 
        try 
        { 
            if (!IsPostBack) 
            { 
                Session["SearchRes"] = null; 
                if (Session["TaskName"] != null) 
                    lblTskName.Text = Session["TaskName"].ToString(); 
                Session["FilColms"] = null; 
                Session["SortExp"] = null; 
                Session["FilExp"] = null; 
                Session["ViewAll"] = null; 
                BindGrid(); 
            } 
        } 
        catch (Exception ex) 
        { 
            throw ex; 
        } 
    } 
 
    private void BindGrid() 
    { 
        try 
        { 
            DataSet dsResult = new DataSet(); 
 
            clsSearch_BL clsObj = new clsSearch_BL(); 
            clsObj.TaskID = (string)Session["TaskID"]; 
            clsObj.CustName = (string)Session["CustName"]; 
            clsObj.MarketName = (string)Session["MarketName"]; 
            clsObj.HeadendName = (string)Session["HeadendName"]; 
            clsObj.SiteName = (string)Session["SiteName"]; 
            clsObj.TaskStatus = (string)Session["TaskStatus"]; 
            clsObj.OrdType = (string)Session["OrdType"]; 
            clsObj.OrdStatus = (string)Session["OrdStatus"]; 
            clsObj.ProName = (string)Session["ProName"]; 
            clsObj.LOC = (string)Session["LOC"]; 
            clsObj.QuoteID = (string)Session["QuoteID"]; 
            clsObj.CMNumber = (string)Session["CMNumber"]; 
 
            if (Session["SearchRes"] == null) 
            { 
                dsResult = clsObj.getSearchResults_BL(clsObj); 
                Session["SearchRes"] = dsResult; 
            } 
            else 
                dsResult = (DataSet)Session["SearchRes"]; 
 
            DataView dataView = dsResult.Tables[0].DefaultView; 
            rg209.DataSource = dsResult; 
            //rg209.DataBind(); 
        } 
        catch (Exception ex) 
        { 
            throw ex; 
        } 
    } 
 
    protected void rg209_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) 
    { 
        BindGrid(); 
    } 
 
    protected void rg209_PreRender(object sender, EventArgs e) 
    { 
        rg209.MasterTableView.GetColumnSafe("RowIndicator").Display = false; 
 
    } 
 
    protected void rg209_ItemCreated(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridPagerItem) 
        { 
            RadComboBox combo = (e.Item as GridPagerItem).FindControl("PageSizeComboBox") as RadComboBox; 
 
            // The number of items shown when all is selected  
            int allRowsCount = int.MaxValue; 
 
            // Remove duplicates  
            RadComboBoxItem duplicate = combo.Items.FindItemByValue(allRowsCount.ToString()); 
            if (duplicate != null) 
            { 
                duplicate.Remove(); 
            } 
 
            // Create a new item for showing all  
            RadComboBoxItem item = new RadComboBoxItem("All", allRowsCount.ToString()); 
            item.Attributes.Add("ownerTableViewId", e.Item.OwnerTableView.ClientID); 
            combo.Items.Add(item); 
 
            // Set the current pagesize as the selected value  
            combo.Items.FindItemByValue(rg209.PageSize.ToString()).Selected = true; 
        } 
    } 
} 
 

Pavlina
Telerik team
 answered on 05 Jul 2010
2 answers
131 views
Hi,

I have a RadTabStrip control with 4 tabs in a asp.net page. In these tabs, 3 of them have child-tabs.   And 1 of them doesn't have any child-tabs.

Based on the child-tab selection, on tab click event, I am adding the user control dynamically into a AJAXified panel;
The same thing with the one that doesn't have any child-tabs.

The user controls get loaded dynamically and that part of it works fine.

But, in case of the following scenario where,

   I click on a tab with child tabs, the child tabs show up,
   I click on one of the child tabs, its corresponding user control shows up.  
   Now when I click on the tab that has NO child tabs, the corresponding user control shows up.  
   But the child tabs from my previous tab selection are still being displayed. 
   I am expecting only the root level parent tabs to showup on the page and the child level tabs to go away

Any idea what could be happening.  I appreciate any pointers to a solution.

Regards
-Athadu
Yana
Telerik team
 answered on 05 Jul 2010
8 answers
270 views
can someone please explain to me why it is that when I select a line of text and center align it, ALL the text in the RAD Editor get center aligned.

I only want to center align specific lines of text, not the whole thing, how can this be done ?
Rumen
Telerik team
 answered on 05 Jul 2010
2 answers
97 views
Hi,

I'm getting a strange issue in firefox, I have a formdecorator assigned to the page but checkbox and label aren't included. The page has a Checkboxlist held in a div overflow on the page. Now this list can be quite large so I wanted to add a select all checkbox/button using javascript and this works fine in IE, however in Firefox it styles the checkbox labels when I click select all and the javascript is fired so now I have the standard checkbox and a label which contains the FormDecorator styled checkbox. This does not happen if I select/deselect an individual checkbox. Is there any way around thing.

I have tried styling up the checkbox list however this leads to a separate issue as detailed in this thread
http://www.telerik.com/community/forums/aspnet-ajax/form-decorator/formdecorator-not-working-with-checkbox-list-in-div-overflow.aspx

Is there a solution to this, the problem is only occuring for me in firefox.

Regards



Georgi Tunev
Telerik team
 answered on 05 Jul 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?