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

I'm trying to get my panel content to inherit the CSS class of the DIV that surrounds the panel. We change the font and make the text a dark grey - but all the items inside the RanPanel are using this:

.RadPanelBar_Transparent a.rpLink, .RadPanelBar_Transparent div.rpHeaderTemplate, .RadPanelBar_Transparent .rpTemplate {
  1. colorblack;
  2.   fontnormal 12px/24px Tahoma,Arial,sans-serif;
}

so they don't match the rest of the page.

If I use Chrome's 'Inspect Element' screen to disable those two properties, everything appears as I want it to.


Is there an easy way to stop that rpTemplate from overriding the styling of items inside my panel item's <ContentTemplate> so it will properly match the rest of the page? I've tried setting a dummy CssClass  class on the Panel and Item that just inherits from it's parent container, but the rpTemplate is applied AFTER those.


Here's what my panel looks like:

<div id="page-formview-content">
    <div id="mainBody">
        <div style="float: left; width: 100%; padding-bottom: 4px; padding-top: 8px">
            <telerik:RadPanelBar ID="RadPanelBar1" runat="server" Width="100%" >
                <Items>
                <telerik:RadPanelItem Text="Test Panel 1" Expanded="true">
                <ContentTemplate>
                    <asp:Label ID="Label1" runat="server" Text="HIDE AND SHOW!">
                    </asp:Label>
                </ContentTemplate>
                </telerik:RadPanelItem>
                </Items>
            </telerik:RadPanelBar>
        </div>
    </div>
</div>


I want the label text to use the same styling as the rest of the items on the page. The text color is set in the CSS for the <body> tag of the master page, so reusing the CSS on the label itself isn't really an option. I'd prefer to just disable the rpTemplate styling somehow, or override it with inherit-only styles.


Thanks,
-Adam
Adam
Top achievements
Rank 1
 answered on 08 May 2012
1 answer
57 views
How to show different user controls on edit and insert operation?
Princy
Top achievements
Rank 2
 answered on 08 May 2012
3 answers
119 views
Hi,

Another issue found by our 508 team for radgrid table with pagination. When user tab through it, after the tab of the last column header of radgrid, it should goes to the 1st checkbox inside the radgrid table ( 1st row of the radgrid data table has checkbox), but instead, it come to the 1st link of pagination portion. The tab order is incorrect.

Is there any way to address it?

Thanks,
Wei
Princy
Top achievements
Rank 2
 answered on 08 May 2012
6 answers
171 views
Hi,

my requirement is to show list of values in a grid and when the user clicks on one of the columns, I have to display a radbutton. this button is on the page and is outside the grid
I am getting the commandname in the itemcommand event and trying to make radbutton visible.  button.visible=true. when i debug the code it looks like its working but the button is not diplayed. this button is invisible by default.
do i have to do a find control like i do for the controls inside the grid? if so what is the syntax for it?

Thanks.



rms
Top achievements
Rank 1
 answered on 08 May 2012
5 answers
134 views
I have a RadListView nested within a RadListView. The inner RadListView has LinkButtons for copying/deleting/organizing the elements. When the LinkButtons are clicked, the events fire and I copy/delete/reorganize the data, but the page doesn't get updated. If I refresh the page or execute another command, the data is refreshed...but it's always one click behind. It's obviously an event sequence and after lots of searching it sounds like I need to use the AjaxManager. I've been wresting with this too long and need help.

ASPX
I included surrounding controls just in case this affected the solution. The issues I'm having are with rlvGroups,

<telerik:RadMultiPage ID="rmpTabs" runat="server" SelectedIndex="0" Width="100%">
    <telerik:RadPageView ID="rpv1" runat="server">
        Page title: <asp:TextBox ID="txtTitle" runat="server"></asp:TextBox>
    </telerik:RadPageView>
    <telerik:RadPageView ID="rpv2" runat="server">
        <asp:Panel ID="pnlNotRelevant" runat="server">
        </asp:Panel>
    </telerik:RadPageView>
    <telerik:RadPageView ID="rpv4" runat="server">
        <asp:Panel ID="pnlItems" runat="server">
            <telerik:RadListView ID="rlvGroups" runat="server" OnItemDataBound="rlvGroups_ItemDataBound"
                Width="100%">
                <ItemTemplate>
                    <%# DataBinder.Eval(Container.DataItem, "Name")%>
                    <br />
                    <telerik:RadListView ID="rlvItems" runat="server" OnItemDataBound="rlvItems_ItemDataBound"
                        Width="100%">
                        <ItemTemplate>
                            <%# DataBinder.Eval(Container.DataItem, "Title")%>
                            <asp:LinkButton ID="lbUp" runat="server" OnCommand="lbUp_Command"><img src="arrow-up.png" /></asp:LinkButton>
                            <asp:LinkButton ID="lbDown" runat="server" OnCommand="lbDown_Command"><img src="arrow-down.png" /></asp:LinkButton>
                            <asp:LinkButton ID="lbEdit" runat="server" OnCommand="lbEdit_Command"><img src="edit.jpg" /></asp:LinkButton>
                            <asp:LinkButton ID="lbCopy" runat="server" OnCommand="lbCopy_Command"><img src="copy.jpg" /></asp:LinkButton>
                            <asp:LinkButton ID="lbDelete" runat="server" OnCommand="lbDelete_Command"><img src="delete.png" /></asp:LinkButton>
                        </ItemTemplate>
                    </telerik:RadListView>
                    <asp:LinkButton ID="lbAddPage" runat="server" Text="Add Page" OnCommand="lbAddPage_Command" />
                    <br />
                    <br />
                </ItemTemplate>
            </telerik:RadListView>
            <asp:LinkButton ID="lbAddGroup" runat="server" Text="Add Group" OnCommand="lbAddGroup_Command" />
        </asp:Panel>
    </telerik:RadPageView>
</telerik:RadMultiPage>

C#
Data is loaded from custom classes:
private void RefreshGroupsItems()
{
    rlvGroups.DataSource = tab.ViewX.Groups.Group;
    rlvGroups.DataBind();
}

protected void rlvGroups_ItemDataBound(object sender, RadListViewItemEventArgs e)
{
    if (e.Item.ItemType == RadListViewItemType.DataItem || e.Item.ItemType == RadListViewItemType.AlternatingItem)
    {
        //Get datarow
        Group group = (Group)(((RadListViewDataItem)e.Item).DataItem);

        //Find controls
        RadListView rlvItems = (RadListView)e.Item.FindControl("rlvItems");
        LinkButton lbAddPage = (LinkButton)e.Item.FindControl("lbAddPage");

        //Populate controls
        List<ListItem> data = DataHelpers.BuildListItem(group);
        rlvItems.DataSource = data;
        rlvItems.DataBind();
        lbAddPage.CommandArgument = group.ID.ToString();
    }
}

protected void rlvItems_ItemDataBound(object sender, RadListViewItemEventArgs e)
{
    if (e.Item.ItemType == RadListViewItemType.DataItem || e.Item.ItemType == RadListViewItemType.AlternatingItem)
    {
        //Get datarow
        ListItem item = (ListItem)(((RadListViewDataItem)e.Item).DataItem);

        //Find controls
        LinkButton lbUp = (LinkButton)e.Item.FindControl("lbUp");
        LinkButton lbDown = (LinkButton)e.Item.FindControl("lbDown");
        LinkButton lbEdit = (LinkButton)e.Item.FindControl("lbEdit");
        LinkButton lbCopy = (LinkButton)e.Item.FindControl("lbCopy");
        LinkButton lbDelete = (LinkButton)e.Item.FindControl("lbDelete");

        //Populate controls
        lbUp.CommandArgument = item.ID.ToString();
        lbDown.CommandArgument = item.ID.ToString();
        lbEdit.CommandArgument = item.ID.ToString();
        lbCopy.CommandArgument = item.ID.ToString();
        lbDelete.CommandArgument = item.ID.ToString();
    }
}

Please help!
Andrey
Telerik team
 answered on 08 May 2012
1 answer
57 views
hi all,

well i have a question, i am using a telerik RadGrid to bind the data from the server end and i need the filter that data on the client end without hitting the server again i.e. without getting the data back from database.

i know it is possible with using columns and binding the data back with GridBoundColumn but my problem is that i am using ItemTemplate within which i am creating the table to make it look just like my client needs, so is it possible to filter the data in the ItemTemplate without columns(gridboundcolumns).

i hope i make sense out of it.

Thanks in advance, 

waiting for the possible solution asap.

Gaurav Sharma
Andrey
Telerik team
 answered on 08 May 2012
4 answers
119 views
Hello,
I am using Jquery in RadGrid which is in RadAjaxPanel.
When I come for the first, Jquery is working fine.
If I do some calculation and page got postback, the same Jquery is not working.
RadGrid is in RadAjaxPanel and Jquery slider is in RadGrid.
What I have to do ?

TIA
Atchut
Top achievements
Rank 1
 answered on 08 May 2012
1 answer
65 views
I have the following scenario:
1. Editor is configured to use p tags as a line-breaks
2. insert the following HTML:
<div style="border-bottom: #ccc 1px solid; padding-bottom: 5px; background-color: #f7fafb; padding-left: 15px; padding-right: 10px; border-top: #ccc 1px solid; padding-top: 0px;">
<h5>On this page</h5>
<ul>
    <li>item one</li>
</ul>
</div>
3. switch to the design view and press enter after the item one node to add another list item
4. check the HTML

Result:
div tag is replaced with p one:
<p style="border-bottom: #ccc 1px solid; padding-bottom: 5px; background-color: #f7fafb; padding-left: 15px; padding-right: 10px; border-top: #ccc 1px solid; padding-top: 0px;">
<h5>On this page</h5>
<ul>
    <li>item one</li>
    <li></li>
</ul>
</p>
The browser is Internet Explorer 9

How can I make the editor not to replace div tag?
Rumen
Telerik team
 answered on 08 May 2012
7 answers
220 views
Hello,

In my grid I have several columns with items. To edit the items I use the popup editform. Some of the items in the grid I want to hide on the popup editform. Although I searched the forum and tried several solutions the problem is still there.

Here's my .aspx code:
<telerik:RadGrid ID="gvTasksDataSteward" runat="server" AutoGenerateColumns="False" 
            DataSourceID="dsTasks" GridLines="None" Skin="Office2007" > 
            <ClientSettings EnablePostBackOnRowClick="true">  
            <Selecting AllowRowSelect="true" /> 
        </ClientSettings> 
            <MasterTableView DataSourceID="dsTasks" Name="DatastewardTasks" DataKeyNames="TaskId" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" EditMode="PopUp">  
                <RowIndicatorColumn Visible="False">  
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </RowIndicatorColumn> 
                <ExpandCollapseColumn Visible="False" Resizable="False">  
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </ExpandCollapseColumn> 
                <Columns> 
                <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandProject" > 
                        <HeaderStyle Width="20px" /> 
                    </telerik:GridEditCommandColumn> 
                <telerik:GridBoundColumn DataField="TaskId" HeaderText="TaskId" UniqueName="TaskId" Visible="false"></telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="CompanyName" HeaderText="Company" SortExpression="Company" UniqueName="Company"></telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="ProjectName" HeaderText="Project" SortExpression="ProjectName" UniqueName="ProjectName"></telerik:GridBoundColumn> 
         <telerik:GridBoundColumn DataField="TaskDescription" HeaderText="TaskDescription" 
                        SortExpression="TaskDescription" UniqueName="TaskDescription">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Remarks" HeaderText="Remarks" SortExpression="Remarks" 
                        UniqueName="Remarks">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="StartDate" DataType="System.DateTime" HeaderText="StartDate" 
                        SortExpression="StartDate" UniqueName="StartDate" DataFormatString="{0:d}">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="SoortBewerking" HeaderText="SoortBewerking" SortExpression="SoortBewerking" 
                        UniqueName="SoortBewerking">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="RealHours" DataType="System.Decimal" HeaderText="RealHours" 
                        SortExpression="RealHours" UniqueName="RealHours" Visible="false">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="StatusId" UniqueName="StatusId" Visible="false"></telerik:GridBoundColumn> 
                      
                      
                    <telerik:GridButtonColumn ButtonType="PushButton" UniqueName="Accept" Text="Accept" ImageUrl="~/Images/OK.png" ShowInEditForm="false" CommandName="Accepted"></telerik:GridButtonColumn> 
                    <telerik:GridButtonColumn ButtonType="PushButton" UniqueName="NotAccept" Text="Not Accept" ImageUrl="~/Images/OK.png" ShowInEditForm="false" CommandName="NotAccepted"></telerik:GridButtonColumn> 
                    <telerik:GridButtonColumn ButtonType="PushButton" UniqueName="Executed" Text="Executed" ImageUrl="~/images/11new.gif" ShowInEditForm="false" CommandName="Executed" ConfirmText="Executed?"></telerik:GridButtonColumn> 
 
                </Columns> 
                <EditFormSettings CaptionFormatString="Edit: {0}" CaptionDataField="ProjectName">  
                    <PopUpSettings ScrollBars="Auto" ></PopUpSettings>  
                    <EditColumn ButtonType="ImageButton" CancelText="Cancel Edit" UpdateText="Update Task" 
                        InsertText="Insert User" UniqueName="EditCommandColumn">  
                    </EditColumn> 
                    <FormTableButtonRowStyle HorizontalAlign="Right"></FormTableButtonRowStyle> 
                </EditFormSettings> 
            </MasterTableView> 
        </telerik:RadGrid> 

And here's one of the solutions I've tried:

 

Protected Sub gvTasksDataSteward_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles gvTasksDataSteward.PreRender

 

       
        For Each item As GridDataItem In gvTasksDataSteward.EditItems  
            Dim itemToEdit As GridEditableItem = If((item.OwnerTableView.EditMode = GridEditMode.PopUp), DirectCast(item, GridEditableItem), DirectCast(item.EditFormItem, GridEditableItem))  
 
            itemToEdit("StatusId").Visible = False 
        Next
End sub

Toby
Top achievements
Rank 1
 answered on 08 May 2012
0 answers
63 views
Hi,

I have a grid with group headers, i need to do expand all/collapse all as well as ensure the normal expand/collapse works too. I achieved expand all/collapse all via the below js:

        var EXPAND_CSS_CLASS = "<%=CSSConstants.EXPAND_EXPERIENCE_CSS%>";//rgExpand
        var COLLAPSE_CSS_CLASS = "<%=CSSConstants.COLLAPSE_EXPERIENCE_CSS%>";//rgCollapse
       
        //Expands or collapses all group headers based on expandCollapseClass
        function ExpandCollapseAllGroups(isExpand) {
            var sourceClass = (isExpand) ? EXPAND_CSS_CLASS : COLLAPSE_CSS_CLASS;
            var destinationClass = (isExpand) ? COLLAPSE_CSS_CLASS : EXPAND_CSS_CLASS;
            var toolTip = "<%=Tokens.CandidateExpandGroupToolTipText %>";
            if (isExpand) {
                toolTip = "<%=Tokens.CandidateCollapseGroupToolTipText %>";
            }
            // change the +/- states
            $("." + sourceClass).each(function(button) {
                $(this).removeClass(sourceClass).addClass(destinationClass);
                //change the tool tip for expand/collapse buttons
                $(this).attr("title", toolTip);
            });
            // hide/show the rows
            $("#<%=m_UIExperienceGrid.ClientID %> .<%=CSSConstants.GRID_ROW_CSS %>, #<%=m_UIExperienceGrid.ClientID %> .<%=CSSConstants.GRID_ALT_ROW_CSS %>").each(
                function(button) {
                    if (isExpand) {
                        $(this).show();
                    } else {
                        $(this).hide();
                    }
            });
            //return false to prevent postbacks
            return false;
        }

The issue is, i am unable to do an individual expand/collapse due to the mark up for grid being tampered by some highlight javascript functionality built in our application which will merely add span tags around the keywords i search to highlight in my application. The keywords i search corresponds to words displayed in the header item of the grid. Once the markup is tampered, the telerik grid individual expand/collapse breaks. Hence i need to somehow remove the telerik generated expand/collapse js associated with the input tags that bear the class "rgExpand" or  "rgCollapse" and add custom js to expand/collapse the groups individually. I tried the below js, it is not working

    $(".<%=CSSConstants.EXPAND_EXPERIENCE_CSS%>, .<%=CSSConstants.COLLAPSE_EXPERIENCE_CSS%>").attr('onclick', '');
$(".<%=CSSConstants.EXPAND_EXPERIENCE_CSS%>, .<%=CSSConstants.COLLAPSE_EXPERIENCE_CSS%>").each(
        function() {
            $(this)[0].onclick = function() {
                //TODO: if you need to know if the element is expanded, use the next line of code... otherwise remove it
                //var isExpanded = $(this).attr("class") == "rgCollapse";
                $(this).parents("TR.<%=CSSConstants.GRID_ROW_GROUP_HEADER_CSS %>").next("TR").toggle();
            }
        });

Please suggest me a solution as i have pretty much exhausted all the options.

Thanks and regards,
Damodar
Damodaran
Top achievements
Rank 1
 asked on 08 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?