Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
139 views

Dear Telerik,

                 Is there any way to bind the child (or) nested grid based on the corresponding tab selected?

Say example, if I select the first tab of the nested grid the respective grid need to be bind only that time rest of grids not need to bind. Suppose if I go to the second tab then the only that time the second grid need to bind mean while the first tab grid data need to be set nothing or clear.

 

Whether the above mentioned way would help to achieve the speed or performance of the grid. If so point out how we can achieve the scenario.

I used the below mentioned to bind the nested grid's already, but it leads to slow in loading the nested grid for each operations

protected void ParentGrid_PreRender(object sender, EventArgs e)     
{     
    foreach (GridDataItem item in ParentGrid.MasterTableView.Items)     
          {                   
                if (item.Expanded)     
                {     
                  //foreach (GridNestedViewItem item1 in RadFirmGrid.MasterTableView.GetItems(GridItemType.NestedView))     
                  //{     
                    GridNestedViewItem item1 = RadFirmGrid.MasterTableView.GetItems(GridItemType.NestedView)[item.ItemIndex] as GridNestedViewItem;     
                         
                    // Binding Cutomer grid         
                    RadGrid Child1 = (RadGrid)item1.FindControl("Customer");     
             
                    // Binding Products grid         
                    RadGrid Child2 = (RadGrid)item1.FindControl("Products");    

Looking forward for your guidance

-Thanks
Yavor
Telerik team
 answered on 14 Apr 2010
3 answers
78 views
Hi,

I have a radGrid that I am binding on a timer often (~10secs). I have resize/reorder columns, resize rows and select rows enabled. If while operating any of the resize/reorder commands the grid is rebound, the grid hangs. This is easiest replicated by making the timer 1 sec, and then dragging a column and not placing it right away, allowing the bind to occur during the control manipulation. The page shows a javascript error and the grid does not re-render (the outline if the column header is stuck). The Javascript error is: this.get_element() parentNode is Null or not an object. The little bit of Jscript in the markup is not the issue, I have commented it out and I still recieve the error. Also, my Script manager (using the radManager) is on the Master Page.

Regards

<%@ Page Language="vb" AutoEventWireup="false" EnableEventValidation="false" CodeBehind="radViewAlarms.aspx.vb" Inherits="ClientWebApp.radViewAlarms" MasterPageFile="~/radClientWebApp.Master"%> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
 
<asp:Content ContentPlaceHolderID="cphHeader" ID="cphBreadCrumbs" runat="server">  
<table class="PageHeader">  
 
<tr> 
<td> 
    <asp:Label ID="lblBreadCrumbs" runat="server" ></asp:Label> 
 
</td> 
 
</tr> 
</table> 
 
<table class="PageHeaderToolbar">  
    <tr> 
        <td> 
            <asp:ImageButton ID="imgbtnAck" runat="server" ToolTip="Click to acknowledge the selected alarm." ImageUrl="~/Style/Images/alarm_aknowlege.gif" /> 
            <asp:ImageButton ID="imgbtnDel" runat="server" ToolTip="Click to delete the selected alarm." ImageUrl="~/Style/Images/alarm_delete.gif" style="width: 16px" /> 
        </td> 
    </tr> 
</table> 
 
</asp:Content> 
<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" ID="cphBody" runat="server">  
 
<script type="text/javascript">  
    var selected = {};  
    function RadGrid1_RowSelected(sender, args) {  
      
        var AlarmGUID = args.getDataKeyValue("AlarmGUID");  
        if (!selected[AlarmGUID]) {  
          
            selected[AlarmGUID] = true;  
            }  
       }  
       function RadGrid1_RowDeselected(sender, args) {  
           var AlarmGUID = args.getDataKeyValue("AlarmGUID");  
           if (selected[AlarmGUID]) {  
 
               selected[AlarmGUID] = null;  
           }  
       }  
       function RadGrid1_RowCreated(sender, args) {  
           var AlarmGUID = args.getDataKeyValue("AlarmGUID");  
           if (selected[AlarmGUID]) {  
 
               args.get_gridDataItem().set_selected(true);  
           }  
       }  
    </script> 
 
 
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" > 
 
            <telerik:RadGrid ID="RadGrid1" runat="server" AllowMultiRowSelection="true" 
                AllowSorting="True" AutoGenerateColumns="False" GridLines="Both"  Skin="Black" EnableAjaxSkinRendering="false" > 
             <MasterTableView ClientDataKeyNames="AlarmGUID"  RowIndicatorColumn-Display="false" TableLayout="Auto"  > 
             <Columns> 
                    <telerik:GridBoundColumn DataField="Severity"  HeaderText="Severity" SortExpression="Severity"  ItemStyle-BorderColor="Black" ItemStyle-Wrap="false" ItemStyle-HorizontalAlign="Left"   />   
                    <telerik:GridBoundColumn  DataField="DisplayName" HeaderText="DisplayName" SortExpression="DisplayName" ItemStyle-BorderColor="Black" ItemStyle-Wrap="false" ItemStyle-HorizontalAlign="Left"   />   
                    <telerik:GridBoundColumn  DataField="Description" HeaderText="Description" SortExpression="Description" ItemStyle-BorderColor="Black" ItemStyle-Wrap="false" ItemStyle-HorizontalAlign="Left"  />   
                    <telerik:GridBoundColumn  DataField="TimeFirst" HeaderText="TimeFirst" SortExpression="TimeFirst" ItemStyle-BorderColor="Black" ItemStyle-Wrap="false" ItemStyle-HorizontalAlign="Left" />   
                    <telerik:GridBoundColumn  DataField="TimeLast" HeaderText="TimeLast" SortExpression="TimeLast" ItemStyle-BorderColor="Black" ItemStyle-Wrap="false" ItemStyle-HorizontalAlign="Left" />   
                    <telerik:GridBoundColumn  DataField="AlarmId" HeaderText="AlarmId" SortExpression="AlarmId" ItemStyle-BorderColor="Black" ItemStyle-Wrap="false" ItemStyle-HorizontalAlign="Left" />   
                    <telerik:GridBoundColumn  DataField="AckedBy" HeaderText="AckedBy" SortExpression="AckedBy" ItemStyle-BorderColor="Black" ItemStyle-Wrap="false" ItemStyle-HorizontalAlign="Left" EmptyDataText="UnAcked" />   
                    <telerik:GridBoundColumn  DataField="TimeAcked" HeaderText="TimeAcked" SortExpression="TimeAcked" ItemStyle-BorderColor="Black" ItemStyle-Wrap="false" ItemStyle-HorizontalAlign="Left" EmptyDataText="UnAcked" />   
                    <telerik:GridBoundColumn  DataField="OccurrenceCount" HeaderText="OccurrenceCount" SortExpression="OccurrenceCount" ItemStyle-BorderColor="Black" ItemStyle-Wrap="false" ItemStyle-HorizontalAlign="Left" />   
                    <telerik:GridBoundColumn  DataField="NewOccurrenceCount" HeaderText="OccurrenceCount" SortExpression="NewOccurrenceCount" ItemStyle-BorderColor="Black" ItemStyle-Wrap="false" ItemStyle-HorizontalAlign="Left" />    
              </Columns> 
                    <RowIndicatorColumn> 
                        <HeaderStyle Width="20px" /> 
                    </RowIndicatorColumn> 
                    <ExpandCollapseColumn> 
                        <HeaderStyle Width="20px" /> 
                    </ExpandCollapseColumn> 
                </MasterTableView> 
                <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">  
                    <Selecting AllowRowSelect="True" /> <Resizing AllowRowResize="True"/> <Resizing AllowColumnResize="True"/>   
<ClientEvents OnRowSelected="RadGrid1_RowSelected" OnRowDeSelected="RadGrid1_RowDeselected"  OnRowCreated="RadGrid1_RowCreated" /> 
                   </ClientSettings> 
                  
                 </telerik:RadGrid> 
                      
            <asp:Timer ID="Timer1" runat="server" Interval="1000">  
            </asp:Timer> 
       
        </telerik:RadAjaxPanel> 
      
</asp:Content> 
 

Iana Tsolova
Telerik team
 answered on 14 Apr 2010
1 answer
57 views
Hi,

I have a grid with client select column, and other columns which contains textboxes and check boxes. User can edit the row by checking or unchecking any checkbox in the grid, or changing the text in any textbox. 

For editing I am not using edit command or any other thing of Grid. User can directly change the values and hit Save.

I want to show a box when user tries to leave unsaved changes in grid. 

Can anyone help me on how to achieve this?

Thanks,

Jimmy.
Yavor
Telerik team
 answered on 14 Apr 2010
4 answers
225 views
Hi,
    I have a Radgrid where I have set 

AllowAutomaticUpdates

 

="false" and 

 

AllowAutomaticInserts

 

="True" and

<

 

telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">

 

 

<ItemStyle CssClass="MyImageButton" />

 

 

</telerik:GridEditCommandColumn>

 

as first column of the Grid.

    Even though i have set AllowAutomaticUpdates="false",  I am getting GridEditColumn with Edit Icon.
How to get rid of Edit Icon and have only Insert Operation.


Thanks.
Swapna M
Top achievements
Rank 1
 answered on 14 Apr 2010
2 answers
149 views
Hi,

I have noticed a performance issue with the RadListView and DataPager controls. I am seeing a noticable delay in moving to the next page in my RadListView which I think is due to the number of CSS calls being made. This only happens the first time i visit the page with the control on and click the "next page" button - afterwards, the css is cached so the performance is fine.

I am seeing 8 calls to CSS files from my WebResource.axd. These are for:

Telerik RadListView Common CSS
Telerik RadListView Default Skin
Telerik RadDataPager Common CSS
Telerik RadDataPager Default Skin

The calls all occur twice!

Is there a way to reduce these calls?
Here is my code:

<asp:UpdatePanel ID="upExpList" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false"
        <ContentTemplate>  
        <ul> 
                <telerik:RadListView OnPageIndexChanged="rlvExperiences_PageIndexChanged"  
                ItemPlaceholderID="ViewTitlePlaceholder" 
                    DataKeyNames="ExperienceId" ID="rlvExperienceTitles" 
                    runat="server" AllowPaging="true"
                    <LayoutTemplate> 
                        <li runat="server" id="ViewTitlePlaceholder" /> 
                        </li> 
                    </LayoutTemplate> 
                    <ItemTemplate> 
                        <li> 
                            //removed for brevity 
                        </li> 
                    </ItemTemplate> 
                </telerik:RadListView> 
            </ul> 
        </div> 
        </ContentTemplate> 
        <Triggers> 
        <asp:AsyncPostBackTrigger ControlID="dataPager" EventName="Command" /> 
        <asp:PostBackTrigger ControlID="rlvExperienceTitles" /> 
        </Triggers> 
        </asp:UpdatePanel> 
        <asp:UpdatePanel ID="upDataPager" runat="server" > 
        <ContentTemplate> 
           <telerik:RadDataPager BackColor="Transparent" BorderColor="Transparent"  
      Font-Size="Small" ID="dataPager" runat="server" PagedControlID="rlvExperienceTitles"  
      PageSize="20"
<Fields> 
                               <telerik:RadDataPagerButtonField FieldType="Prev" /> 
                               <telerik:RadDataPagerButtonField FieldType="Numeric" /> 
                               <telerik:RadDataPagerButtonField FieldType="Next" /> 
                             <telerik:RadDataPagerTemplatePageField> 
                                            <PagerTemplate> 
                                                <div style="float: right"
                                                     
                                                        <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex+1%>" /> 
                                                        to 
                                                        <asp:Label runat="server" ID="TotalPagesLabel" Text="<%#CheckPagingTotal( Container.Owner.StartRowIndex+Container.Owner.PageSize) %>" /> 
                                                        of 
                                                        <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>" /> 
                                                         
                                                    
                                                </div> 
                                            </PagerTemplate> 
                                        </telerik:RadDataPagerTemplatePageField> </Fields> 
                       </telerik:RadDataPager> 
        </ContentTemplate></asp:UpdatePanel> 

Thanks
Tom
Diane
Top achievements
Rank 1
 answered on 14 Apr 2010
1 answer
128 views
Is it possible to rename the WAV file to something other than RadCaptcha_Audio_xxxx?  ie. myAudio_xxxx

Thanks
Pero
Telerik team
 answered on 14 Apr 2010
1 answer
153 views
Hi,

I have a pie chart with 5 series.
Is there a way for me to show the chartseriesname for each of the series just above their corresponding pies?

Thanks,
Wayne
Giuseppe
Telerik team
 answered on 14 Apr 2010
2 answers
62 views

Dear Telerik,

            I am having Radgrid , which has 10 columns in the names like A,B,C,D,E.. etc.

All columns widths are defined in percentage in order to make a better view.

My scenario is I would like to show only few columns in the grid and the remain columns need to be displayed based on the checkbox selection of HeaderContextMenu.

The HeaderContextMenu need to have all of the columns names in the list intimating checked flag for the visible column and uncheck for the invisible columns.

 

I hope you could understan the scenario.If so please let me know the possibility of the scenario

 

-Thanks

Maria Ilieva
Telerik team
 answered on 14 Apr 2010
1 answer
103 views
<telerik:RadGrid ID="GridDepartment" runat="server" OnPageIndexChanged="GridDepartment_PageIndexChanged" 
                                                                                            OnPageSizeChanged="GridDepartment_PageSizeChanged" OnSortCommand="GridDepartment_SortCommand" 
                                                                                            OnItemDataBound="GridDepartment_ItemDataBound"  OnItemCommand="GridDepartment_ItemCommand"
                                                                                            <MasterTableView AutoGenerateColumns="False" AllowPaging="True" AllowSorting="True" 
                                                                                                GroupsDefaultExpanded="false" PageSize="20"
                                                                                                <Columns> 
                                                                                                    <telerik:GridTemplateColumn> 
                                                                                                        <ItemTemplate> 
                                                                                                            <asp:CheckBox ID="checkBox" runat="server"  AutoPostBack="true"/> 
                                                                                                        </ItemTemplate> 
                                                                                                    </telerik:GridTemplateColumn> 
                                                                                                    <telerik:GridBoundColumn DataField="DspName" HeaderText="姓名" UniqueName="DspName" 
                                                                                                        SortExpression="DspName"
                                                                                                    </telerik:GridBoundColumn> 
                                                                                                    <telerik:GridBoundColumn DataField="DeptName" HeaderText="部门" UniqueName="DeptName" 
                                                                                                        SortExpression="DeptName"
                                                                                                    </telerik:GridBoundColumn> 
                                                                                                     
                                                                                                </Columns> 
                                                                                                <GroupByExpressions> 
                                                                                                    <telerik:GridGroupByExpression> 
                                                                                                        <SelectFields> 
                                                                                                            <telerik:GridGroupByField FieldName="DeptName" HeaderText="部门" /> 
                                                                                                        </SelectFields> 
                                                                                                        <GroupByFields> 
                                                                                                            <telerik:GridGroupByField FieldName="DeptName" HeaderText="部门" SortOrder="Descending" /> 
                                                                                                        </GroupByFields> 
                                                                                                    </telerik:GridGroupByExpression> 
                                                                                                </GroupByExpressions> 
                                                                                            </MasterTableView> 
                                                                                            <ClientSettings> 
                                                                                                <Selecting AllowRowSelect="True" /> 
                                                                                            </ClientSettings> 
                                                                                        </telerik:RadGrid> 




I don't know how to get the information when users click the CheckBox.
For example,when users click the first two,how can I know the choosed items?
Please have a look at the attachment.


Princy
Top achievements
Rank 2
 answered on 14 Apr 2010
2 answers
96 views
Hi,

I am using RadGrid's inbuilt capabilities for editing records and they are quite OK for my needs, but there is one thing that is bugging me. Most of my columns are of type GridBoundColumn and are therefore rendered as textboxes when in edit mode, but they are too narrow for my purposes. How can I make them wider?

Thank you,
Andrea
Andreja Zitnik
Top achievements
Rank 1
 answered on 14 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?