Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
189 views
I have a RadScheduler with a SelectedDate of 1/1/2010.  I am using the timeline view with a SlotDuration = 2 and NumberofSlots = 183.  I have a date that spans over 2 years, and yet is only displayed as a 6 month appointment.  I also have another appointment that is supposed to be around 10 months long as is displaying as an appointment around 5-6 months.    Please view attached screen shot to see my issue.  I set the appointment subject texts to the start and end date of the appointments.

Any advice will be helpful.  Below is my HTML for the RadScheduler.



<%@ Page Title="" Language="VB" MasterPageFile="~/NewStims/mpStims.master" AutoEventWireup="false" 
  CodeFile="BigCalendar.aspx.vb" Inherits="NewStims_Events_BigCalendar" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"
  <link href="Scheduler.Seths.css" rel="stylesheet" type="text/css" /> 
 
 
  <telerik:RadScheduler ID="scEvents" runat="server" Width="900px" Skin="Seths" 
    SelectedView="TimelineView" EnableEmbeddedSkins="False" CustomAttributeNames="EventStartDate, EventEndDate" 
    EnableCustomAttributeEditing="true" DataKeyField="EventID" DataSubjectField="EventTitle" 
    DataStartField="EventStartDate" FirstDayOfWeek="Monday" CssClass="slotClass" ShowDateHeaders="true" ShowHeader="true" 
     ShowNavigationPane="true" ShowViewTabs="true" LastDayOfWeek="Friday" DataEndField="EventEndDAte" OverflowBehavior="Expand" 
    ShowFooter="false" BackColor="Transparent" > 
    <TimelineView SlotDuration="2" NumberOfSlots="183"   /> 
    <AppointmentTemplate> 
    <div class="divWrap"
    <%#CType(Eval("EventStartDate"), Date).Day.ToString()%> 
    </div> 
      <div style="width:70%;float:left"
      <%#Eval("Subject")%> 
      </div> 
      <div class="divWrap"
      <%#CType(Eval("EventEndDate"), Date).Day.ToString()%> 
      </div> 
    </AppointmentTemplate> 
  </telerik:RadScheduler> 
 


T. Tsonev
Telerik team
 answered on 11 Mar 2010
3 answers
148 views
I am using a grid with grouping and have set the default image path to /Skins/Office2007/Grid.  All of the images show up except the ones for the grouping in the header SortAsc.gif and SortDesc.gif.  How do I set the image paths for these?

<telerik:RadGrid ID="RadGrid1" runat="server" 
                            AllowMultiRowSelection="True" AllowPaging="True" AllowSorting="True"   
                            AutoGenerateColumns="False"   
                            DataSourceID="SqlDataSourceInbox" GridLines="None"   
                Height="360px" onitemcommand="RadGrid1_ItemCommand"   
                            onitemdatabound="RadGrid1_ItemDataBound"   
                            onselectedindexchanged="RadGrid1_SelectedIndexChanged" ShowGroupPanel="True"   
                            Skin="Office2007" Width="725px"   
                ondeletecommand="RadGrid1_DeleteCommand" ImagesPath="/Skins/Office2007/Grid">  
        <PagerStyle Mode="NextPrevAndNumeric" FirstPageImageUrl="/Skins/Office2007/Grid\PagingFirst.gif"   
                                LastPageImageUrl="/Skins/Office2007/Grid\PagingLast.gif"   
                                NextPageImageUrl="/Skins/Office2007/Grid\PagingNext.gif"   
                                PrevPageImageUrl="/Skins/Office2007/Grid\PagingPrev.gif" /><mastertableview allowmulticolumnsorting="True"   
                            datasourceid="SqlDataSourceInbox" tablelayout="Fixed" width="724px">                             
                                <CommandItemSettings AddNewRecordImageUrl="/Skins/Office2007/Grid\AddRecord.gif"   
                                    ExportToCsvImageUrl="/Skins/Office2007/Grid\ExportToCsv.gif"   
                                    ExportToExcelImageUrl="/Skins/Office2007/Grid\ExportToExcel.gif"   
                                    ExportToPdfImageUrl="/Skins/Office2007/Grid\ExportToPdf.gif"   
                                    ExportToWordImageUrl="/Skins/Office2007/Grid\ExportToWord.gif"   
                                    RefreshImageUrl="/Skins/Office2007/Grid\Refresh.gif" /> 
                                <RowIndicatorColumn FilterImageUrl="/Skins/Office2007/Grid\Filter.gif"   
                                    SortAscImageUrl="/Skins/Office2007/Grid\SortAsc.gif"   
                                    SortDescImageUrl="/Skins/Office2007/Grid\SortDesc.gif">  
                                </RowIndicatorColumn> 
                                <ExpandCollapseColumn CollapseImageUrl="/Skins/Office2007/Grid\SingleMinus.gif"   
                                    ExpandImageUrl="/Skins/Office2007/Grid\SinglePlus.gif"   
                                    FilterImageUrl="/Skins/Office2007/Grid\Filter.gif"   
                                    SortAscImageUrl="/Skins/Office2007/Grid\SortAsc.gif"   
                                    SortDescImageUrl="/Skins/Office2007/Grid\SortDesc.gif">  
                                </ExpandCollapseColumn> 
                                <Columns> 
                                    <telerik:GridClientSelectColumn Reorderable="False"   
                                        UniqueName="ClientSelectColumn">  
                                        <HeaderStyle Width="20px" /> 
                                    </telerik:GridClientSelectColumn> 
                                    <telerik:GridTemplateColumn Groupable="False" UniqueName="TemplateColumn1">  
                                        <HeaderStyle Width="20px" /> 
                                        <ItemStyle Height="35px" HorizontalAlign="Center" /> 
                                        <ItemTemplate> 
                                            <img alt="MailIcon" src="images/MailIcon.gif"   
                                                style="margin-bottom: 10px; margin-left: 2px" /> 
                                        </ItemTemplate>                           
                                    </telerik:GridTemplateColumn> 
                                    <telerik:GridTemplateColumn GroupByExpression="SentBy"   
                                        HeaderText="From / Subject" SortExpression="SentBy"   
                                        UniqueName="TemplateColumn2">  
                                        <HeaderStyle Width="150px" /> 
                                        <ItemStyle Height="30px" Width="150px" /> 
                                        <ItemTemplate> 
                                            <%# DataBinder.Eval(Container.DataItem, "SentBy") %> 
                                            <br /> 
                                            <div class="MailSubject">  
                                                <%# DataBinder.Eval(Container.DataItem, "Subject") %> 
                                            </div> 
                                        </ItemTemplate>                                      
                                    </telerik:GridTemplateColumn> 
                                    <telerik:GridBoundColumn DataField="ReceivedShort" DataFormatString="{0:d}"   
                                        HeaderText="Received" SortExpression="Received" UniqueName="ReceivedShort">  
                                        <HeaderStyle Width="40px" /> 
                                        <ItemStyle Width="40px" /> 
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="AttachmentName" HeaderText="AttachmentName"   
                                        SortExpression="AttachmentName" UniqueName="AttachmentName">  
                                        <HeaderStyle Width="60px" /> 
                                        <ItemStyle Width="60px" /> 
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="Message" DefaultInsertValue=""   
                                        HeaderText="Message" UniqueName="Message" Visible="False">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="AttachmentPath" DefaultInsertValue=""   
                                        HeaderText="AttachmentPath" SortExpression="AttachmentPath"   
                                        UniqueName="AttachmentPath" Visible="False">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="AttachmentType" DefaultInsertValue=""   
                                        HeaderText="AttachmentType" SortExpression="AttachmentType"   
                                        UniqueName="AttachmentType" Visible="False">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="AttachmentSize" DefaultInsertValue=""   
                                        GroupByExpression="AttachmentSize" HeaderText="AttachmentSize"   
                                        UniqueName="AttachmentSize" Visible="False">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="SentBy" DefaultInsertValue=""   
                                        HeaderText="SentBy" SortExpression="SentBy" UniqueName="SentBy" Visible="False">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="Subject" DefaultInsertValue=""   
                                        HeaderText="Subject" SortExpression="Subject" UniqueName="Subject"   
                                        Visible="False">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="SentTo" DefaultInsertValue=""   
                                        HeaderText="SentTo" SortExpression="SentTo" UniqueName="SentTo" Visible="False">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="Received" DefaultInsertValue=""   
                                        HeaderText="Received" SortExpression="Received" UniqueName="Received"   
                                        Visible="False">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="LastRead" DefaultInsertValue=""   
                                        EmptyDataText="" HeaderText="LastRead" SortExpression="LastRead"   
                                        UniqueName="LastRead" Visible="False">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete"   
                                        ConfirmText="Are you sure you want to delete this email?"   
                                        HeaderStyle-Width="35px" ImageUrl="/Skins/Office2007/Grid/Delete.gif"   
                                        Text="Delete" UniqueName="DeleteColumn">  
                                        <HeaderStyle Width="35px" /> 
                                    </telerik:GridButtonColumn> 
                                </Columns>                 
                                <groupbyexpressions> 
                <telerik:GridGroupByExpression> 
                    <selectfields> 
                        <telerik:GridGroupByField FieldAlias="ReceivedShort" FieldName="ReceivedShort"   
                            FormatString="{0:d}" HeaderText="Received"   
                            HeaderValueSeparator=" from date: " /></selectfields>  
                    <groupbyfields> 
                        <telerik:GridGroupByField FieldName="ReceivedShort" FormatString=""   
                            HeaderText="Received" SortOrder="Descending"  /></groupbyfields></telerik:GridGroupByExpression></groupbyexpressions>              
                                <EditFormSettings> 
                                    <EditColumn CancelImageUrl="/Skins/Office2007/Grid\Cancel.gif"   
                                        EditImageUrl="/Skins/Office2007/Grid\Edit.gif"   
                                        FilterImageUrl="/Skins/Office2007/Grid\Filter.gif"   
                                        InsertImageUrl="/Skins/Office2007/Grid\Update.gif"   
                                        SortAscImageUrl="/Skins/Office2007/Grid\SortAsc.gif"   
                                        SortDescImageUrl="/Skins/Office2007/Grid\SortDesc.gif"   
                                        UpdateImageUrl="/Skins/Office2007/Grid\Update.gif">  
                                    </EditColumn> 
                                </EditFormSettings> 
                                <PagerStyle FirstPageImageUrl="/Skins/Office2007/Grid\PagingFirst.gif"   
                                    LastPageImageUrl="/Skins/Office2007/Grid\PagingLast.gif"   
                                    NextPageImageUrl="/Skins/Office2007/Grid\PagingNext.gif"   
                                    PrevPageImageUrl="/Skins/Office2007/Grid\PagingPrev.gif" /> 
            </mastertableview> 
                            <groupingsettings showungroupbutton="True"  /> 
                            <GroupPanel CssClass="RadGrid_Office2007">  
                              
                            </GroupPanel> 
                            <clientsettings allowdragtogroup="True"  enablepostbackonrowclick="true"><selecting   
                            allowrowselect="True" /><scrolling allowscroll="True" scrollheight="275px"    
                            usestaticheaders="True" /> 
            <clientmessages dragtogrouporreorder="Drag to group" /></clientsettings></telerik:RadGrid> 
Dimo
Telerik team
 answered on 11 Mar 2010
1 answer
86 views
Hello,


I have a combobox that has a tree view nested inside. So far so good. I have a prerender event that I was planning on using to populate the tree from a dataset.

#1. First problem...For some reason the event fires 3 times resulting in the node list being created 3 times. I thought it might have to do with having 3 levels of nodes but going back to one still presents the same problem. As I understand the ASP page cycle this shouldn't be happening?

#2. Second problem is more of a question. How do I bind the data to the nodes? I have a table with say three columns State, City, School. At the top node I want State, Below The State I want all corresponding Cities, Below the Cities schools. Now I know how to generate a SQL query to get this data so lets call that done. How then shall I bind it? To each node individually? If so do I have to "loop" through putting the row into a DataRow object and then binding to each nodes DataItem?

#3. The cherry on top. Once a school has been selected I need to display that selection in the combobox and populate the comboboxes value field with the school ID. Can this be done client side or will I have to post back to update the combobox and what about the school id? Where should I hide that data while I'm waiting for them to pick a school...in a hidden (visible=false) tree view under the school?

Thanks
JB

Veronica
Telerik team
 answered on 11 Mar 2010
1 answer
79 views
Hi,

We're building a chat application wherein we need to open and dock a user control which accepts parameters (such as session ID) within a javascript and web methods (this is supposedly a chat window, but the docking functionality is not supported in RadWindow, so we're thinking of docking a user control instead. But if there could be an update that the window can be docked, much better.) for every click of a "chat buddy". Is there any way we could do that? I've been looking for solutions to this problem for the past week and it seems that this issue has not yet been addressed.

An immediate reply is greatly appreciated. :)

Thanks.
Pero
Telerik team
 answered on 11 Mar 2010
1 answer
120 views
Hi,

We're building a chat application wherein we need to open and dock a user control which accepts parameters (such as session ID) within a javascript and web methods (this is supposedly a chat window, but the docking functionality is not supported in RadWindow, so we're thinking of docking a user control instead. But if there could be an update that the window can be docked, much better.) for every click of a "chat buddy". Is there any way we could do that? I've been looking for solutions to this problem for the past week and it seems that this issue has not yet been addressed.

An immediate reply is greatly appreciated. :)

Thanks,

Lisette
Pero
Telerik team
 answered on 11 Mar 2010
1 answer
288 views

Hi every one,

 

I am using telerik:GridButtonColumn it's working on Mozila firefox but does not work on chrome, when I click on gridbuttoncolumn it throws an error mention below:


Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

 

aspx code:

 

<telerik:RadFormDecorator ID="blueMapsFormDecorator" runat="server" DecoratedControls="all"

                Skin="Web20"></telerik:RadFormDecorator>

           

            <telerik:RadGrid AutoGenerateColumns="False" ID="gdListAccountDeactivate" AllowFilteringByColumn="true"

                Width="100%" AllowPaging="True" AllowSorting="True" AllowRowSelect="true" runat="server"

                OnItemCommand="gdListAccountDeactivate_ItemCommand">

                <ClientSettings>

                    <Selecting AllowRowSelect="True" />     

                </ClientSettings>

                <PagerStyle Mode="NextPrevAndNumeric" />

                <GroupingSettings CaseSensitive="false" />

                <MasterTableView TableLayout="Fixed">

                    <Columns>

                       <telerik:GridBoundColumn HeaderText="EmailID" DataField="emailID" ItemStyle-Width="200px"

                        SortExpression="emailID" HeaderStyle-Width="200px" FilterControlWidth="180px"

                        AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" />

                                                

                       <telerik:GridButtonColumn ConfirmText="Deactivate this User?" ConfirmDialogType="RadWindow" HeaderStyle-HorizontalAlign="Center"

                        ConfirmTitle="Deactivate" ButtonType="ImageButton" ImageUrl="~/images/delete.gif" CommandName="Deactivate" Text="Deactivate"

                        UniqueName="DeleteColumn" HeaderText="Deactivate" ItemStyle-Width="50px" HeaderStyle-Width="50px">

                        <itemstyle horizontalalign="Center" cssclass="MyImageButton" />

                        </telerik:GridButtonColumn>

                    

                     <telerik:GridTemplateColumn UniqueName="appuserid" AllowFiltering="false" AutoPostBackOnFilter="false" ItemStyle-Width="50px" HeaderStyle-Width="50px" >

                        <ItemTemplate>

                            <telerik:RadTextBox Visible="false" ID="appUser" runat="server" Text='<%# Bind("appuserid") %>'>

                            </telerik:RadTextBox>

                            <asp:LinkButton ID="LinkButton2" Width="50px" CommandName="Redirect"

                                Text="Portfolio" runat="server"></asp:LinkButton>

                        </ItemTemplate>

                    </telerik:GridTemplateColumn>  

                       

                    </Columns>

                </MasterTableView>

            </telerik:RadGrid><br />

            <telerik:RadWindowManager ID="RadWindowManager2" runat="server"></telerik:RadWindowManager>

 

aspx.cs code:

 

protected void gdListAccountDeactivate_ItemCommand(object source, GridCommandEventArgs e)

    {

        if (e.CommandName == "Redirect")

        {

            GridDataItem item = (GridDataItem)e.Item;

            string ID = (item.FindControl("appUser") as RadTextBox).Text;

            string url = "Portfolio.aspx?ID=" + Security.QueryStringEncode(ID);

            Response.Redirect(url);

        }

        if (e.CommandName == "Deactivate")

        {

            GridDataItem item = (GridDataItem)e.Item;

            string appID = (item.FindControl("appUser") as RadTextBox).Text;

            int appuserid = Convert.ToInt32(appID);

            int lastupdatedby = Convert.ToInt32(Session["appuserid"]);

            Member objMember = new Member();

            objMember.DeactivateAccount(appuserid, lastupdatedby);

            BindGrid();

        }

    }

public void BindGrid()

    {

        int ImplementationID = 0;

        if (Session["ImplementationID"] == "")

        {

            ImplementationID = 0;

            ds = objAccount.FetchUser("Account Manager", ImplementationID);

        }

 

        if (ds.Tables[0].Rows.Count > 0)

        {

            gdListAccountDeactivate.DataSource = ds.Tables[0];

            gdListAccountDeactivate.DataBind();

        }

    }

Thanks

Tsvetoslav
Telerik team
 answered on 11 Mar 2010
1 answer
134 views
Hi,
I am adding treeview to a listboxItem. I create a treeview and add nodes dynamically. It works fine but when I want to transfer the nodes to another listbox, i can't find the treeview in the listboxItem.controls collection.
How can I find the treeview in OnTransferring event.
 
Thanks,
Monika
Veronica
Telerik team
 answered on 11 Mar 2010
3 answers
309 views
Is it possible to change the color of individual items in a RadComboBox on the client side?  Something like the following is what I mean (obviously this doesn't work or I wouldn't have a problem).

myCombo.get_items().getItem(0).get_attributes().setAttribute("style", "font-color:red;");

Thank you.
Veronica
Telerik team
 answered on 11 Mar 2010
2 answers
276 views
Hi,

in the Master I have a Rad menu, which gets the items from a siteMap-File
<telerik:RadMenu ID="radMenu" runat="server"      
 DataSourceID="siteMapDataSource" onitemclick="radMenu_ItemClick" /> 

In the method radMenu_ItemClick I tried to get a reference to the RadGrid in the current Page. (I assume here that the correct page is currently loaded)
protected void radMenu_ItemClick(object sender, Telerik.Web.UI.RadMenuEventArgs e)  
   {  
      Tasklist tasklistGUI = radMenu.Page as Tasklist;  
      RadGrid tasklistRadGrid = tasklistGUI.FindControl("RadGrid1"as RadGrid;  
      tasklistRadGrid.MasterTableView.ExportToExcel();  
   } 

The idea is then to call ExportToExcel as a method of the referenced object. But the object is null!
What's wrong? What must I do to get a working reference to the RadGrid?

Thank you very much in advance.

Regards
Bernhard
Bernhard
Top achievements
Rank 2
 answered on 11 Mar 2010
2 answers
132 views
I just want to share my solution. In IIS7 if you are utilizing integrated mode, you might get an error that SpellCheckHandler is not registered in web.config.
If IIS is uzing integrated mode then the handlers have to be defined under

<

 

system.webServer>

 


<

 

handlers>

 


<

 

add name="SpellCheckHandler_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI" />

 



Rumen
Telerik team
 answered on 11 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?