Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
148 views
Hi,

I had a problem with this situation. I tried to display a modal window over another modal window, that's works but  my second window isn't modal like my first. I set Modal="True" like my first window and this property doesn't take effect.

Do you have a workaround for me?

ty
Svetlina Anati
Telerik team
 answered on 27 Feb 2009
0 answers
149 views
Hello,
I  went through one problem,Actually I have one page suppose default.aspx,In that page I have 4 IFrames,
in each IFrame there is one .aspx page,my question is that When I go to default.aspx page,then before loading
the data of each frame individually(because in each frame it takes a time to load data)I want to show one flash image(.swf),
as data of particular frame is loaded that image  should be gone for that IFrame(whose data is loaded sucessfully).That means before loading of complete data that image should display and as data is loaded,image should be gone.
  Is there any way to acheive it,I will be thank full if i will get my solution.

Thanks
Rahul Khinvasara
Top achievements
Rank 1
 asked on 27 Feb 2009
4 answers
313 views
I dont like the look of the collapsed panel bar I would rather just have the panel bar fully expanded by default with no ability to collapse expand is there a way to do this or is there another control that can give me this functionality ??

thanks
Here is my code

Waiting for your reply please hurry!



 

<telerik:RadPanelBar ID="RadPanelBar1" Runat="server" DataFieldID="ID"

 

 

DataFieldParentID="ParentID" DataNavigateUrlField="URL"

 

 

DataSourceID="SqlDataSource1" DataTextField="Item" PersistStateInCookie="True"

 

 

Skin="Black" Font-Names="Agency FB">

 

 

<Items>

 

 

<telerik:RadPanelItem runat="server" Expanded="True" Selected="True" >

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

<CollapseAnimation Type="None" Duration="100"></CollapseAnimation>

 

 

 

<ExpandAnimation Type="None" Duration="100"></ExpandAnimation>

 

 

</telerik:RadPanelBar>

 

Paul
Telerik team
 answered on 27 Feb 2009
1 answer
154 views
Hi,
When I add my user control to a page that has a RadAjaxManager, everything is fine (since my user control uses a RadAjaxManagerProxy).
However, when I add my user control to a page without a RadAjaxManager, I receive the following error:
Object reference not set to an instance of an object.

Thanks
Nikolay Rusev
Telerik team
 answered on 27 Feb 2009
1 answer
116 views


   Hello All,

               I am using Hierarchical gridview,In that ,                      
                           when i am click + sign then inner grid open agin i am click on next + sign then these inner grid open. 
                          But i want to show , when i am click on 1st + sign then only their inner grid will be shown.



  Please Help me.
Thanx in advance.


Regards,
Ashwini
Daniel
Telerik team
 answered on 27 Feb 2009
2 answers
234 views
Hi

I have put a radajaxpanel in the window content that opens when
a check box is checked to display more items in a form.  

This adds height to the page and creates the need for scroll bars
(which appear) but I would prefer to automatically extend the height
of the window to accomodate the additional form items.
How can I do this from the code behind in the same sub that makes the
panel visible? (VB)

I am sure it is easy .. but I just can't figure it out.

I have tried this - but it does nothing - maybe because the window is not updated
at that point?
Protected Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged  
        If CheckBox1.Checked Then  
            RadAjaxPanel1.Visible = True 
            Dim RadWindow1 As New RadWindow  
            RadWindow1.Height = Unit.Pixel(450)  
        Else  
            RadAjaxPanel1.Visible = False 
        End If  
    End Sub 
thanks

Clive
Georgi Tunev
Telerik team
 answered on 27 Feb 2009
4 answers
153 views
Greetings,

Currently, I'm working on a project where we had a RadToolBar within a RadGrid.  A decision was made to take the Toolbar back out of the Grids and place them on top of the grid instead of inside of them.  Doing that is easy, but this makes things a bit complicated for working on adding/editing/deleting items within the grid.

My question is, is there a way to access the ItemCommand within the grid still with the toolbar?  The commandnames are the same in my toolbar, but getting them to the grid is a difficult task for me thus far.  If anyone has any help, I'd be most appreciative.

Thanks.
Veselin Vasilev
Telerik team
 answered on 27 Feb 2009
2 answers
67 views
In Moss 2007, i created a custom button in Tool bar of Rad Editor control. On clicking the button it will open the Image Picker.
It works fine in IE 7.0 but in firefox browser that custom button is not even visible.

Am I missing any line of code to make it visible & working in Firefox ??

With Best Regards
Nouman
Nouman
Top achievements
Rank 1
 answered on 27 Feb 2009
1 answer
200 views
Hi there,

My problem is the same as the first post in http://www.telerik.com/community/forums/aspnet-ajax/tooltip/problems-with-onajaxload-and-radtooltipmanager.aspx, in that the tooltip keeps appearing and disappearing without ever showing its content.  The original post was nearly two years ago, so I presume there is a solution now?  My code (which is within a master page) is below, in case it's useful.

Regards,

Ed Graham

<asp:Content ID="Content2" ContentPlaceHolderID="mainContent_lCol_PH" Runat="Server"
  <telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Position="TopRight" RelativeTo="Element" Width="320px" Height="260px" Animation="Resize" Skin="WebBlue" OnAjaxUpdate="OnAjaxUpdate"
  </telerik:RadToolTipManager> 
    <!-- MAIN CONTENT CONTAINER  - start  --> 
  <asp:Panel ID="pnlResults" runat="server" CssClass="panelScrollBar"
    <asp:Repeater ID="rptResults" runat="server" OnItemDataBound="RptDeptsItemDataBound"
      <ItemTemplate> 
      <b><%# ((System.Data.DataRowView)Container.DataItem)["University"] %></b><br /> 
      <i><%# ((System.Data.DataRowView)Container.DataItem)["Department"] %></i><br /> 
      <%# ((System.Data.DataRowView)Container.DataItem)["Address"] %><br /> 
      Phone: <%# ((System.Data.DataRowView)Container.DataItem)["Phone"] %><br /> 
      Fax: <%# ((System.Data.DataRowView)Container.DataItem)["Fax"] %><br /> 
      Website: <%# ((System.Data.DataRowView)Container.DataItem)["Website"] %><br /> 
      Head of department: <%# ((System.Data.DataRowView)Container.DataItem)["HoD"] %><br /> 
      <asp:LinkButton ID="lbMembersList" runat="server" OnClientClick="return false;">Full staff list</asp:LinkButton><br /><br /> 
      </ItemTemplate> 
    </asp:Repeater> 
  </asp:Panel> 
  <!-- MAIN CONTENT CONTAINER  - end  --> 
</asp:Content> 
 
 

    protected void RptDeptsItemDataBound(object sender, RepeaterItemEventArgs e) 
    { 
        if (!this.IsPostBack) 
        { 
            LinkButton lbMembersList = e.Item.FindControl("lbMembersList"as LinkButton; 
            DataRowView currentRow = (DataRowView)e.Item.DataItem; 
            //Add the image id to the tooltip manager 
            this.RadToolTipManager1.TargetControls.Add(lbMembersList.ClientID, currentRow.Row["University"].ToString(), true); 
        } 
    } 
 
    protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args) 
    { 
        string elementID = args.Value; 
        UpdatePanel up = args.UpdatePanel; 
        Label lbl = new Label(); 
        lbl.Text = elementID; 
        up.ContentTemplateContainer.Controls.Add(lbl); 
    } 

Svetlina Anati
Telerik team
 answered on 27 Feb 2009
1 answer
245 views
Hi Telerik forum, I have a simple problem I need help with.

I have a RadGrid that I need to populate with different data (depending on some parameters send to the page). I am trying to combine the two examples Edit on double click and Resizing RadGrid in RadSplitter to make a simple grid editor. In the source code here I just read an xml file to keep things simple.
I know that I do something fundamentally wrong, the question is what.
My two problems are:

1. If I try to change the grid page, all cells contains the text "System.Data.DataRowView" instead of the values and all column headings are blank.

2. If I double click a grid line to edit it, i get the following JavaScript error:
"Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Specified argument was out of the range of valid values. Parameter name: index"

Can someone please help me correct this code to make it work?

I'm using telerik ASPNET AJAX Q3 2008 and visual studio 2008, but i guess that doesn't matter.

I hope someone can help me?

Source files:

Default.aspx

<%@ Page Language="VB" CodeFile="Default.aspx.vb" Inherits="_Default" %> 
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.QuickStart" %> 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/tr/xhtml11/DTD/xhtml11.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head id="Head1" runat="server">  
<title>RadGrid Test</title> 
<style type="text/css">  
  html, body, form {  
  width: 100%;  
  height: 100%;  
  }  
</style> 
<script type="text/javascript" language="javascript">  
 
  var hasChanges, inputs, dropdowns, editedRow;  
  var lastRow = null;  
 
  function ClearEdit() {  
    var oGrid = $find("RadDataGrid");  
    if (oGrid && lastRow) {  
      var mtv = oGrid.get_masterTableView();  
      mtv.cancelUpdate(lastRow);  
    }  
  }  
 
  function EditRow() {  
    var oGrid = $find("RadDataGrid");  
    if (oGrid && editedRow)  
    {  
      var mtv = oGrid.get_masterTableView();  
      mtv.editItem(editedRow);  
      lastRow = editedRow;  
    }  
  }  
 
  function CheckUpdates(grid) {  
    if (lastRow) {  
      var mtv = grid.get_masterTableView();  
      if (hasChanges) {  
        if (confirm("Update changes?"))  
          mtv.updateItem(lastRow);  
      }  
      hasChanges = false;  
      var mtv = grid.get_masterTableView();  
      mtv.cancelUpdate(lastRow);  
      lastRow = null;  
    }  
  }  
 
  function RowClick(sender, eventArgs) {  
    CheckUpdates(sender);  
  }  
 
  function RowDblClick(sender, eventArgs) {  
    CheckUpdates(sender);  
    editedRow = eventArgs.get_itemIndexHierarchical();  
    setTimeout("EditRow()", 500);  
  }  
 
  function GridCommand(sender, args) {  
    if (args.get_commandName() != "Edit") {  
      editedRow = null;  
    }  
  }  
 
   function GridCreated(sender, eventArgs) {  
     var gridElement = sender.get_element();  
     var elementsToUse = [];  
     inputs = gridElement.getElementsByTagName("input");  
     for (var i = 0; i < inputs.length; i++) {  
       var lowerType = inputs[i].type.toLowerCase();  
       if (lowerType == "hidden" || lowerType == "button") {  
         continue;  
       }  
 
       Array.add(elementsToUse, inputs[i]);  
       inputs[i].onchange = TrackChanges;  
     }  
 
     dropdowns = gridElement.getElementsByTagName("select");  
     for (var i = 0; i < dropdowns.length; i++) {  
       dropdowns[i].onchange = TrackChanges;  
     }  
   }  
 
  function TrackChanges(e) {  
    hasChanges = true;  
  }  
 
  function ClientResized() {  
    $find("RadAjaxManager1").ajaxRequest('ChangePageSize');  
  }  
 
</script> 
</head> 
<body> 
    <form runat="server" id="mainForm" method="post" style="width: 100%;">  
        <telerik:RadScriptManager ID="ScriptManager1" runat="server" EnableTheming="True">  
        </telerik:RadScriptManager> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadDataGrid" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="RadDataGrid">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadDataGrid" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <telerik:RadSplitter ID="RadSplitter1" Runat="server" BorderStyle="None" FullScreenMode="True" Orientation="Horizontal">  
          <telerik:RadPane ID="RadPane1" Runat="server" OnClientResized="ClientResized" 
            EnableEmbeddedBaseStylesheet="False" EnableEmbeddedSkins="False" Height="100%"   
            Index="0" Skin="" Width="100%" Scrolling="None">  
            <telerik:RadGrid ID="RadDataGrid"  AutoGenerateColumns="false" 
              runat="server" AllowAutomaticUpdates="true" AllowMultiRowSelection="True"   
              AllowPaging="True" Height="97%" ShowStatusBar="true" Skin="Office2007"   
              Width="97%">  
              <HeaderContextMenu EnableTheming="True" Skin="Office2007">  
                <CollapseAnimation Duration="200" Type="OutQuint" /> 
              </HeaderContextMenu> 
              <PagerStyle Mode="NumericPages" /> 
              <ClientSettings> 
                <ClientEvents OnCommand="GridCommand" OnGridCreated="GridCreated" OnRowClick="RowClick" OnRowDblClick="RowDblClick" /> 
                  <Selecting AllowRowSelect="True" EnableDragToSelectRows="False" /> 
                  <Scrolling AllowScroll="True" UseStaticHeaders="False" FrozenColumnsCount="0" SaveScrollPosition="True" ></Scrolling>                    
              </ClientSettings> 
              <FilterMenu EnableTheming="True" Skin="Office2007">  
                <CollapseAnimation Duration="200" Type="OutQuint" /> 
              </FilterMenu> 
              <MasterTableView AutoGenerateColumns="false" EditMode="InPlace" EnableViewState="True" Width="100%">  
              </MasterTableView> 
            </telerik:RadGrid> 
          </telerik:RadPane> 
        </telerik:RadSplitter> 
    </form> 
</body> 
</html> 
 

Default.aspx.vb
Imports System  
Imports Telerik.Web.UI  
 
Partial Public MustInherit Class _Default  
  Inherits System.Web.UI.Page  
 
  Protected Sub RadDataGrid_ItemUpdated(ByVal source As ObjectByVal e As GridUpdatedEventArgs) Handles RadDataGrid.ItemUpdated  
    If Not e.Exception Is Nothing Then 
      e.KeepInEditMode = True 
      e.ExceptionHandled = True 
      ' Error  
    Else 
      Dim dataItem As GridDataItem = e.Item  
      ' Do Update  
    End If 
  End Sub 
 
  Sub addcolumn(ByVal name As StringByVal uniquename As StringByVal width As IntegerByVal FirstSelectColumn As Boolean)  
    Dim GridColumn As Object 
    If FirstSelectColumn Then 
      GridColumn = New GridClientSelectColumn  
      GridColumn.CommandName = name  
      GridColumn.Text = name  
    Else 
      GridColumn = New GridBoundColumn  
      GridColumn.DataField = name  
      CType(GridColumn, GridBoundColumn).ItemStyle.HorizontalAlign = HorizontalAlign.Left  
      CType(GridColumn, GridBoundColumn).ItemStyle.VerticalAlign = VerticalAlign.Top  
    End If 
    GridColumn.HeaderText = name  
    GridColumn.UniqueName = uniquename  
    GridColumn.Resizable = False 
    GridColumn.Reorderable = False 
    GridColumn.ItemStyle.Width = Unit.Pixel(width)  
    RadDataGrid.Columns.Add(GridColumn)  
  End Sub 
 
  Private Sub LoadGridData()  
    Dim oTable As New System.Data.DataTable("company")  
    oTable.ReadXml(Server.MapPath("TopCompanies.xml"))  
    RadDataGrid.DataSource = oTable  
    If Not Page.IsPostBack Then 
      addcolumn("Select""SelectColumn", 25, True)  
      addcolumn("CompanyId""CompanyIdColumn", 40, False)  
      addcolumn("CompanyName""CompanyNameColumn", 200, False)  
      addcolumn("Employees""EmployeesColumn", 100, False)  
    End If 
  End Sub 
 
  Private Sub RadDataGrid1_NeedDataSource(ByVal source As ObjectByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadDataGrid.NeedDataSource  
    LoadGridData()  
  End Sub 
 
  Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As ObjectByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest  
    Select Case e.Argument.ToString()  
      Case "ChangePageSize" 
        Dim rows As Integer = (Int32.Parse(Me.RadPane1.Height.Value.ToString()) - 106) / 27  
        If rows >= 1 Then 
          RadDataGrid.PageSize = rows  
          RadDataGrid.Rebind()  
        End If 
        Exit Select 
    End Select 
  End Sub 
 
End Class 
 

TopCompanies.xml
<?xml version="1.0" encoding="UTF-8"?>  
<NewDataSet> 
  <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">  
    <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">  
      <xs:complexType> 
        <xs:choice minOccurs="0" maxOccurs="unbounded">  
          <xs:element name="company">  
            <xs:complexType> 
              <xs:sequence> 
                <xs:element name="CompanyId" type="xs:int" minOccurs="0" /> 
                <xs:element name="CompanyName" type="xs:string" minOccurs="0" /> 
                <xs:element name="Employees" type="xs:int" minOccurs="0" /> 
              </xs:sequence> 
            </xs:complexType> 
          </xs:element> 
        </xs:choice> 
      </xs:complexType> 
    </xs:element> 
  </xs:schema> 
    <company> 
      <CompanyId>1</CompanyId> 
      <CompanyName>Wal-Mart Stores</CompanyName> 
      <Employees>1800000</Employees> 
    </company> 
    <company> 
      <CompanyId>2</CompanyId> 
      <CompanyName>McDonald's</CompanyName> 
      <Employees>447000</Employees> 
    </company> 
    <company> 
      <CompanyId>3</CompanyId> 
      <CompanyName>United Parcel Service</CompanyName> 
      <Employees>407000</Employees> 
    </company> 
    <company> 
      <CompanyId>4</CompanyId> 
      <CompanyName>Sears Holdings</CompanyName> 
      <Employees>355000</Employees> 
    </company> 
    <company> 
      <CompanyId>5</CompanyId> 
      <CompanyName>Home Depot</CompanyName> 
      <Employees>345000</Employees> 
    </company> 
    <company> 
      <CompanyId>6</CompanyId> 
      <CompanyName>Target</CompanyName> 
      <Employees>337000</Employees> 
    </company> 
    <company> 
      <CompanyId>7</CompanyId> 
      <CompanyName>Intl. Business Machines</CompanyName> 
      <Employees>329373</Employees> 
    </company> 
    <company> 
      <CompanyId>8</CompanyId> 
      <CompanyName>General Motors</CompanyName> 
      <Employees>327000</Employees> 
    </company> 
    <company> 
      <CompanyId>9</CompanyId> 
      <CompanyName>General Electric</CompanyName> 
      <Employees>316000</Employees> 
    </company> 
    <company> 
      <CompanyId>10</CompanyId> 
      <CompanyName>Citigroup</CompanyName> 
      <Employees>303000</Employees> 
    </company> 
    <company> 
      <CompanyId>11</CompanyId> 
      <CompanyName>Ford Motor</CompanyName> 
      <Employees>300000</Employees> 
    </company> 
    <company> 
      <CompanyId>12</CompanyId> 
      <CompanyName>Kroger</CompanyName> 
      <Employees>289000</Employees> 
    </company> 
    <company> 
      <CompanyId>13</CompanyId> 
      <CompanyName>Albertson's</CompanyName> 
      <Employees>240000</Employees> 
    </company> 
    <company> 
      <CompanyId>14</CompanyId> 
      <CompanyName>United Technologies</CompanyName> 
      <Employees>222200</Employees> 
    </company> 
    <company> 
      <CompanyId>15</CompanyId> 
      <CompanyName>Verizon Communications</CompanyName> 
      <Employees>217000</Employees> 
    </company> 
    <company> 
      <CompanyId>16</CompanyId> 
      <CompanyName>FedEx</CompanyName> 
      <Employees>215838</Employees> 
    </company> 
    <company> 
      <CompanyId>17</CompanyId> 
      <CompanyName>Safeway</CompanyName> 
      <Employees>201000</Employees> 
    </company> 
    <company> 
      <CompanyId>18</CompanyId> 
      <CompanyName>Altria Group</CompanyName> 
      <Employees>199000</Employees> 
    </company> 
    <company> 
      <CompanyId>19</CompanyId> 
      <CompanyName>Aramark</CompanyName> 
      <Employees>195000</Employees> 
    </company> 
    <company> 
      <CompanyId>20</CompanyId> 
      <CompanyName>Berkshire Hathaway</CompanyName> 
      <Employees>192012</Employees> 
    </company> 
    <company> 
      <CompanyId>21</CompanyId> 
      <CompanyName>AT&amp;T</CompanyName> 
      <Employees>189950</Employees> 
    </company> 
    <company> 
      <CompanyId>22</CompanyId> 
      <CompanyName>Delphi</CompanyName> 
      <Employees>185200</Employees> 
    </company> 
    <company> 
      <CompanyId>23</CompanyId> 
      <CompanyName>Bank of America Corp.</CompanyName> 
      <Employees>176638</Employees> 
    </company> 
    <company> 
      <CompanyId>24</CompanyId> 
      <CompanyName>J.P. Morgan Chase &amp; Co.</CompanyName> 
      <Employees>168847</Employees> 
    </company> 
    <company> 
      <CompanyId>25</CompanyId> 
      <CompanyName>Yum Brands</CompanyName> 
      <Employees>165920</Employees> 
    </company> 
    <company> 
      <CompanyId>26</CompanyId> 
      <CompanyName>HCA</CompanyName> 
      <Employees>165450</Employees> 
    </company> 
    <company> 
      <CompanyId>27</CompanyId> 
      <CompanyName>Lowe's</CompanyName> 
      <Employees>164794</Employees> 
    </company> 
    <company> 
      <CompanyId>28</CompanyId> 
      <CompanyName>PepsiCo</CompanyName> 
      <Employees>157000</Employees> 
    </company> 
    <company> 
      <CompanyId>29</CompanyId> 
      <CompanyName>Walgreen</CompanyName> 
      <Employees>155200</Employees> 
    </company> 
    <company> 
      <CompanyId>30</CompanyId> 
      <CompanyName>Wells Fargo</CompanyName> 
      <Employees>153500</Employees> 
    </company> 
</NewDataSet> 
 
Georgi Krustev
Telerik team
 answered on 27 Feb 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?