Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
208 views
Hi -

 I'm doing a trial of the the Telerik grid and want to know how to do the following;

 Scenario
 1.  I databind the grid (on the server side) to a List<T> where T is a custom class.
 2.  This works fine.  The grid displays the data.

 If my grids page size is N, lets say 3 and my List<T> is > 3 items the grid does paging.  But when I try to go to the second page nothing displays.      I'm guessing the Grid is expecting a method to populate the next set of data.   

   In my instance the number of items in List<T> is so small I want ALL of the List<T> to be bound to the grid on the server side call and the grid paging to work without a server call.   Is this possible?

  I've searched the documentation and can't find anything.  

  Thanks -

  Rob

 
Nikolay Rusev
Telerik team
 answered on 24 Sep 2009
1 answer
40 views
I am using the Advanced Form and have set up 7 resources (used as dropdowns).  I'm declaratively databinding, which works fine with all of the resources.  However I need to do some other things on Insert and Update, and so I'm using the AppointmentInsert and AppointmentUpdate methods.  I'm looping through the resource collection by doing the following:

For Each res As Resource In e.Appointment.Resources  
   'Do something with res.Type, res.Key, res.Text            
Next 

This exact code works perfectly in the AppointmentUpdate method - I'm able to see all of the resources.  But for some reason, only the top 5 show in AppointmentInsert.  I have no idea what the deal is, but I need access to all of the resources.

Thanks
Shawn Tracy
Peter
Telerik team
 answered on 24 Sep 2009
1 answer
130 views
Here is my form:

            <telerik:RadGrid ID="PhoneGrid" runat="server" GridLines="None" OnUpdateCommand="PhoneGrid_OnUpdateCommand" OnDeleteCommand="PhoneGrid_OnDeleteCommand" 
                    DataSourceID="PhoneList" Skin="Office2007" Width="400">  
            <MasterTableView TableLayout="Auto" DataKeyNames="PhoneID" AutoGenerateColumns="False" DataSourceID="PhoneList" EditMode="InPlace">  
                <Columns> 
                  
                    <telerik:GridBoundColumn ColumnEditorID="PhoneNumberEditor" HeaderStyle-Width="100" ItemStyle-Width="100" DataField="PhoneNumber" HeaderText="Phone Number"  UniqueName="PhoneNumber">  
                          
                    </telerik:GridBoundColumn> 
                      
                    <telerik:GridDropDownColumn HeaderStyle-Width="50" ItemStyle-Width="50" ColumnEditorID="PhoneTypeNameEditor" UniqueName="ddlPhoneTypeID" ListTextField="PhoneTypeName"   
                    ListValueField="PhoneTypeID" DataSourceID="PhoneTypeList" HeaderText="" DataField="PhoneTypeID">  
 
                    </telerik:GridDropDownColumn> 
                      
                    <telerik:GridCheckBoxColumn HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="35" ItemStyle-Width="35" DataField="isPreferred" HeaderText="Preferred" UniqueName="isPreferred">  
 
                    </telerik:GridCheckBoxColumn> 
 
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="25">  
                      
                    </telerik:GridEditCommandColumn> 
                
                    <telerik:GridClientDeleteColumn ConfirmText="Are you sure you want to delete?" ButtonType="ImageButton" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="25">  
                      
                    </telerik:GridClientDeleteColumn> 
                      
                </Columns> 
 
            </MasterTableView> 
            </telerik:RadGrid> 
 
            <telerik:GridTextBoxColumnEditor ID="PhoneNumberEditor" runat="server">  
                <TextBoxStyle Width="90" /> 
            </telerik:GridTextBoxColumnEditor> 
            <telerik:GridDropDownListColumnEditor ID="PhoneTypeNameEditor" runat="server">  
                <DropDownStyle Width="65" /> 
            </telerik:GridDropDownListColumnEditor> 
 
            <asp:ObjectDataSource ID="PhoneList" runat="server" SelectMethod="psPhoneList" TypeName="Recruit.Data.PeopleDAL.PeopleMainDAL">  
                <SelectParameters> 
                    <asp:QueryStringParameter DefaultValue="0" Name="PeopleID" QueryStringField="pid" Type="Int64" /> 
                </SelectParameters> 
            </asp:ObjectDataSource> 
 
            <asp:ObjectDataSource ID="PhoneTypeList" runat="server" SelectMethod="psPhoneTypeList" TypeName="Recruit.Data.PeopleDAL.PeopleMainDAL">  
            </asp:ObjectDataSource> 

Here is my code:

 
        protected void PhoneGrid_OnUpdateCommand(object source, GridCommandEventArgs e)  
        {  
 
            GridEditableItem editedItem = e.Item as GridEditableItem;  
 
            //Get the primary key value using the DataKeyValue.       
            if (editedItem != null)  
            {  
                var P = new Phone();  
                P.PhoneID = (Int64)editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["PhoneID"];  
                //Access the textbox from the edit form template and store the values in string variables.       
                P.PhoneNumber = (editedItem["PhoneNumber"].Controls[0] as TextBox).Text;  
 
                // ATTEMPT TWO - I get Unable to cast object of type 'Telerik.Web.UI.RadComboBox' to type 'System.Web.UI.WebControls.DropDownList'.  
                DropDownList ddl = (DropDownList)editedItem["ddlPhoneTypeID"].Controls[0];  
                string selectedVal = ddl.SelectedValue;  
                P.PhoneTypeID = Convert.ToInt32(selectedVal);  
                  
                // ATTEMPT One - I get NULL here  
                //P.PhoneTypeID = Convert.ToInt32((editedItem["PhoneTypeID"].Controls[0] as DropDownList).SelectedValue);  
                P.isPreferred = (editedItem["isPreferred"].Controls[0] as CheckBox).Checked;  
 
                PeopleMainDAL.puPhoneList(P);  
            }  
 
        }  
 


I am trying to get the value from the drop down list upon edit and I am either getting a null exception or the second attempt I was getting a casting error.  Help!
Drew Auman
Top achievements
Rank 1
 answered on 24 Sep 2009
3 answers
95 views
Hey guys, dont suppose you can help me, im getting some odd issues with a RadEditor that is nested in a RadSplitter.

1) In internet explorer on local machine the resizing works fine, however in firefox it doesnt seem to be working
2) (see image) As you can see in firefox the internal size of the editor isn't resizing
3) Also, i found if you do a partial postback the page starts working!

I cant see why its doing this, any help would be awesome!

Image:
http://x-volt.com/pics/TelerikError1.png

Source (aspx only):
http://x-volt.com/hosting/editor.rar

Thanks,

Simon
Simon Colmer
Top achievements
Rank 1
 answered on 24 Sep 2009
3 answers
236 views

Hi,

1. I am trying to create a appointment in month view.

2. I am using custom insert appointment

3. I am tried the code for getting selected date (RadScheduler1.SelectedDate.ToString("MM/dd/yyyy")) I am not able toget the selected date, get the current date

4. I would like to get the selected date in scheduler monthview from server side

Thanks

Sabarish

Mr. Plinko
Top achievements
Rank 1
 answered on 24 Sep 2009
1 answer
105 views
Hi
   I have encountered a strange issue which took me hours to identify. If I add the ajax Manager script on top of the page then it works fine but if I add that at the bottom of the page the it has different behaviour. try this sample

<%

@ 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>Tab Application</title>

 

 

<style type="text/css">

 

 

.pageView

 

{

 

border: 1px solid #898c95;

 

 

border-top: none;

 

 

margin-top: -1px;

 

 

Height:500px !important;

 

 

width:450px;

 

}

 

.exampleWrapper

 

{

 

padding: 10px;

 

 

background: #f0f0f0;

 

 

float: left;

 

}

 

 

 

</style>

 

</

 

head>

 

<

 

body>

 

 

<form id="form1" runat="server">

 

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnableTheming="True">

 

 

</telerik:RadScriptManager>

 

 

<telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="false" Skin="Web20">

 

 

</telerik:RadSkinManager>

 

 

 

 

 

<div>

 

 

<div class="exampleWrapper">

 

 

<telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Web20" AutoPostBack="true" Width="450px"

 

 

MultiPageID="mpvMain" SelectedIndex="0" OnClientTabSelecting="onTabSelecting" OnClientTabSelected="onClientTabSelected" OnTabClick="RadTabStrip1_TabClick">

 

 

<Tabs>

 

 

<telerik:RadTab runat="server" Text="Contacts" PageViewID="mpContacts" Selected="true" Value="CONTACTS">

 

 

</telerik:RadTab>

 

 

<telerik:RadTab runat="server" Text="Details" PageViewID="mpDetails">

 

 

</telerik:RadTab>

 

 

<telerik:RadTab runat="server" Text="Group Processing" PageViewID="mpGroupProcessing">

 

 

</telerik:RadTab>

 

 

<telerik:RadTab runat="server" Text="Groups" PageViewID="mpGroups">

 

 

</telerik:RadTab>

 

 

</Tabs>

 

 

</telerik:RadTabStrip>

 

 

 

<telerik:RadMultiPage ID="mpvMain" runat="server" SelectedIndex="0" RenderSelectedPageOnly="true" >

 

 

<telerik:RadPageView runat="server" ID="mpContacts" CssClass="pageView" >

 

 

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Width="225px" HorizontalAlign="NotSet" EnableAJAX="true" LoadingPanelID="RadAjaxLoadingPanel1" >

 

 

<asp:Button runat="server" ID="btnClickMe" Text="Click Me" onclick="btnClickMe_Click" />

 

 

<asp:Label runat="server" ID="lblInBoundary" Text="This is contacts Tab in Boundary"></asp:Label>

 

 

</telerik:RadAjaxPanel>

 

 

<asp:Label runat="server" ID="lblOutOfBoundary" Text="This is contacts Tab out of Boundary"></asp:Label>

 

 

</telerik:RadPageView>

 

 

<telerik:RadPageView runat="server" ID="mpDetails" CssClass="pageView" >

 

 

<asp:Label runat="server" ID="lblDetails" Text="This is Detail Tab"></asp:Label>

 

 

</telerik:RadPageView>

 

 

<telerik:RadPageView runat="server" ID="mpGroupProcessing" CssClass="pageView" >

 

 

<asp:Label runat="server" ID="lblGroupProcessing" Text="This is Group Processing"></asp:Label>

 

 

<asp:TextBox runat="server" ID="txtGroupProcessing"></asp:TextBox>

 

 

<asp:TextBox runat="server" ID="TextBox1"></asp:TextBox>

 

 

</telerik:RadPageView>

 

 

<telerik:RadPageView runat="server" ID="mpGroups" CssClass="pageView">

 

 

<asp:Label runat="server" ID="lblGroups" Text="This is groups"></asp:Label>

 

 

 

</telerik:RadPageView>

 

 

</telerik:RadMultiPage>

 

 

</div>

 

 

</div>

 

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>

 

 

 

 


 

<telerik:RadAjaxManager runat="server" ID="radAjaxManager">

 

 

 

 

 

<AjaxSettings>

 

 

 

 

 

<telerik:AjaxSetting AjaxControlID="RadTabStrip1">

 

 

 

 

 

<UpdatedControls>

 

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="mpvMain"

 

 

LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />

 

 

 

 

 

</UpdatedControls>

 

 

 

 

 

</telerik:AjaxSetting>

 

 

 

 

 

 

</AjaxSettings>

 

 

 

 

 

</telerik:RadAjaxManager>

 

 

 

</

 

form>

 

 

 

<script type="text/javascript">

 

 

function onClientTabSelected(sender, args) {

 

}

 

function onTabSelecting(sender, args) {

 

 

 

 

}

 

</script>

 

</

 

body>

 

</

 

html>

on Server Side

 

protected

 

void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e)

 

{

System.Threading.

Thread.Sleep(2000);

 

}

 

protected void btnClickMe_Click(object sender, EventArgs e)

 

{

System.Threading.

Thread.Sleep(2000);

 

 

lblInBoundary.Text =

DateTime.Now.ToString();

 

lblOutOfBoundary.Text =

DateTime.Now.ToString();

 

}


Now application has two different ajax callings ,
1) Through Ajax Manager when you change tab pages
2) Through AjaxPanel when you click button. 
 On First tab , I have ajaxPanel which contains 1 label within boundary along with button, So Click of button should only update the label within boundary and other label change from server side should not be reflected on client side. If you click the button then it will update only one label which is within boundary. Now click again and it will update both where it should only update first one.

To resolve the issue move this code from bottom to top just below SkinManager

<telerik:RadAjaxManager runat="server" ID="radAjaxManager">

 

 

 

 

 

<AjaxSettings>

 

 

 

 

 

<telerik:AjaxSetting AjaxControlID="RadTabStrip1">

 

 

 

 

 

<UpdatedControls>

 

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="mpvMain"

 

 

LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />

 

 

 

 

 

</UpdatedControls>

 

 

 

 

 

</telerik:AjaxSetting>

 

 

 

 

 

 

</AjaxSettings>

 

 

 

 

 

</telerik:RadAjaxManager>

 


and now try again and it will work fine, I can work by placing the ajaxManager on Top but I was wondering what is the reason behind this ?

If you fail to recreate the issue then please let me know , I shall send you this sample project.

Regards
Rizwan Bashir

 

 

Iana Tsolova
Telerik team
 answered on 24 Sep 2009
3 answers
177 views
I have a radscheduler with OverflowBehavior="scroll". If i make the rowheight smaller, say 10px, it causes the appointments to be off. For example, an appointment that should end at 10am now ends at 6:30am. If I remove the rowheight then it looks normal. Is there a way to fix this? I am using firefox.

<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'); 
            } 
        </script> 
 
<telerik:RadScheduler runat="server" ID="RadScheduler1" Skin="Vista" EnableEmbeddedSkins="True" 
                    MultiDayView-UserSelectable="true" TimelineView-UserSelectable="false" ShowNavigationPane="false" 
                    SelectedView="MultiDayView" ShowFooter="false" TimeZoneOffset="-05:00:00" DayStartTime="00:00:00" 
                    DayEndTime="23:59:00" OverflowBehavior="Scroll" Height="551px" DataSourceID="dsRadScheduler1" 
                    MonthView-VisibleAppointmentsPerDay="4" DataKeyField="Conf_ID" DataSubjectField="ConferenceName" 
                    DataStartField="StartTime" OnAppointmentDataBound="RadScheduler1_OnAppointmentDataBound" 
                    DataEndField="EndTime" AllowDelete="false" AllowEdit="false" AllowInsert="true" 
                    OnClientAppointmentDoubleClick="RadScheduler1_OnClientAppointmentDoubleClick" RowHeight="10px" 
                    OnClientTimeSlotContextMenu="timeSlotContextMenu" OnClientAppointmentInserting="RadScheduler1_OnClientAppointmentInserting"
                </telerik:RadScheduler> 
                <asp:LinqDataSource runat="server" ID="dsRadScheduler1" OnSelecting="dsRadScheduler1_OnSelecting"
                </asp:LinqDataSource> 

Peter
Telerik team
 answered on 24 Sep 2009
2 answers
163 views
I add the RadManager dynamically (server side) OnInit and register a client Id for the RadWindowManager. The code executes without any problem. When i try to open a RadWindow with javascipt (window.radopen) a null reference error occures. The script cannot find the RadWindowManager on the page. Can anyone help me solve this problem?
Dick
Top achievements
Rank 1
 answered on 24 Sep 2009
1 answer
38 views
Hi,

    I have a client who is experiencing a problem with the link manager in IE7 after upgrading to the latest release.  We upgraded from  Q3 2008 SP2 (version 2008.3.1314) .  After the upgrad using IE7 and the link manager dialog we experienced the following issue.  Editing the text of a link using the link manager fails to change the text.  This works fine in FF and IE8 but not in IE7.

    I also had a question about the scroll bar that appears at the bottom of the Image and Template Managers below the window that lists images and templates (file dialog).  What is the funtionality of this scroll bar?  The End-User documentation for the RadEditor doesn't show the scroll bar.

Thanks!

Dave
Rumen
Telerik team
 answered on 24 Sep 2009
2 answers
182 views
Hello,

On row click, I was going to programmatically select a row by attaching to the client-side RowClick, and doing:

sender.get_masterTableView().get_dataItems()[e.get_itemIndexHierarchical()].set_selected(true);

Since I can  get to the item index via the event, and select it with set_selected.  But this throws an exception, on the line of:

this._owner._owner._selection._selectRowInternal

But _selection is null, why is that?

Thanks.
Brian Mains
Top achievements
Rank 1
 answered on 24 Sep 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?