Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
84 views
I'm using Telerik.Web.UI 2011.2.712.35 and want to use grouping. The group exapand/collapse works properly when UseStaticHeaders is set to False. But when UseStaticHeaders is set to True, expanding or collapsing a group cause a lot of white space between the header and the 1st grid row's data. Grid settings as per code below. See BeforeExpand.png and AfterExpand.png screenshots. Note: After forcing a postback, grid returns to BeforeExpand.png view.

 

<telerik:RadGrid ID="rgPOsNew" runat="server" ShowGroupPanel="True" AutoGenerateColumns="False" AllowPaging="False" AllowSorting="True" Width="98%" EnableTheming="False" GridLines="None"  OnNeedDataSource="rg_NeedDataSource">

 <ClientSettings AllowDragToGroup="True" AllowGroupExpandCollapse="True" AllowColumnsReorder="True">

    <Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True">

     </Resizing>

     <Scrolling AllowScroll="True" UseStaticHeaders="False" ScrollHeight="400px" />

 </ClientSettings>

 <HeaderStyle Wrap="True" HorizontalAlign="Center" VerticalAlign="Middle" Height="20px" />

 <GroupPanel>

 </GroupPanel>

 <MasterTableView HorizontalAlign="Center" GroupLoadMode="Client" Width="98%">

     <GroupByExpressions>

         <telerik:GridGroupByExpression>

             <GroupByFields>

                 <telerik:GridGroupByField FieldAlias="JobNumber" FieldName="JobNumber" />

                     </GroupByFields>

                         <SelectFields>

                     <telerik:GridGroupByField FieldAlias="JobNumber" FieldName="JobNumber" />

                     </SelectFields>

             </telerik:GridGroupByExpression>

         </GroupByExpressions>

     <GroupHeaderItemStyle BackColor="LightSteelBlue" />

     <RowIndicatorColumn>

     <HeaderStyle Width="20px" />

     </RowIndicatorColumn>

     <ExpandCollapseColumn Visible="False">

         <HeaderStyle Width="20px" />

     </ExpandCollapseColumn>

     <AlternatingItemStyle BackColor="#E0E0E0" />

     <ItemStyle BackColor="White" />

     <Columns>

 



RRH
Top achievements
Rank 1
 answered on 13 Jan 2012
1 answer
131 views
Hi Admin,

I want to fire RadTreeView to expand and load data, to nodes dynamically and automatically. When I use normal asp.net tree view and its property ''PopulateOnDemand" and set 'OnTreeNodePopulate' to fire a function, it does the pupose.
ASPX:-
<
asp:TreeView Runat="Server" OnTreeNodePopulate="Node_Populate" ID="treeView1"  OnTreeNodeExpanded="Node_Expand">
 
<Nodes>
 
<asp:TreeNode Text="ALL"  PopulateOnDemand= "true" Value="0"  />
 
</Nodes>
 
</asp:TreeView>


CS file:-

public
void Node_Populate(object sender, System.Web.UI.WebControls.TreeNodeEventArgs e)
    {
        if (e.Node.ChildNodes.Count == 0)
        {
            switch (e.Node.Depth)
            {
                case 0:
                    FillTerritories(e.Node);
                    break;
                case 1:
                    FillOrganizations(e.Node);
                    break;
                case 2:
                    FillOffices(e.Node);
                    break;
            }
        }
    }
So when the page loades,TreeView loades with a root node ("ALL") and hence forth, due to 'PopulateOnDemand' property its node gets fired(clicked), calling 'Node_Populate' function to handle the loading of nodes.


Now, THE QUESTION. Same thing I want in telerik. I already tried what documentation is available here and suggestion by experts here.
the is:- telerik property 'OnNodeExpand' fires only when a node is clicked by someone. I want to populate node automatically from root node itself. So please help what to do in this regard.

Here is what I have tried:-
ASPX File
<telerik:RadTreeView Runat="Server" ID="RadTreeView1" Skin="Vista" OnNodeExpand = "Rad_NodeExpand" >
</telerik:RadTreeView>

CS FILE
protected void Rad_NodeExpand(object sender, RadTreeNodeEventArgs e)
    {
        if (e.Node.Nodes.Count == 0)
        {
            switch (e.Node.Level)
            {
                case 0:
                    FillTerritories(e.Node);
                    break;
                case 1:
                    FillOrganizations(e.Node);
                    break;
                case 2:
                    FillOffices(e.Node);
                    break;
            }
        }
    }


     PLEASE DON'T REFER ME ANY DOCUMENT. SEE IF YOU CAN GET MY PROBLEM.

Thanks a lot

 

 

Bozhidar
Telerik team
 answered on 13 Jan 2012
1 answer
37 views
I have found that using the Media Manager to embed .mp3 files doesn't really work for me because the embedded code will only work in Internet Explorer.  In other browsers, either nothing is displayed or I am prompted to install a plugin (which isn't good because I don't know what plugins my end users will have in their browser).

What I would like to do instead is just create a link to the uploaded .mp3 file so that when they click on the link the file will open outside the browser.  I see that the Hyperlink Manager has a button to select a file from the Download Manager.  Can a similar button be added to select a file from the Media Manager?

Or is there another solution that would work better for this situation?  Whatever help you can provide would be appreciated.

Thanks.
Dan
Dobromir
Telerik team
 answered on 13 Jan 2012
2 answers
214 views
Hi there,

Im trying to use a RadButton to close a radwindow from with the window itself (via javascript). Is it possible to call a script and to close the window?

function getRadWindow()
            {
                var oWindow = null;
                if (window.radWindow) oWindow = window.radWindow;
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
                return oWindow;
            }
 
            function closeWindow()
            {
                getRadWindow().close();
            }



And here is the button:

<telerik:RadButton ID="CancelButton" runat="server" OnClick="closeWindow();" CssClass="clicker" Text="Cancel" UseSubmitBehavior="False" EnableEmbeddedScripts="false" CausesValidation="False" RegisterWithScriptManager="False">
    </telerik:RadButton>


I have tried everything, the script will only work if I use a pure HTML element. If I use the OnClick event I get the following error when the window opens: Compiler Error Message: CS1026: ) expected 


Thanks for your time

Peter
Peter
Top achievements
Rank 2
 answered on 13 Jan 2012
3 answers
125 views

Hello,
I have faced javascript issue in using RadInputManger on a composite control. The composite control having RadInputManager is used in custom user control. This custom user control is loaded in RadMultiPage where this causes javascript error (($find(‘”)… eval(disposescript[i])) )in ajax function below. Error occurs in line in bold below.

-------------------------
_updatePanel: function PageRequestManager$_updatePanel(updatePanelElement, rendering) {

for (var updatePanelID in this._scriptDisposes) {

 if (this._elementContains(updatePanelElement, document.getElementById(updatePanelID))) {

 var disposeScripts = this._scriptDisposes[updatePanelID];

 for (var i = 0, l = disposeScripts.length; i < l; i++) {

window.eval(disposeScripts[i]);

}

delete this._scriptDisposes[updatePanelID];

 }

}
-----------------------
If I remove use of RadInputManager from composite control, issue doesnt get produce. The error can be seen in Firebug in FF and IE developer in IE.

Thanks in advance,
Ravi

Vasil
Telerik team
 answered on 13 Jan 2012
0 answers
142 views
PFA for my design. It is implemented using Rad Tabstrip but it should be actual tab with round the edges and all. I have tried Outlook skin but again its repeating the tab because of increasing height. I have attached this screen graph also.
Shyam
Top achievements
Rank 1
 asked on 13 Jan 2012
1 answer
97 views
Hi,

 I have a Page 1 (using a Master) calling a dynamic UserControls. One of the Control UC1 has a RadGrid and a bunch of Client Side Javascripts to handle the onclientclicking of the gridTemplateColumns button or to handle onrowclick of the grid.

The Scripts are declared in the UC1 in a Telerik:RadCodeBlock. Initially, the page loads UC1 ( which has the grid and the js) and it works as expected... ( ie all Javascript is correctly loaded and functional). The Page 1 has some kind of custom Tab Control ( Non-telerik), which triggers a partial post back and regenerates the content of the placeholder by calling a different UC2 which does NOT have any javascript.

So far so good. Now in the logic of the page load of this Page 1, it keeps track of the last selected UC... In this case it is UC2, If I navigate to another Page 2, and come back to Page 1, UC2 is dynamically generated. When I click on TAB 1, to load UC1 ( which has the javascripts), this is where I get an uncaught reference error : ConfirmDelete is not found. ( which is one of the JS declared in the UC1 RadCodeBlock).

What am I doing wrong?

Thanks
Gotcha
Top achievements
Rank 1
 answered on 13 Jan 2012
2 answers
84 views
Hi guys,

Hope you all had a good Xmas/New year.

We are using the Ajaxspellchecker that is built into the radeditor and I have come across an issue where the spell checked content is being cached on the server.

We use a Big IP F5 load balancer to serve up all content and it is this that is holding on to the cache. In order to get around this we need to add rules of what files to exclude from cache. Are you able to help in advising what files we would need to exclude to prevent the spell checker from being cached?

Thanks for your help.

Jibber4568
Jibber4568
Top achievements
Rank 1
 answered on 13 Jan 2012
1 answer
89 views
Hi there,

I have two list box. First List box filled with items, and all items are with checkBox. how can i transfer multiple data from first list box to second list box based on selected checkBox.

and when data transferred, then transferred data should be deleted from First list box.

and how can i handle Multiple item "Drag and Drop" in above mentioned scenario.
Alok
Top achievements
Rank 2
 answered on 13 Jan 2012
6 answers
390 views

Hi,

I have this weird behaviour on one of my radgrid where the height is cut off. So the area where the rows are displayed are shorter ( I think its the rgDataDiv) .I have to say the page i have it it is quiet complex and involves a lot of dynamic controls... not sure if this is the cause...but this behaviour is only seen after a sequence of clicks ( i can always reproduce it ).

Landing on the page originally does not show the bug, but after a series of clicks ( a consistent pattern ) it happens... I'm gonna try to post my grid source and the behaviour and the generated HTML first to see... hopefully its just a stupid setting i forgot to set which you can point out...

Otherwise, If required, I'll post the full page...
Here's the Grid... Notice I've forced it to have a height of 493px.

<div style="margin-left: 12px; margin-top: 40px; clear: both;">
    <%--Grid Selected Shopping List--%>
    <telerik:RadGrid ID="grdSelectedList" runat="server" AutoGenerateColumns="False"
        CellSpacing="0" GridLines="None" ShowHeader="False" OnNeedDataSource="grdSelectedList_NeedDataSource"
        OnItemCommand="grdSelectedList_ItemCommand" OnItemCreated="grdSelectedList_ItemCreated"
        OnItemDataBound="grdSelectedList_ItemDataBound" Height="493px" Width="595px"
        Skin="gmBlueGrid" EnableEmbeddedSkins="False" Style="outline: none;" EnableViewState="false">
        <GroupingSettings ShowUnGroupButton="True" />
        <ClientSettings>
            <Selecting AllowRowSelect="True" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            <ClientEvents OnRowClick="grdSelectedList_RowClick" />
        </ClientSettings>
        <MasterTableView DataKeyNames="Account_ID, Item_ID, List_ID, Product_ID"
            ClientDataKeyNames="Account_ID, Item_ID, List_ID, Product_ID">
            <GroupByExpressions>
                <telerik:GridGroupByExpression>
                    <SelectFields>
                        <telerik:GridGroupByField FieldName="Category_Name" />
                    </SelectFields>
                    <GroupByFields>
                        <telerik:GridGroupByField FieldName="Category_Name" />
                    </GroupByFields>
                </telerik:GridGroupByExpression>
            </GroupByExpressions>
            <NoRecordsTemplate>
                This list is empty.<br />
                Click in "Add an Item" or "Browse Aisles" to add items to this list.
            </NoRecordsTemplate>
            <CommandItemSettings ExportToPdfText="Export to PDF" />
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px" />
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                <HeaderStyle Width="20px" />
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn FilterControlAltText="Filter CategoryCol column" UniqueName="CategoryCol"
                    DataField="Category_Name" Groupable="true" Visible="False">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn FilterControlAltText="Filter DescriptionCol column" UniqueName="DescriptionCol"
                    HeaderStyle-Width="455px">
                    <ItemTemplate>
                        <div style="width: 455px; clear: both; font-weight: bold; margin-left: -5px;">
                            <asp:Label ID="lblItemDescription" runat="server" CssClass="blackHyperlink"></asp:Label>
                        </div>
                        <div class="slGridDescription" style="margin-left: -5px;">
                            <%# DataBinder.Eval(Container.DataItem, "Detail_Line_Display") %></div>
                    </ItemTemplate>
                    <HeaderStyle Width="455px"></HeaderStyle>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn FilterControlAltText="Filter QtyCol column" UniqueName="QtyCol"
                    DataField="Size_Description" HeaderStyle-Width="70px" ItemStyle-Font-Bold="true"
                    ItemStyle-HorizontalAlign="Right">
                    <HeaderStyle Width="70px"></HeaderStyle>
                    <ItemStyle HorizontalAlign="Right" Font-Bold="True"></ItemStyle>
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn>
                    <ItemTemplate>
                        <telerik:RadButton ID="btnDeleteItem" runat="server" CommandName="DeleteItemFromShoppingList"
                            OnClientClicking="ConfirmDelete" Width="18" Height="20">
                            <Image ImageUrl="..\Images\icoDeleteRedX.gif" />
                        </telerik:RadButton>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
        <FilterMenu EnableImageSprites="False">
            <WebServiceSettings>
                <ODataSettings InitialContainerName="">
                </ODataSettings>
            </WebServiceSettings>
        </FilterMenu>
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
            <WebServiceSettings>
                <ODataSettings InitialContainerName="">
                </ODataSettings>
            </WebServiceSettings>
        </HeaderContextMenu>
    </telerik:RadGrid>
    <br />
</div>

Attached are 4 images:
Generated HTML output of the Grid before; Note the height in the outer div of height 493px and the inner rgDataDiv ( I'm assuming it is inherited from the RadGrid declaration )
Generated HTML output of the Grid after; the height of outer div is still 493, but the rgDataDiv is now set to 300 px? Not sure where this comes from .
Display Before and After


Additional Information regarding the set up , in case it is related to the way this grid is set up:
I have modified the gridCSS so that it displays according to a spec i received... The Rows are always grouped by the category ...

Regarding the Page / UC set up, I have a Page 1 which uses a Master Template. In the Page, it has 3 states ( 3 custom NON-Telerik TABS ). By default it calls this dynamic UC (call it TAB 1) which has the RadGrid. When I Click on TAB 3, it calls another Dynamic UC replacing the content of the placeholder completely. Now I leave this page to Page 2, then come back to Page 1. This time, because I have a Session variable to save the state of the last Visited TAB in page 1, It loads Page 1 with TAB 3. When I click on TAB 1, to display the RadGrid , this is where this behaviour is obtained.

Pavlina
Telerik team
 answered on 13 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?