Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
235 views
Hello,

I have followed the example: Creating and adding an appointment template dynamically and accessing the appointment object in the template class.

I have binded a RadScheduler control to an SqlDataSource and am able to display a RoomID in the appointment template but only if RoomID is from the same table as the SqlDataSource (Appointments in this case). However, I would like to display the RoomName value from another table: Rooms. Therefore I have modified the SelectCommand for the data source to perform an inner join on the two tables to obtain the RoomName from Rooms. See below:

SelectCommand="SELECT Appointments.ID, Appointments.Subject, Appointments.Description, Appointments.Start, Appointments.RoomID, Appointments.UserID, Appointments.RecurrenceRule, Appointments.[End], Appointments.Annotations, Appointments.Reminder, Appointments.RecurrenceParentID, Rooms.ID AS Expr1, Rooms.RoomName as rName FROM Appointments INNER JOIN Rooms ON Appointments.RoomID = Rooms.ID"

I am trying to display the value of 'rName' in the same way that the example in the above link displays 'Start', 'End' and 'Subject'. Ie:

<asp:Literal ID="AppointmentLocation" runat="server" Text='<%# Eval("rName") %>'></asp:Literal>

When I run the web application, I'm presented with the following error:

Server Error in '/' Application.

DataBinding: 'Telerik.Web.UI.Appointment' does not contain a property with the name 'rName'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: DataBinding: 'Telerik.Web.UI.Appointment' does not contain a property with the name 'rName'.

Source Error:

Line 30: 
Line 31: <!-- Room Name -->
Line 32: <asp:Literal ID="AppointmentLocation" runat="server" Text='<%# Eval("rName") %>'></asp:Literal>
Line 33:
Line 34: </AppointmentTemplate>

Source File: ...\Projects\WebApplication5\WebApplication5\Default.aspx    Line: 32




Please can you advise what I am doing wrong here?

Regards,
Anthony.
Peter
Telerik team
 answered on 11 Aug 2010
1 answer
246 views
I have a RadTreeView with Ajax enabled and node ExpandMode set to ServerSideCallBack.

User has the tree displayed and leaves their machine idle. ASP.Net session timeout occurs, but this is not apparent to the user. At some point following timeout, the user clicks on a tree node to expand it. The Ajax "loading" gif appears and they are stuck there with the gif spinning and no response, no redirect, etc.

Fiddler analysis shows a 302 redirect coming back to the browser from the server, but the RadTreeView does not detect it.

So, how do I detect a session timeout / 302 redirect when a RadTreeView node is clicked and the tree attempts to expand the node through server side callback?

If helpful, here's Fiddler capture of the response sent back to the web form that the RadTreeView does not honor:

HTTP/1.1 302 Found
Server: ASP.NET Development Server/9.0.0.0
Date: Mon, 09 Aug 2010 23:12:36 GMT
X-AspNet-Version: 2.0.50727
Location: /login.aspx?ReturnUrl=%2fAdmin%2fBillingGroupAdministration.aspx
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 191
Connection: Close

<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="%2flogin.aspx%3fReturnUrl%3d%252fAdmin%252fBillingGroupAdministration.aspx">here</a>.</h2>
</body></html>
Simon
Telerik team
 answered on 11 Aug 2010
1 answer
77 views
I get a Javascript error when clicking the spellcheck inside of a radeditor. It says that my spell checker can not be found. I am coding in .Net 3.5 and can't seem to figure out why the spell check throws the following two errors. I am pretty sure that I have a compatible radspell.dll assembly in the bin folder.

Error 1 - GetRadSpell is not defined
Error 2 - Object expected
Rumen
Telerik team
 answered on 11 Aug 2010
1 answer
100 views
I'm trying to figure out what the default font is for the Office 2007 skin, so that I can match my labels with the same font.  Can anyone answer this for me??

Thanks!
Dimo
Telerik team
 answered on 11 Aug 2010
2 answers
127 views
how do i access the filename selected in fileexplorer using javascript and put in in my asp label?
Ronen
Top achievements
Rank 1
 answered on 11 Aug 2010
1 answer
127 views
Hi,

I have a grid with 4 grid bound columns and 1 grid numeric column and the numeric column is in inplace edit mode and there are two buttons - Save & Cancel. When search button clicks, grid will be populated with data.
Here is my requirement.

When user modifies data in the numeric column and clicks on Save button, I have written a validate function to validate the modified data and if the modified data is not as per the rules then those cells should be displayed in red with the modified data so that user can check what was wrong with the data.

Can you please tell me how to achieve this ?

I also have NeedDataSource method & Grid_Prerender method. please see the below code.

protected void Page_Init()
    {
       ConfigureGrid();
                 
    }
  
  
private void ConfigureGrid()
    {
        try
        {
            OrderTypeRankingGrid.AddNeedDataSourceEventHandler(NeedDataSource); 
            OrderTypeRankingGrid.AddGridCommandEventHandler(DataGrid_ItemCommand); 
            OrderTypeRankingGrid.PreRender += new EventHandler(OrderTypeRankingGrid_PreRender);
                                              
             
            OrderTypeRankingGrid.AllowColumnsReorder = false;             
            OrderTypeRankingGrid.GridHeaderText = "Order Type Ranking"
            var masterView = OrderTypeRankingGrid.ConfigureMasterTableView("vDivisionOrderTypeRanking", new string[] { "DivisionOrderTypeRankId","CategoryCode", "PurposeCode", "ReasonCode", "ReasonDescription"});
            masterView.AllowFilteringByColumn = true;
            masterView.AllowSorting = true;
            masterView.FullEditMode = true;
            masterView.EditMode = GridEditMode.InPlace;
            masterView.EnableShowHideColumns = true;
            masterView.SetPaging(GridPagerMode.NextPrevAndNumeric);
            masterView.GridTableView.ShowHeader = true;
            masterView.ShowHeader = true;
            masterView.ShowFooter = true;
            masterView.ShowHeadersWhenNoRecords = true;
            masterView.AllowPaging = true;
            //masterView.PageSize = 50;
              
                          
            masterView.AddNgmCommandButton(NgmButtonType.Save, "btnSave", null, null, null, Unit.Pixel(50));
            masterView.AddNgmCommandButton(NgmButtonType.Cancel, "btnCancel", null, null, null, Unit.Pixel(50));
                          
              
            masterView.CommandItemDisplay = GridCommandItemDisplay.Bottom;
  
              
            if (!IsPostBack)  //must check for postback; otherwise, columns will be duplicated
            {                
                masterView.AddBoundColumn("CategoryCode", "Category Code", "CategoryCode", true, false, true, Unit.Percentage(7.0));
                masterView.AddBoundColumn("PurposeCode", "Purpose Code", "PurposeCode", true, false, true, Unit.Percentage(7.0));
                masterView.AddBoundColumn("ReasonCode", "Reason Code", "ReasonCode", true, false, true, Unit.Percentage(7.0));
                masterView.AddBoundColumn("ReasonDescription", "Reason Description", "ReasonDescription", true, false, true, Unit.Percentage(7.0));
                masterView.AddNumericColumn("OrderTypeRank", "Rank", "OrderTypeRank", false, false, true, Unit.Percentage(7.0), typeof(int),NumericType.Number,"{0:N0}", 10);
                                  
            }            
  
        }
        catch (System.Exception ex)
        {
            base.AddException(ex);
        }               
    }


protected void OrderTypeRankingGrid_PreRender(object sender, EventArgs e)
    {
        if (IsPostBack)
        {
            for (int i = 0; i < OrderTypeRankingGrid.PageCount; i++)
            {
                OrderTypeRankingGrid.EditIndexes.Add(i);
            }
  
            OrderTypeRankingGrid.Rebind();
        }
  
  
    }


protected void NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        try
        {
            if (IsPostBack)
            {
                  
                  
               if (!e.IsFromDetailTable && (this.productDivision == 1 || this.productDivision == 2))
                {
                    productDivision = long.Parse(cboxDivision.SelectedValue.ToString());
                    IDivisionOrderTypeRankService divisionOrderTypeRankServiceAgent = null;
                    divisionOrderTypeRankServiceAgent = (IDivisionOrderTypeRankService)ContextRegistry.GetContext().GetObject("DivisionOrderTypeRankServiceAgent");
                    IList<DivisionOrderTypeRankDTO> divisionOrderTypeRankDTOs = divisionOrderTypeRankServiceAgent.GetDivisionOrderTypeRankByDivision(productDivision);
  
                    if (divisionOrderTypeRankDTOs.Count > 1)
                    {
                        var divOrderTypeRankDTOstemp = from b in divisionOrderTypeRankDTOs
                                                       orderby b.CategoryCode ascending, b.PurposeCode ascending, (b.OrderTypeRank == null ? int.MaxValue : b.OrderTypeRank) ascending
                                                       select b;
  
                        OrderTypeRankingGrid.DataSource = divOrderTypeRankDTOstemp;
                                            }
                    else
                    {
                        base.AddWarning("There are no records to display");
   
                    }                    
                }
  
                  
            }
        }
        catch (System.Exception ex)
        {
            base.AddException(ex);
            }
    }

 


Tsvetina
Telerik team
 answered on 11 Aug 2010
3 answers
173 views
I'm trying to change the telerik namspace because it conflicts with a previous version of Telerik and I'm using both on my site. I opened the source code in VS2008 and changed the Assembly name and default namespace in the Properties. I also right-clicked a class and chose Refactor > Rename and changed "Telerik" to "TelerikSC". In doing so I got 75 errors of the form:

'TelerikSC.Web.UI.RadDockZone.DescribeClientProperties(TelerikSC.Web.UI.IScriptDescriptor)': no suitable method found to override   C:\Users\myuser\Desktop\Telerik.Web.UI_2010_2_713_Source\RadControlsAjaxSource\Telerik.Web.UI\Dock\RadDockZone.Serialization.generated.cs   22   36   Telerik.Web.UI

Dimo
Telerik team
 answered on 11 Aug 2010
1 answer
117 views
Hi
        Thanks for quick response. I tried what is give you advice. The code is working fine in Q3 2009. but now i am using in my project Q2 2008. The same coding is not working in Q2 2008. and also Q2 2008 is not supported for UseClientSelectColumnOnly="true". But it is supported for q3 2009 only . I want to need for solution for this problem in q2 2008.

 Requirement is:
                   1. We need to check and unchecked rad grid check box through row click event  in client side scripts(note: I can able to do check box checked. but i am not able do  unchecked in Q2 2008 Telerik
                    2. I need to select multiple check box in rad grid through row click in Client side scripts(note: I can able to select multiple check box through row click in Q3 2009(use: args.set_cancel(true)). But i am not able same process in Q2 2008.
                    3. If i did above functionality through args.set_cancel(true); event. I am not able to check the check box through directly click . and also i am not able to select the multiple check box through row header check box.
Please provide the solution for above problem in Q2 2008 Telerik DLL
 Note: Please see the image. And attachment for sample coding and please all the q2 Telerik DLL

.
source code:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
   
  <telerik:RadCodeBlock ID="dsafdsa" runat="server">
 
    <script language="javascript" type="text/javascript">
    
    
function RowClick(rowIndex)

 {

   // alert("Click on row with index: " + rowIndex);

    return false; //cancel the postback request set with ClientSettings -> EnablePostBackOnRowClick = true

 }


 function RowSelecting(sender, args) {
     
     var id = args.get_id();
     var inputCheckBox = $get(id).getElementsByTagName("input")[0];
     if (!inputCheckBox || inputCheckBox.disabled) {
         //cancel selection for disabled rows
         args.set_cancel(true);
     }
     if (inputCheckBox.checked == true) {
         inputCheckBox.checked = false;
     }
     else
     {
         inputCheckBox.checked =true;
     }
    
 }
 function RowDeselecting(sender, args) {
     alert("Deselect");
     var id = args.get_id();
     var inputCheckBox = $get(id).getElementsByTagName("input")[2];
     if (!inputCheckBox || inputCheckBox.disabled) {
         //cancel selection for disabled rows
         args.set_cancel(true);
     }
     inputCheckBox.checked = false;
 }

    </script>
    </telerik:RadCodeBlock>
    
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
</telerik:RadScriptManager>
    <div>
    
        <telerik:RadComboBox ID="RadComboBox1" Runat="server">
        </telerik:RadComboBox>
    <asp:HiddenField ID="HiddenField2" runat="server" />    
        
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadGrid ID="RadGrid1" runat="server"
            AllowPaging="True" PageSize="10" Width="97%"   AllowMultiRowSelection="True"
            GridLines="None">
            <PagerStyle Mode="NumericPages" />
             <ClientSettings EnableRowHoverStyle="true">
                <Selecting AllowRowSelect="true"    EnableDragToSelectRows="true"/>
                <ClientEvents OnRowClick="RowSelecting" />
                
            </ClientSettings>
            <MasterTableView>
                <Columns>
                    <telerik:GridClientSelectColumn>
                    </telerik:GridClientSelectColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    
    </div>
    </form>
</body>
</html>

Thanks
G. Manikandan
Pavlina
Telerik team
 answered on 11 Aug 2010
1 answer
143 views
I use UrlRewritingNet.UrlRewriter.dll for Rewriter my website, but RadEditor not working. I attach message error when click button (Image manager, Flash manager, Template manager....). If not use UrlRewritingNet.UrlRewriter.dll (delete line config rewriter in web.config) then RadEditor run ok.
Please help me, how to use  RadEditor with UrlRewritingNet.UrlRewriter.dll.
Thanks you very much.


Rumen
Telerik team
 answered on 11 Aug 2010
1 answer
37 views
I want to be able to make my own "View" of the data and have a tab showup for it

So for example the "Timeline view" in my head for my app should show me who is off in sequential order in a list, perhaps grouped by Date like a vertical calendar...OR some sort of view like that

I think thats how it looks normally maybe with times, but in my case we're dealing with all-day events so it just looks like a 3 day, week view
Peter
Telerik team
 answered on 11 Aug 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?