Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
215 views
I'm trying to do access the DataKeyField's value for whatever appointment was cilcked from the 

 

OnAppointmentClick event so that I can redirect to a different page with the DataKeyField's value sent along with it, which will be used to pull and display detailed data from the database.  I've searched the forums and can't seem to find out how this is done.  The scheduler is a read-only scheduler so using events that fire on modified appointments will not work.

The code is here:

<telerik:RadScheduler ID="ChangeCalendar" runat="server" DataKeyField="ChangeControlID"   
                    DataSubjectField="ChangeControlNumber" DataStartField="TargetStartDate" 
                    DataEndField="TargetEndDate" AllowDelete="False" OverflowBehavior="Expand"
                     OnAppointmentClick="ChangeCalendar_OnAppointmentClick"  
                        ReadOnly="True" SelectedView="MonthView">  
              
            </telerik:RadScheduler> 


I know this has to be easy... but I cannot seem to find anything about how to do this.

Thanks.

Marty
Top achievements
Rank 1
 answered on 11 Nov 2008
2 answers
168 views
I'm working with RadGrid and I would like to use it for viewing purposes only. I've set EnableViewState to false, but it still generates about 5K of viewstate data. How can I completely disable the viewstate or at least make it less than 1K?

Thanks.
Peter Zolja
Top achievements
Rank 1
 answered on 11 Nov 2008
1 answer
133 views
I know I am missing something painfully obvious here, but...

I have a Toolbar that I am using almost entirely with CodeBehind. It is built and programatically handled in C#.

I have a RadWindowManager with a couple of windows that I need to open by clicking on toolbar buttons. Is there an example of how to do this? I am getting into some really kludge javascript to prevent postbacks, show the window, etc...

Thanks,

Jim
Georgi Tunev
Telerik team
 answered on 11 Nov 2008
3 answers
143 views
Hello

I load nodes on-demand using a webservice into a radtreeview where some nodes should not be checkable. The RadTreeNodeData class does not have a Checkable property but I am using my own specilaized class where I have a "Checkable" member:

[Serializable]
  public class TreeNodeData
  {
    public string Text;
    public string Value;
    public int ExpandMode; //Telerik.Web.UI.TreeNodeExpandMode
    public bool Checkable;
  }

This does not work, all nodes are always checkable. Is there a way to on-demand load nodes that are not checkable?

regards

Tomas Särnhammar
Tomas
Top achievements
Rank 1
 answered on 11 Nov 2008
4 answers
172 views
I have managed to override the style properties of the grid but am having trouble figuring out where i would set the CssClass for items that are being dragged.  What I am after is the dashed line indicating where the item will be dropped if you let go of the mouse button.  Is there something like "ItemStyle-CssClass" for the Drop Indicator? 
Dave Myers
Top achievements
Rank 1
 answered on 11 Nov 2008
17 answers
186 views
Hello,

I use RadGrid with paging enabled. When there is only one page in the grid (items count < page size), pager is hidden, but after postback it becomes visible.

Please check my code.

Best regards, Oleg.

Windows XP SP2
RadGrid For ASP.NET AJAX 2008.1.619.35
Visual Studio 2008
.NET 3.5


Default.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ 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">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <asp:Button ID="Button1" runat="server" Text="Button" />
    <telerik:RadGrid ID="gridAccounts" runat="server" PageSize="20" AllowPaging="True"
        DataSourceID="ObjectDataSource1">
        <MasterTableView AutoGenerateColumns="false">
            <Columns>
                <telerik:GridBoundColumn DataField="Name" HeaderText="Name">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Amount" HeaderText="Amount">
                </telerik:GridBoundColumn>
            </Columns>
            <PagerStyle Visible="true" Mode="NextPrevNumericAndAdvanced" />
        </MasterTableView>
    </telerik:RadGrid>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetData"
        EnablePaging="true" SelectCountMethod="SelectCount" StartRowIndexParameterName="offset"
        MaximumRowsParameterName="count" TypeName="Class1">
        <SelectParameters>
            <asp:ControlParameter Name="searchContext" ControlID="ObjectDataSource1" PropertyName="NamingContainer.Page.SearchContext" />
        </SelectParameters>
    </asp:ObjectDataSource>
    </form>
</body>
</html>


Default.aspx.cs

using System;

public partial class _Default : System.Web.UI.Page
{
  public SearchContext SearchContext
  {
    get
    {
      return new SearchContext() { MinAmount = 10 };
    }
  }
}


Class1.cs

using System;
using System.Collections.Generic;

public class Class1
{
  public Transaction[] GetData(SearchContext searchContext, int offset, int count)
  {
    List<Transaction> transactions = new List<Transaction>();

    for (int i = 0; i < 3; ++i)
      transactions.Add(new Transaction() { Name = "T" + i, Amount = i });

    return transactions.ToArray();
  }

  public int SelectCount(SearchContext searchContext)
  {
    return 3;
  }
}

public class Transaction
{
  public string Name { get; set; }
  public int Amount { get; set; }
}

[Serializable]
public class SearchContext
{
  public int MinAmount { get; set; }
}
Jason
Top achievements
Rank 1
 answered on 11 Nov 2008
6 answers
109 views
I need to show a blocked time in the scheduler so I handle the TimeSlotCreated event and execute logic that determines the state of the timeslot.  If it's in a non-schedulable time range then I set e.TimeSlot.CSS = "blockedStyle".

This works fine except when I navigate backwards in time.  For example, I click the back 1 day button or I select a previous date in the popup calendar.

I notice that my event handler executes but when the calendar re-renders the blocked style disappears.  However if I cause it to postback using any other buttons, for example the "Today" button, a custom link or the Show All 24 hours button it correctly renders the blocked style again.

Is there a work around or patch for this?

Thanks,
Al
Peter
Telerik team
 answered on 11 Nov 2008
2 answers
145 views
I have a regular gridview that has a link that opens a rad window.  The rad window is defined as this:
<telerik:RadWindowManager ID="radWindows" runat="server" Left="" Modal="True" 
         Top="" VisibleStatusbar="false" VisibleTitlebar="True" Behaviors="Close"> 
        <Windows> 
            <telerik:RadWindow 
                ID="radEditPullDetail" 
                runat="server"  
                Height="568px" 
                Width="824px"                 
                Title="Details" 
                ClientCallBackFunction="CallBackFunction"  
                Behaviors="Maximize,Close"                 
                > 
            </telerik:RadWindow>             
        </Windows> 
        </telerik:RadWindowManager> 
On the rowdatabound event of the gridview, I assign the onclick method of a hyperlink control to this:
"window.radopen('newpage.aspx','radEditPullDetail'); return false;" 
Everything works good there.  Recently I added the Maximize behavior with the Close behavior.  When I open the rad window, maximize it, then click the "red X" to close, then reopen another rad window, the width is set to 100% and the height is what it should be.  Not the desired effect.  Furthermore, if you re maximize the window, it maximizes but then falls into (behind) the grayed out are of the page and you cannot click anything.  Any ideas?
Dennis
Top achievements
Rank 1
 answered on 11 Nov 2008
1 answer
76 views
Hello,

I want to simulate a click in my multi column combo when ma page is loaded.

Someone have an idea?

thank you
Yana
Telerik team
 answered on 11 Nov 2008
1 answer
204 views
Hello,

i'm trying to incorporate a rtl toolbar into my web app.
i've incountered the following problem:

Let's assume i have a rtl toolbar, where the first item is a drop down item. Basically, it'll go something like this:
<telerik:RadToolBar div="rtl" runat...>
<items>
<telerik:RadToolBarDropDown text="short">
<Buttons>
<telerik:RadToolBarButton text="very long text" />
</Buttons>
</telerik:RadToolBarDropDown>
</items>
</telerik:RadToolBar>

now, problems is that the sub menu which opened from the drop down button is aligned to the left of the drop down button himself, as inherited from the left to right layout.
But, when the toolbar is rtl, the alignement should be to the right.
What does it metter? in the example above, the submenu's text is much longer than the parent dropdown's text. Thus the submenu is opened into the right of the browser, creating a horizontal scrollbar, which you can't use to scroll right to view the submenu's full text, because once you click on it, the sub menu disappear.

I tried to see if that's a known issue, but couldn't find it..
Any suggestions?
Yana
Telerik team
 answered on 11 Nov 2008
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?