Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
206 views
I have grids that are not expanding to fill the complete witdth.  I used the default skin and just made two changes to it in regards to color and call it "MySkin". This is not happening to all my girds, just some of them and I can't seem to find what is causing this.

The grid works fine and the columns line up underneith the headers on localhost, but the servers we deploy to are the problem. The page loads and looks like it will line up underneith the headers for a brief second then shrinks.

Telerik.Web.UI.dll:  2010.1.415.35

<telerik:RadGrid ID="RadGrid1" 
 AllowMultiRowSelection="False"  
 AllowSorting="True"
 AllowNaturalSort="True" 
 AllowPaging="True" 
 AutoGenerateColumns="False" 
 AlternatingItemStyle-HorizontalAlign="Left"
 GroupingEnabled="True" 
 HeaderStyle-HorizontalAlign="Center" 
 Height="475px" 
 ItemStyle-HorizontalAlign="Left"
 OnSortCommand="RadGrid1_SortCommand" 
 OnNeedDataSource="RadGrid1_NeedDataSource"
 OnItemDataBound="RadGrid1_ItemDataBound" 
 PageSize="15" 
 ShowFooter="True" 
 ShowHeader="True" 
 ShowGroupPanel="False" 
 ShowStatusBar="True" 
 SelectedItemStyle-ForeColor="#000000"                         
 EnableEmbeddedSkins="False" 
 Skin="MySkin"                           
 Width="100%"
 runat="server">

 

<MasterTableView AllowMultiColumnSorting="True" DataKeyNames="ID" TableLayout="Fixed" HeaderStyle-Wrap="false" Width="100%">

 

Mike
Top achievements
Rank 1
 answered on 13 Jan 2012
1 answer
75 views
hello,
i am trying to add tooltip text to my hyper links, but when i save my item it saves everything except tooltip text. when i reopen my item i can not see tooltip text on HyperLink Manager tooltip box. am i missing something? how can i add tooltip to my links? is there any other ways?

thanks in advance.
Dobromir
Telerik team
 answered on 13 Jan 2012
1 answer
185 views
error: Unable to cast object of type 'Telerik.Web.UI.RadMultiPage' to type 'System.Web.UI.UserControl'.

When going through a user control for a EditFormUserControl and I wanted to list all the user controls on that page but doing a foreach loop I need a fairly consistent type to iterate through.  So how can I iterate through 'userControl' when it could be a lteral for a label or  a 'RadMultiPage' or a 'UserControl'.  I have tried ...string objectTypeName="RadMultiPage";

 

Type

 

T = Type

 

.GetType(objectTypeName);

 

((

typeof(T)))userControl).Controls

 

 

But I just wanter to be able to have a reursive call listing out all the children be them Usercontrol or Telerik User controls. 
Any Ideas ?
Doug

 

 

 

UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID);

foreach

 

(object uc in ((UserControl)userControl).Controls){}

 

Kate
Telerik team
 answered on 13 Jan 2012
2 answers
90 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
141 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
44 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
225 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
134 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
153 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
113 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?