Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
132 views
hello,

in my application i have the following scenario:

From a simple ASP.NET page with a few ASP.NET-controls like DropDownList an RadioButton, the user can select a UserControl with an build-in RadGrid. The user first enters some Information and select some values in the ASP.NET page, then he presses a button to load the control based on the selected values (other values loads the same control with different data in the build-in RadGrid).
The Control ist loaded with the LoadControl() from Class Page, whenever the user presses the button.
The Control has a Page_Load with the following code:

if(!IsPostBack) 
  RadGrid.DataSource = my_dataSource; 
  RadGrid.DataBind() 

The RadGrid´s DataSource is updated on every click in the ASP.NET-Page.
In addition, the NeedDataSource Method is implemented:

protected void RadGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e) 
    RadGrid.DataSource = my_dataSource; 

The following error occurs:

When the user presses the button the first time the control and the RadGrid are loaded correctly. Then, if the user chance the values in the ASP.NET-page and presses the button again the "old" build-in RadGrid is still there!
In debug-mode i figured out that the NeedDataSource is not called, after the control was loaded again.
I try to set the DataSource in the PageLoad on every PostBack, and it works! The new build-in RadGrid was loaded. But then there is an another problem: if the user presses the hide-button, after he has expanded a hierachy nothing happens.

How is it possible to bring these two things (load the RadGrid correctly and hide a hierachy) together?

Thanks for help!




Sebastian
Telerik team
 answered on 15 Oct 2009
1 answer
88 views
Hello,

Is there a way to replace the AjaxControlToolkit accordion with some radcontrol ?

Thanks
CS

Paul
Telerik team
 answered on 15 Oct 2009
1 answer
577 views
Is this the best way to accomplish this?  If use one other the other for all browser, one browser works and then the other stops working.

Right now, for this to work in each browser I have to do the following...

For Chrome/FireFox/Safari...  I have to call add_init

For IE... I have to call add_load

    <script language="javascript" type="text/javascript"
        function OnLoad() { 
            var appVersion = navigator.appVersion; 
 
            if (appVersion.indexOf('MSIE') > 1) { 
                Sys.Application.add_load( 
                    function() { 
                        var zoneDetails = $find('radZone1'); 
                        var zoneStatus = $find('RadDockZone1'); 
 
                        RestoreDocksInZone(zoneDetails); 
                        RestoreDocksInZone(zoneStatus); 
                    } 
                ); 
            } 
            else { 
                Sys.Application.add_init( 
                    function() { 
                        var zoneDetails = $find('radZone1'); 
                        var zoneStatus = $find('RadDockZone1'); 
 
                        RestoreDocksInZone(zoneDetails); 
                        RestoreDocksInZone(zoneStatus); 
                    } 
                ); 
            } 
         
        } 
    </script> 
</head>  
<body onload="OnLoad();"
... 
</body> 

Thanks,
Stephen
Jim
Top achievements
Rank 1
 answered on 15 Oct 2009
1 answer
99 views
Is it possible to change the loading image displayed in a RadWindow when the ShowContentDuringLoad property is set to false?

--
Stuart
Shinu
Top achievements
Rank 2
 answered on 15 Oct 2009
4 answers
96 views
Hello,

When I deploy a radcombobox on my sharepoint page with the Office 2007 skin it looks a bit squashed. I believe this to be an issue with the controlss css being in contention with the pages css.

Is this a common issue, and if so, is there a workaround for this?

Regards,

   John
Eric Skaggs
Top achievements
Rank 2
 answered on 15 Oct 2009
4 answers
104 views
Hi,

I'm facing a problem with my grid. I want to fill or edit a extra database field that is not shown in de datagrid or editform.
I'm using a linq datasource.
Is this possible?

thanks in advance..
Rik
Top achievements
Rank 1
 answered on 15 Oct 2009
1 answer
237 views
Hi
    We have used Rad Telerik AJAX Q2 2008 version's Rad Grid.

I want follwing functionality on Rad Grid.
       Right now when user clcik on grid column header then sorting data as ascendig first time.
But I want to set descending sorting when user click on grid column header first time.

Please give you reply.

Thanks
Swapnil

Princy
Top achievements
Rank 2
 answered on 15 Oct 2009
4 answers
221 views
HI,

I want to display an empty line in the RadComboBox as a first element without checkbox in it. see the code below,

<Telerik:GridBoundColumn HeaderText="DEmo" DataField="DEmo">
<FilterTemplate>
<Telerik:RadComboBox ID="RadCombo1" runat="server" DataTextField="CMBITEM" DataValueField="CMBITEM" DataSourceID="SQLDS" SelectedValue='<%# TryCast(Container,GridItem).OwnerTableView.GetColumn("DEmo").CurrentFilterValue %>' AppendDataBoundItems="true" Width="100" OnClientDropDownClosing="mouseouts" EmptyMessage="">
<ItemTemplate>
<div  id="div1" onclick="StopPropagation(event)" />
<asp:CheckBox runat="server" ID="CheckBox1" Text='<%# Eval("CMBITEM") %>' onClick="onCheckBoxClick(this);" />
</ItemTemplate>
</Telerik:RadComboBox>

Withthis Combobox is displaying like

Combo: 
CheckBox with Item1
CheckBox with Item2
CheckBox with Item3

I want
Combo: 
[Empty Line]
CheckBox with Item1
CheckBox with Item2
CheckBox with Item3

If I use this code below,

    Protected Sub RadCombo1_DataBound(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim RAB As RadComboBox = DirectCast(sender, RadComboBox)
        RAB.Items.Insert(0, New RadComboBoxItem(""))
    End Sub

I am getting,

Combo: 
Checkbox [Empty Line]
CheckBox with Item1
CheckBox with Item2
CheckBox with Item3
Sebastian
Telerik team
 answered on 15 Oct 2009
5 answers
246 views
Hello,

I have strange problem with AppointmentTemplate.Even if I declared my custom template, I can still see only the built in one.I am stuck on this for few hours and cannot get it to work.Please can You give me some advice.I am using Web service binding in ASP.NET MVC
Here is my code:


<%@ Page Title="" Language="C#" AutoEventWireup="true" MasterPageFile="~/Views/Shared/Site.Master"
    Inherits="System.Web.Mvc.ViewPage" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <%= Html.PageTitle() %>
</asp:Content>

<script runat="server">

    protected override void OnLoad(EventArgs e)
    {
        RadScheduler1.Culture = CRM.Web.Code.Globalization.GlobalizationManager.CurrentUICulture;
        base.OnLoad(e);
    }
</script>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <form runat="server">
    <h2>
        <%= Html.PageTitle() %></h2>

    <script type="text/javascript">

        /* Firefox resize scrollable content */
        function hideScrollableArea(sender, eventArgs) {
            if ($telerik.isFirefox)
                $telerik.$('.rsContentScrollArea').css('overflow', 'hidden');
        }
        function showScrollableArea(sender, eventArgs) {
            if ($telerik.isFirefox)
                $telerik.$('.rsContentScrollArea').css('overflow', 'auto');
        }

        function OnClientAppointmentDoubleClick(sender, eventArgs) {
            var apt = eventArgs.get_appointment();

            document.location = '<%= HttpContext.Current.CreateUrl("/Appointment/Detail/") %>' + apt._id;
        }

        function OnClientTimeSlotClick(sender, eventArgs) {

            document.location = '<%= HttpContext.Current.CreateUrl("/Appointment/Create?") %>StartTime=' + eventArgs.get_time().format('dd/MM/yyyy H:mm');
        }
        //]]>


    </script>

    <telerik:RadScheduler runat="server" ID="RadScheduler1" AllowDelete="false" AllowEdit="true"
        AllowInsert="false" StartEditingInAdvancedForm="false" OnClientAppointmentDoubleClick="OnClientAppointmentDoubleClick"
        OnClientTimeSlotClick="OnClientTimeSlotClick" Height="900px">
        <AppointmentTemplate>
            <div>
                Test :
                <%= Eval("Subject") %>
            </div>
        </AppointmentTemplate>
        <TimelineView GroupBy="Calendar" GroupingDirection="Vertical" />
        <WebServiceSettings Path="~/Models/SchedulerWebService.asmx" />
    </telerik:RadScheduler>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnableScriptLocalization="true"
        EnableScriptGlobalization="true">
    </telerik:RadScriptManager>
    </form>
</asp:Content>
Peter
Telerik team
 answered on 15 Oct 2009
2 answers
206 views
Hi there 

I am using the following code to load RadComboBox and insert the RadComboBox with a  text "select item" at the top which is fairly basic, but I am unable to see the text "select item" added when clicking the dropdown.  Please Advice!
[Code and error image attached]

Thanks
Siva

        <telerik:RadComboBox  ID="RadComboBox1" runat="server" Height="190px" Skin="Office2007" 
                        Width="300px" MarkFirstMatch="true"  NoWrap="true" DropDownWidth="420px" EnableLoadOnDemand="true" HighlightTemplatedItems="true" 
                        ItemRequestTimeout="500"
                        <HeaderTemplate> 
                            <ul> 
                                <li class="col1">Company Name</li> 
                            </ul> 
                        </HeaderTemplate> 
                        <ItemTemplate> 
                            <ul> 
                                <li class="col1"><%# DataBinder.Eval(Container.DataItem, "CompanyName") %></li
                            </ul> 
                        </ItemTemplate> 
                    </telerik:RadComboBox> 
  Dim sql As String = "SELECT * from Customers" 
        Dim adapter As New SqlDataAdapter(sql, ConfigurationManager.ConnectionStrings("NorthwindConnectionString").ConnectionString) 
 
        Dim dt As New DataTable() 
        adapter.Fill(dt) 
        RadComboBox1.DataTextField = "CompanyName" 
        RadComboBox1.DataValueField = "City" 
        RadComboBox1.DataSource = dt 
        RadComboBox1.DataBind() 
 
        RadComboBox1.Items.Insert(0, New Telerik.Web.UI.RadComboBoxItem("Select Item""None")) 

Veselin Vasilev
Telerik team
 answered on 15 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?