Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
74 views
Hi Telerik team,

Currently, the EditAll command will turn every row regardless in MasterTable or DetailTable into editable form.

Could we implement a "Edit All" function that only apply for the rows in a chosen detail table?
I mean that each detail table has it own "Edit All" command button; and only rows in the detail table which its "Edit All" button is clicked turn in to editable form.

Thanks a lot.
Chelsea Leonhart
Top achievements
Rank 1
 answered on 09 May 2010
3 answers
183 views
Hi,

I am trying to use rotator in master page. The master page code is below:

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

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

<!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>eReception</title>
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .newsFeed
        {
            width: 100%;
            padding: 14px 0 0 20px;
            margin: 0 0 2px 0;
        }
    </style>        
</head>
<body style="background-image:url(Images/BodyVmn.gif);margin-bottom:0; margin-left:0; margin-right:0;margin-top:0;">
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" Skin="WebBlue" />
        <div style="text-align: center">
            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                <tr>
                    <td rowspan="2" style="width: 65%; height: 100%; background-color: #003366; text-align: left;">
                        <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/vmn.jpg" Height="119px" Width="392px" /></td>
                    <td style="width: 35%; background-color: #003366; text-align: right;">
                        <span style="font-size: 24pt; color: #ffffff"><strong>
                            <asp:Image ID="Image2" runat="server" ImageUrl="../Images/jjl.jpg" />&nbsp;</strong></span></td>
                </tr>
                <tr>
                    <td style="width: 35%; background-color: #003366; text-align: right">
                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="right">
                                    <asp:Label ID="lblWelcome" runat="server" Visible="true" Text="Welcome Milind" CssClass="labelStyleSimpleBoldWhite" />&nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td align="right" style="height:8px">
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Button ID="btnLogOut" runat="server" Visible="true" Text="Sign Off" OnClick="btnLogOut_Click" />&nbsp;
                                </td>                                
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </div>
        <div>
            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; background-color:Black;">
                <tr>    
                    <td style="width:100%; height:4px; background-color:Silver;">
                    </td>
                </tr>
                <tr>
                    <td style="width:10%; height:25px;">
                        &nbsp;<asp:Label ID="lblNews" Text="News Headlines : " runat="server" CssClass="labelStyleSimpleBoldWhite" />
                    </td>
                    <td style="width:90%; height:45px;">
                        <telerik:RadRotator ID="RadRotator1" RotatorType="AutomaticAdvance" ScrollDirection="left" ScrollDuration="2000" runat="server" DataSourceID="xmlDataSource1"
                            Width="100%" Height="43px" FrameDuration="1" InitialItemIndex="-1">
                            <ItemTemplate>
                                <div class="newsFeed">
                                    <strong><a href='<%# XPath("link") %>'>
                                        <%# System.Web.HttpUtility.HtmlEncode(XPath("title").ToString())%>
                                    </a></strong>
                                </div>
                            </ItemTemplate>
                        </telerik:RadRotator>
                        <asp:XmlDataSource ID="xmlDataSource1" XPath="rss/channel/item" runat="server" DataFile="http://blogs.telerik.com/Blogs.rss">
                        </asp:XmlDataSource>    
                    </td>
                </tr>
                <tr>
                    <td style="width:100%; height:4px; background-color:Silver;">
                    </td>
                </tr>
            </table>
        </div>
        <div>
            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
                <tr>
                    <td style="width:100%; height:4px; background-color:silver;">
                    </td>
                </tr>
                <tr>
                    <td style="width:100%;">
                        <telerik:RadMenu ID="RadMenu1" runat="server" Skin="Web20" Width="100%">
                            <Items>
                                <telerik:RadMenuItem runat="server" Text="Root RadMenuItem1">
                                    <Items>
                                        <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 1">
                                        </telerik:RadMenuItem>
                                        <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 2">
                                        </telerik:RadMenuItem>
                                    </Items>
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem runat="server" Text="Root RadMenuItem2">
                                    <Items>
                                        <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 1">
                                        </telerik:RadMenuItem>
                                        <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 2">
                                        </telerik:RadMenuItem>
                                    </Items>
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem runat="server" Text="Root RadMenuItem3">
                                    <Items>
                                        <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 1">
                                        </telerik:RadMenuItem>
                                    </Items>
                                </telerik:RadMenuItem>
                            </Items>
                        </telerik:RadMenu>
                    </td>
                </tr>
                <tr>    
                    <td style="width:100%; height:4px; background-color:Silver;">
                    </td>
                </tr>
            </table>
        </div>
        <div>
            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                <tr>
                    <td align="center" style="width:100%;  height:450px; vertical-align:top;">
                        <telerik:RadSplitter ID="RadSplitter1" runat="server" CssClass="Outlook" LiveResize="True" ResizeMode="EndPane" Width="100%" BackColor="Transparent" Height="500px">
                            <telerik:RadPane ID="RADContentPanel" runat="server" BackColor="Transparent" Width="99%">
                                <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
                                </asp:contentplaceholder>
                            </telerik:RadPane>
                            <telerik:RadSplitBar ID="RadSplitbar1" runat="server" CollapseMode="Backward" BackColor="Transparent" ></telerik:RadSplitBar>
                            <telerik:RadPane ID="RadMenuPane" runat="server" Scrolling="None" BackColor="Transparent" Width="1%">
                                <telerik:RadSlidingZone ID="RadSlidingZone1" runat="server" BackColor="Transparent" SlideDirection="Left">
                                    <telerik:RadSlidingPane ID="RadSlidingPane1" runat="server" Title="Notes" BackColor="Transparent" > </telerik:RadSlidingPane>  
                                    <telerik:RadSlidingPane ID="RadSlidingPane2" runat="server" Title="Circulars" BackColor="Transparent" > </telerik:RadSlidingPane>  
                                </telerik:RadSlidingZone>
                            </telerik:RadPane>
                        </telerik:RadSplitter>
                    </td>
                </tr>
            </table>        
        </div>
    </form>
</body>
</html>

Here I am using the RSS feed from telerik. When the page is loaded it simply shows nothing. If I use the same rotator code in a normal page it produces the result.

Can someone tell me is there any thing wrong with the way it is used in master page ?

Thanks & Regards,
-Milind Shevade
Rob
Top achievements
Rank 1
 answered on 08 May 2010
4 answers
370 views
Hello,

In my grid's edit form template, I have an asp:Panel control that has the "Visible=false" attribute.  I only want to show that section of the edit form template in certain cases.  It should not be displayed for every item that is in edit mode.

I'm having trouble programmatically getting a reference to my panel.  I've tried accessing it in the ItemCommand and PreRender events for the RadGrid, but every time I cannot obtain a reference to an instance of that object.

Can anyone give me a general idea of what method/event I should be attempting to do this from?  Does it sound like I'm doing something wrong?

Thank you,

Eric Skaggs
Bill
Top achievements
Rank 2
 answered on 08 May 2010
2 answers
116 views
Hey guys,

I'm trying to make the solution described at the link below to work with GridHyperLink columns. The problem I'm running into is if I create a class that inherits from GridHyperLinkColumn and do nothing at all to it (it's an empty class - not doing the stuff in the link below even), using that column in place of the out of the box GridHyperLinkColumn causes there to be no contents of the column showing up in the grid. You can test this easily by taking any hyperlink column thats working fine and changing it's tag to refer to your custom hyperlink class. I believe this may be a bug, and we need this fixed so we can implement drop down filters at the top of hyperlink columns.

http://www.telerik.com/help/aspnet-ajax/grdfilteringwithdropdownlist.html
Eric Means
Top achievements
Rank 1
 answered on 07 May 2010
9 answers
437 views
I have a 2 level hierarchial RadGrid.  Each row in the MasterTable will have an ItemTemplate column with RadTextbox in it.  When the users enters a value in a textbox and then tabs out (blur) I want to be able to accomplish looping through all the childrows in client side script to extract values for those children only.  I'm trying to understand how to match up a MasterTable row with gridtableview in the grid.get_detailTables() collection.  Each parent row will only ever have 1 child table.  Right now I'm just fudging it by saying that there is a 1 to 1 relationship between the # of parent rows & the # of detailTables, so the index of any parent row is equal to the index of the matching detail table.  I'm sure this is a bad assumption.  Here's what I have so far, but I'm not sure if it's fool proof:

ASPX

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="HGridScript.aspx.vb" Inherits="HGridScript" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!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></title>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
    </telerik:RadScriptManager> 
    <div> 
        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"   
            GridLines="None">  
            <MasterTableView ClientDataKeyNames="Something" HierarchyLoadMode="Client">  
                <Columns> 
                    <telerik:GridTemplateColumn HeaderText="Text1" UniqueName="Text1">  
                        <ItemTemplate> 
                            <telerik:RadTextBox ID="txt1" runat="server" ></telerik:RadTextBox> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridBoundColumn DataField="Something" HeaderText="Something"></telerik:GridBoundColumn> 
                </Columns> 
                <DetailTables> 
                    <telerik:GridTableView Name="Level2" > 
                        <Columns> 
                            <telerik:GridTemplateColumn HeaderText="Text2" UniqueName="Text2">  
                                <ItemTemplate> 
                                    <telerik:RadTextBox ID="txt2" runat="server" ></telerik:RadTextBox> 
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn> 
                            <telerik:GridTemplateColumn HeaderText="ext" UniqueName="ext">  
                                <ItemTemplate> 
                                    <telerik:RadTextBox ID="lblExt" runat="server" BorderColor="Transparent" ></telerik:RadTextBox> 
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn> 
                            <telerik:GridBoundColumn DataField="SomethingElse" HeaderText="Something Else"></telerik:GridBoundColumn> 
                        </Columns> 
                    </telerik:GridTableView> 
                </DetailTables> 
                <RowIndicatorColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </RowIndicatorColumn> 
                <ExpandCollapseColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </ExpandCollapseColumn> 
            </MasterTableView> 
        </telerik:RadGrid> 
        <asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="GridScript()" /> 
    </div> 
        <script type="text/javascript">  
            function getItem(index) {  
                var grid = $find("<%=RadGrid1.ClientID %>")  
                var item = grid.get_masterTableView().get_dataItems()[index];  
                var lvl2Total = 0;  
                var lvl2Items = grid.get_detailTables()[index].get_dataItems();  
                for (var i = 0; i < lvl2Items.length; i++) {  
                    var txt2 = lvl2Items[i].findControl("txt2");  
                    lvl2Total += Number(txt2.get_value());  
                }  
                alert(lvl2Total);  
            }     
        </script> 
    </form> 
</body> 
</html> 
 
 

VB

Imports System.Data  
Imports Telerik.Web.UI  
 
Partial Class HGridScript  
    Inherits System.Web.UI.Page  
 
    Private Function CreateTable(ByVal ColumnName As String, ByVal Value As String) As DataTable  
        Dim dt As New DataTable  
        Dim c As New DataColumn(ColumnName)  
        dt.Columns.Add(c)  
        Dim r As DataRow = dt.NewRow  
        r(0) = Value  
        dt.Rows.Add(r)  
        r = dt.NewRow  
        r(0) = Value & " 2" 
        dt.Rows.Add(r)  
        Return dt  
    End Function 
 
    Protected Sub RadGrid1_DetailTableDataBind(ByVal source As Object, ByVal e As Telerik.Web.UI.GridDetailTableDataBindEventArgs) Handles RadGrid1.DetailTableDataBind  
        Select Case e.DetailTableView.Name  
            Case "Level2" 
                e.DetailTableView.DataSource = CreateTable("SomethingElse", "else Something")  
        End Select 
    End Sub 
    Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource  
        Me.RadGrid1.DataSource = CreateTable("Something", "some Data")  
    End Sub 
 
    Protected Sub RadGrid1_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGrid1.PreRender  
        For Each item As GridDataItem In Me.RadGrid1.MasterTableView.Items  
            CType(item("Text1").Controls(1), RadTextBox).Attributes.Add("onblur", "getItem('" & item.ItemIndex.ToString & "');")  
        Next 
    End Sub 
End Class 
 

Next, I think I may need something like below.  The equivalent of the inner loop is what I really need help converting to client script.  Please help.  Thanks!

        For Each item As GridDataItem In Me.RadGrid1.MasterTableView.Items  
            For Each child As GridDataItem In item.ChildItem.NestedTableViews(0).Items  
 
            Next 
        Next 
 
Rakesh
Top achievements
Rank 1
 answered on 07 May 2010
2 answers
151 views

I am using RadGrid in my web page (asp)

and in EditFormSettings - FormTemplate i have two RadComboBoxes with their datasources.

here is part of my code:

<FormTemplate>

<telerik:RadComboBox ID="cbCompany" runat="server" 
Enabled='<%#(Container.DataItem is Telerik.Web.UI.GridInsertionObject)%>' >

<telerik:RadComboBox ID="cbCompanyField" runat="server" 
OnSelectedIndexChanged="cbCompanyField_SelectedIndexChanged" />

<FormTemplate>

so, cbCompany is enabled only when i'm making Add New (rad commanditem), in case of editing it's enable is false.

plus when i'm changing cbCompanyField combo, cbCompany items mast change accordig as cbCompanyField selected value.

(on cbCompanyField_SelectedIndexChanged i change cbCompany datasource)

the problem is that, when i change cbCompanyField item in Add New mode, and the page is posting back, cbCompany's  enable is turning to false.

i wonder, is there any solution for this?

David Tabatadze
Top achievements
Rank 1
 answered on 07 May 2010
1 answer
169 views
Hello,

I need rounded corners textbox with empty message.

Textbox with FormDecorator gives me rounded corners, but as soon as I add some RadInputManager settings, i loose the rounded corners on the textbox.

How can I achieve that ?
robertw102
Top achievements
Rank 1
 answered on 07 May 2010
4 answers
87 views
Does somebody has an example for how Passing Grid.SelecteditemID to RadTabStrip

I appreciate your help
Bricton Perez
Top achievements
Rank 1
 answered on 07 May 2010
2 answers
93 views

Hi, i search in the forum and i had see that is a comune problem but following the instrunction doesn't work

Posting you some code

protected void rgrOrdEvo_DetailTableDataBind(object source, GridDetailTableDataBindEventArgs e)  
        {  
            e.DetailTableView.DataSource = dettaglio;  
        }  
 
 protected void rgrOrdEvo_NeedDataSource(object source, GridNeedDataSourceEventArgs e)  
        {  
            if (!e.IsFromDetailTable)  
            {  
                rgrOrdEvo.DataSource = this.DS();  
            }  
        }  
        } 
    <telerik:RadGrid ID="rgrOrdEvo" runat="server"  
        GridLines="None" AllowPaging="true" PageSize="15"  
        ondetailtabledatabind="rgrOrdEvo_DetailTableDataBind"   
            AutoGenerateHierarchy="true" Skin="Hay"  
            onitemdatabound="rgrOrdEvo_ItemDataBound"   
            onneeddatasource="rgrOrdEvo_NeedDataSource">  
    <PagerStyle Mode="NextPrevNumericAndAdvanced" />  
    <ClientSettings>  
    <Selecting  AllowRowSelect="true"/>  
    </ClientSettings>  
   <MasterTableView DataKeyNames="ORT.OTNUOR" TableLayout="Fixed" GroupLoadMode="Client">  
<DetailTables>  
   <telerik:GridTableView TableLayout="Fixed" GroupLoadMode="Client" EnableViewState="true"> 

how can i stop this disappear/show of the grid when i expand

thank you

Matteo Beretta
Top achievements
Rank 1
 answered on 07 May 2010
2 answers
148 views
Have a problem where I have a bunch of columns and am using horizontal scrolling.  Using a Frozen columns so that you can see the name of the person while viewing the MANY columns.  Occasionally , if the end user scrolls slowly wit hthe arrows the ends of the table get eaten off.   Below is the  code for the grid.  Nothing special.
<telerik:RadGrid ID="gridResults" runat="server" Skin="Office2007" AutoGenerateColumns="False" 
                            GridLines="None" Width='1100px'> 
                            <MasterTableView Width='100%'> 
                                <HeaderStyle HorizontalAlign="Left" Wrap="false" /> 
                                <ItemStyle HorizontalAlign="Left" Wrap="false" /> 
                                <AlternatingItemStyle HorizontalAlign="Left" Wrap="false" BackColor="#EEEEEE" /> 
                                <Columns> 
                                    <telerik:GridBoundColumn DataField="OfficerName" HeaderText="Officer Name" /> 
                                    <telerik:GridBoundColumn DataField="TotalCalls" HeaderText="Calls and Complaints" /> 
                                    <telerik:GridBoundColumn DataField="MisArrest" HeaderText="Misdemeanor Arrest" /> 
                                    <telerik:GridBoundColumn DataField="FelArrest" HeaderText="Felony Arrest" /> 
                                    <telerik:GridBoundColumn DataField="Court" HeaderText="Court" /> 
                                    <telerik:GridBoundColumn DataField="Accidents" HeaderText="Accidents Investigated" /> 
                                    <telerik:GridBoundColumn DataField="Citations" HeaderText="Citations" /> 
                                    <telerik:GridBoundColumn DataField="Warnings" HeaderText="Warnings" /> 
                                    <telerik:GridBoundColumn DataField="Training" HeaderText="Training" /> 
                                    <telerik:GridBoundColumn DataField="Supervision" HeaderText="Supervision" /> 
                                    <telerik:GridBoundColumn DataField="DutyOfficer" HeaderText="Duty Officer" /> 
                                    <telerik:GridBoundColumn DataField="MealsandBreaks" HeaderText="Meals and Breaks" /> 
                                    <telerik:GridBoundColumn DataField="OtherAgencies" HeaderText="Assist Other Agencies" /> 
                                    <telerik:GridBoundColumn DataField="CitizenAssist" HeaderText="Citizen Assist" /> 
                                    <telerik:GridBoundColumn DataField="Backup" HeaderText="Back/Up Assist" /> 
                                    <telerik:GridBoundColumn DataField="Escorts" HeaderText="Escorts" /> 
                                    <telerik:GridBoundColumn DataField="FieldInterview" HeaderText="Field Interview" /> 
                                    <telerik:GridBoundColumn DataField="Special" HeaderText="Special Detail" /> 
                                    <telerik:GridBoundColumn DataField="Radar" HeaderText="Radar Detail" /> 
                                    <telerik:GridBoundColumn DataField="Burglary" HeaderText="Burglary Reports" /> 
                                    <telerik:GridBoundColumn DataField="Theft" HeaderText="Theft Reports" /> 
                                    <telerik:GridBoundColumn DataField="BusinessChecks" HeaderText="Business Checks" /> 
                                    <telerik:GridBoundColumn DataField="HouseChecks" HeaderText="House Checks" /> 
                                    <telerik:GridBoundColumn DataField="Misc" HeaderText="Misc. Incidents" /> 
                                    <telerik:GridBoundColumn DataField="PatrolHours" HeaderText="Patrol Hours" /> 
                                    <telerik:GridBoundColumn DataField="PatrolMiles" HeaderText="Patrol Miles" /> 
                                    <telerik:GridBoundColumn DataField="Totals" HeaderText="Total For Period" /> 
                                </Columns> 
                            </MasterTableView> 
                            <ClientSettings> 
                                <Scrolling AllowScroll="true" UseStaticHeaders="true" FrozenColumnsCount="1" SaveScrollPosition="true" /> 
                            </ClientSettings> 
                        </telerik:RadGrid> 

Chris Griffin
Top achievements
Rank 1
 answered on 07 May 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?