Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
163 views
When I resize a scheduler's height on the client side, the scheduler isn't redrawn. From searching the forums, it looks like what I need is to call repaint(). This method seems to no longer be available though (I'm using Q2 2009). Has another method replaced this, or is there something I'm missing that would make the scheduler resize when I change it's height?

Thanks!

Jeff
T. Tsonev
Telerik team
 answered on 05 Aug 2009
1 answer
116 views

Hello Support and Telerik Team,

I need to solve the following Grid behavior.

I  use a hierachical RadGrid to display a Overview in a GRid  with 4 Layers. On selecting a Item I redirect to the related Detail Page, If i go back from there, I need to restore the last Grid View

The Rad Grid is bound with 4 SQLDatasoures, one for each Grid / Subgrid Layer

I need to save an restore
> selected Page
> PageSize
> Last Search
> Last Hierachical Structure  ( all expanded Items in the last View )

The First ponits are solved, but I find no good way to solve the  last Point with accepable Performance.

I need to save each expaned Item of the Grid, and when the User come backs to page, I need to restore the last View.

I tryed to use the Itemcommand Event to save the Expaned Items with HierachicaltemIndex.
I tryed to use the radGrid_Prerender Event to restore the view.

1. Problem
> The First Expand Layer Action fires no Postback, because the Data seems to be Precached in the Grid on First Load
> The Sec Expand Layer fires a Postback, but I wonder how to find the Partent Hierachicalindex

In the Prerender i walk through all Hierachical Items, and If the Hierachical Index is in  my Saved List, I set Expanded = true.
Because the first layer makes no Postback, It is never in the  List and I can't expand it, If I expand a Child, the Partent is not expaned automatically.

One Point which makes the behavior mre difficult is, that the Overview and the Detail is in one aspx  Page with a Muliview Control in a Updatepanel. Switching between Master and detail makes only a simpel Postback, no complete Reload of the hole page-

Is there a known best Practise to solve my behavior?



Kind Regards


  










Tsvetoslav
Telerik team
 answered on 05 Aug 2009
4 answers
134 views
Hi Guys,

I'm new with Prometheus, and here is what I need and what I get.

I need load on demand functionality, which will work like this:
If user click on arrow to open dropdown, then click on "Down" button on keyboard to go next record below and if this is the last record in current batch next batch is called from the server (call ItemsRequested?)

Now if you will go to the demo http://www.telerik.com/DEMOS/ASPNET/Prometheus/Combobox/Examples/PopulatingWithData/AutoCompleteSql/DefaultCS.aspx

And try to move down with keyboard, after the last visible record - you will get not next batch of record - you will get first record and note at the bottom "Items 1-1 out of 1" which is absolutely not correct.
Simon
Telerik team
 answered on 05 Aug 2009
3 answers
160 views
Hi. I have a two divs inside a RadDock that are positioned side-by-side. in the second div there is a RadTabStrip. The page loads fine but when i hover over any of the tabs, the dock automatically resizes to the bottom of the RadMultiPage. It basically cuts off part of the first div. This only happens in IE6. It works fine in FF3.x, IE7 and IE8. I've placed the divs and tabstrip outside the dock and they work fine. If I set the height of the dock in pixels to any height the problem goes away, but setting it to 100% or auto doesn't.

Daniel
Pero
Telerik team
 answered on 05 Aug 2009
5 answers
311 views
Hi,
I have seen the following example for deleting an appointment within an advanced edit template;

<

 

script type="text/javascript">

 

function

 

DeleteAppointment()

 

{

 

var scheduler = $find("<%= Owner.ClientID %>");

 

 

var app = scheduler.get_currentAppointment();

 

 

scheduler.deleteAppointmentWithConfirmation(app);

scheduler.hideAdvancedForm();

 

return false;

 

}

</

 

script>

This example is used within a usercontrol, I have an advanced edit template within the aspx page as opposed to usercontrol, how could I use the above or similar in my advanced edit template to delete an appointment.

Thanks.

 

Karl
Top achievements
Rank 1
 answered on 05 Aug 2009
1 answer
149 views
I have a rad panel that I have put a rad tree view in. However, now that the rad tree is within the panel, I cannot get it to collapse. It is always expanded and won't collapse even if you click the button. The two other panels have static data in them and they collapse fine. Can anyone help me with this issue? Here is my code

<%@ Master Language="VB" AutoEventWireup="false" Debug="True" %>

<%@ 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">
<%@ import namespace="System.Data" %>
<%@ import namespace="System.Data.Sql" %>
<%@ import namespace="System.Data.SqlClient" %>
<%@ import namespace="Telerik.Web.UI" %>

<script runat="server">
    
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        
        If Not Page.IsPostBack Then
            
            Dim tree As RadTreeView = DirectCast(RadPanelBar1.Items(0).FindControl("RadTreeView1"), RadTreeView)
            'here is where the error is. it is saying that
            'createtable is null
            tree.DataSource = CreateTable()
            tree.DataFieldID = "ID"
            tree.DataFieldParentID = "ParentID"
            tree.DataTextField = "Text"
            tree.DataBind()
                        
        End If
    End Sub 'page_load
    
    'this function creates a datatable for the rad
    'tree that is in the events panel
    Private Function CreateTable() As DataTable
        'set up my connection to the database
        Dim conn As New SqlConnection
        conn.ConnectionString = ConfigurationManager.ConnectionStrings("connectionString").ConnectionString

        Dim table As DataTable = New DataTable()
        table.Columns.Add("ID")
        table.Columns.Add("ParentID")
        table.Columns.Add("Text")

        'this is a counter for the id fields
        'of the data table
        Dim count As Integer = 1
        
        'this adds the parent categories to the
        'datatable
        Dim categoryQuery As New SqlCommand
        conn.Open()
        categoryQuery.Connection = conn
        categoryQuery.CommandText = "select CategoryId, Name from categories"
        Dim cdr As SqlDataReader = categoryQuery.ExecuteReader()
        While cdr.Read()
            
            If (cdr.Item(0).ToString <> "") Then
                
                table.Rows.Add(New String() {count.ToString, Nothing, cdr.Item(1).ToString})
                'we have to increment count to keep an id for the data table
                count = count + 1
                
            End If
            
        End While 'while cdr.Read()
        conn.Close()
        conn.Open()
        'this adds the events with their parent category
        'id to the datatable
        Dim eventQuery As New SqlCommand
        eventQuery.Connection = conn
        eventQuery.CommandText = "SELECT eventid, FK_CategoryID, name from events"
        Dim edr As SqlDataReader = eventQuery.ExecuteReader()
        While edr.Read()
            
            If (edr.Item(0).ToString <> "") Then
                
                table.Rows.Add(New String() {count.ToString(), edr.Item(1).ToString, edr.Item(2).ToString})
                'we have to increment count to keep an id for the data table
                count = count + 1
                
            End If
            
        End While 'while edr.Read()
               
        Return table

    End Function 'CreateGenreTable

</script>

<head runat="server">
    <title></title>
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadPanelBar ID="RadPanelBar1" runat="server" Skin="Web20" ExpandMode="SingleExpandedItem">
        <CollapseAnimation Type="None" Duration="100"></CollapseAnimation>
        <Items>
            <telerik:RadPanelItem runat="server" Text="Events">
                <ItemTemplate>
                    <telerik:RadTreeView ID="RadTreeView1" runat="server" Skin="Web20">
                        <CollapseAnimation Type="OutQuint" Duration="100"></CollapseAnimation>
                        <ExpandAnimation Duration="100"></ExpandAnimation>
                    </telerik:RadTreeView>
                </ItemTemplate>
            </telerik:RadPanelItem>
            <telerik:RadPanelItem runat="server" Text="Calendar">
                <Items>
                    <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 1">
                    </telerik:RadPanelItem>
                    <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 2">
                    </telerik:RadPanelItem>
                </Items>
            </telerik:RadPanelItem>
            <telerik:RadPanelItem runat="server" Text="Root RadPanelItem3">
                <Items>
                    <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 1">
                    </telerik:RadPanelItem>
                    <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 2">
                    </telerik:RadPanelItem>
                </Items>
            </telerik:RadPanelItem>
        </Items>
        <ExpandAnimation Type="None" Duration="100"></ExpandAnimation>
    </telerik:RadPanelBar>
    <div>
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
        </asp:ContentPlaceHolder>
    </div>
    </form>
</body>
</html>

In case you want to see what I'm trying to do. You can go here
http://alpha.clickablecommunity.com/

Veselin Vasilev
Telerik team
 answered on 05 Aug 2009
1 answer
125 views
Is there a way to skin the RadMultiPage so that it appears to blend with the selected tab?  I am using the Office2007 skin and would like the background underneath all my  rad page views to have the same blue shade that is the very bottom row of pixels on the selected tab.
In the future, I would like to allow users to select their own skin, so if there was a non-hardcoded way to do this, I would really prefer it.
Kamen Bundev
Telerik team
 answered on 05 Aug 2009
3 answers
134 views
Hello,
I am adding a row to a child grid in the OnInsertCommand event. This is working as expected. But I would like to move to the last page in the grid and select the row that was just inserted. I am doing the following, but I always remain on the first page of the child grid.
protected void RadGrid1_InsertCommand(object source, GridCommandEventArgs e) 
{ 
    string serverID = null; 
    string insertType = "master"; 
     
    GridEditFormItem gridEditFormItem = (GridEditFormItem)e.Item; 
 
    Hashtable ht = new Hashtable(); 
    gridEditFormItem.ExtractValues(ht); 
 
 
    if ("Systems".Equals(e.Item.OwnerTableView.Name)) 
    { 
        GridDataItem parentItem = (GridDataItem)e.Item.OwnerTableView.ParentItem; 
 
        serverID = parentItem.OwnerTableView.DataKeyValues[parentItem.ItemIndex]["ServerID"].ToString(); 
        insertType = "detail"; 
    } 
     
    presenter.InsertRecord(serverID, ht, insertType); 
     
    XmlDataSource1.Save(); 
     
    //rebind to get the real number of pages (incase adding an item increased the page count 
    RadGrid1.Rebind(); 
    if ("Systems" != e.Item.OwnerTableView.Name) 
    { 
        //set to last page 
        RadGrid1.CurrentPageIndex = RadGrid1.PageCount - 1; 
 
        //after changing page, need to rebind 
        RadGrid1.Rebind(); 
    } 
    else 
    { 
        GridTableView table = e.Item.OwnerTableView; 
         
        //set to last page 
        table.CurrentPageIndex = table.PageCount - 1; 
 
        //after changing page, need to rebind 
        table.Rebind(); 
         
    } 
} 

In this example, "Systems" is the name of the Detail grid view.
also, is there away to do this without doing so many rebind calls?
Thanks
-marcos


Sebastian
Telerik team
 answered on 05 Aug 2009
1 answer
176 views
<telerik:radupload id="RadUpload1" runat= "server"
    allowedfileextensions=".doc,.rtf,.txt" />
<asp:customvalidator 
runat="server" id="CustomValidator1" 
    display="Dynamic"
    clientvalidationfunction="ValidateRadUpload1"
   >
        Invalid extensions.
</asp:customvalidator>

<asp:button runat="server" id="Button1" text="Submit" />
<script type="text/javascript">
function ValidateRadUpload1(source, arguments)
{
    arguments.IsValid = GetRadUpload('<%= RadUpload1.ClientID %>').ValidateExtensions();
}
</script>


i have 4 tabstrips and in the 3rd tab i m using radupload.

when i use the above code then error occured "the object doesnt support this property or method"

please help me
Princy
Top achievements
Rank 2
 answered on 05 Aug 2009
3 answers
146 views
Hi,

I was using RADGrid Q3 2007 release, in that the following highlighted properties were available:

<radG:RadGrid ID="rgMemberResult" BackColor="white" runat="server" AllowPaging="true" AutoGenerateColumns="false"
EnableAJAX="true" EnableAJAXLoadingTemplate="true" LoadingTemplateTransparency="20"
        EnableOutsideScripts="true" 
<ClientSettings ApplyStylesOnClient="true">
</radG:RadGrid>

When i upgraded the control to Q2 2009 release, the above specified properties were not supported. Seems to be that they are obsolete. Please let me know, whether any alternate properties available or by default it does support those properties?

Thanks
Viswa
Dimo
Telerik team
 answered on 05 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?