Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
163 views
Good Day all

I have  a the Following query

Declare @NumberOfSessions INT
set @NumberOfSessions = (select [Sessions] from dbo.TBL_TTBL)

SELECT   ID, Dy,  Sess,[Code],[Description],Description + '  Venue:'+ CAST(Venue AS VARCHAR) +' Student:'+ CAST(Students AS VARCHAR) +' StaffTerm:'+CAST(StaffTerm AS VARCHAR) + ' Term:'+ CAST(Term AS VARCHAR)  AS [SUBJECTS],Abrev,[Type],Number,
GrpName,GrpNumber,Duration,[Students],
[Venue],Capacity,
[Staff],[ModlID],[Term]
,[StaffTerm]
,CAST(STARTDATE AS DATETIME) as [STARTDATE], CAST(ENDDATE AS DATETIME) AS [ENDDATE],[Length],CAST(@NumberOfSessions AS INT) as [Number_of_Sessions]
FROM
 final_Timetable
group by dy,ID,Sess,[Code],[Description],Description,Abrev,[Type],Number,
GrpName,GrpNumber,Duration,[Students],
[Venue],Capacity,
[Staff],[ModlID],[Term]
,[StaffTerm],[STARTDATE],[ENDDATE],[Length]
order by dy,sess


i am binding this Data to the RadSchedular and the definition of my markup looks like this

  <telerik:RadScheduler ID="RadScheduler1" ColumnWidth="200px" RowHeaderWidth="200px" DayView-GroupingDirection="Vertical" RowHeaderHeight="400px"  runat="server" DataSourceID="SqlDataSource2"
            DataEndField="ENDDATE" DataKeyField="ID"  Skin="Telerik" Height="300px" Width="1600px" DataSubjectField="SUBJECTS"  DataStartField="STARTDATE" AllowDelete="False" AllowEdit="False" AllowInsert="False"   DayEndTime="20:00:00" DisplayRecurrenceActionDialogOnMove="True" OverflowBehavior="Expand" SelectedView="MonthView"  OnDataBound="RadScheduler1_DataBound" OnAppointmentCreated="RadScheduler1_AppointmentCreated" CssClass="ConfigurationPanel1" OnTimeSlotCreated="RadScheduler1_TimeSlotCreated" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound">
            <MultiDayView UserSelectable="True"   ReadOnly="True" GroupBy="Venue" GroupingDirection="Vertical" />
            <DayView GroupingDirection="Vertical" />
            <Localization AdvancedDay="DY" />
           <ResourceTypes>
            <telerik:ResourceType KeyField="Venue" Name="Venue" TextField="Venue" ForeignKeyField="Venue"
            DataSourceID="SqlDataSource2" />
            </ResourceTypes>
        </telerik:RadScheduler>
       
and my Datasource Controls is using a Sp and its defined like this

        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="Data Source=(local);Initial Catalog=oDirectv3;Persist Security Info=True;User ID=o;Password=abacus"
            SelectCommand="sp_Timetable_View" DeleteCommand="sp_Timetable_View" ProviderName="<%$ ConnectionStrings:DBConnectionString.ProviderName %>" DeleteCommandType="StoredProcedure" SelectCommandType="StoredProcedure" OnSelecting="SqlDataSource2_Selecting">
            <SelectParameters>
                <asp:SessionParameter DefaultValue="" Name="selectionType" SessionField="viewOptions"
                    Type="String" />
                <asp:SessionParameter DefaultValue="" Name="selectedItems" SessionField="selectedItems"
                    Type="String" />
                <asp:SessionParameter DefaultValue="" Name="selectedTerms" SessionField="selectedTerms"
                    Type="String" />
            </SelectParameters>
            <DeleteParameters>
                <asp:Parameter Name="selectionType" Type="String" />
                <asp:Parameter Name="selectedItems" Type="String" />
                <asp:Parameter Name="selectedTerms" Type="String" />
            </DeleteParameters>
        </asp:SqlDataSource>

The Results from this datasource has all the fields i need to bind the Schedular. i have looked at the example in telerik site http://demos.telerik.com/aspnet-ajax/scheduler/examples/timelineview/defaultcs.aspx

and here they have a different Datasource Control for Groupby, i am not sure why, but as you can see i have used the same DatasourceControl to Bind the Group by.

Now my problem is that the Schedular does not show the Group by Resource as in the Example. I tried to use a second SQlDatasource for a group by sake, and i get an error that is not descriptive "Object not set for an instance of a Class"

What is it i should put in mind while Doing the Group by

Thanks
 
 
Veronica
Telerik team
 answered on 25 Jun 2010
2 answers
117 views
Hello!

I currently have a RadGrid bound to a List containing a custom class. This list gets populated when a user drags a node from a TreeView.

I'd like to let the user select a value from the dropdown and enter their own value inside the "Value" field and then save this to the List.
I've tried doing this using the automatic edit column but inside the "RadGrid_UpdateCommand" I can't seem to find the new data! I'm probably missing something pretty simple. :)

Here's the code:

<telerik:RadGrid ID="conditionsGrid" runat="server" Width="252px"  
                Height="116px" GridLines="None" AllowMultiRowSelection="True"  
                onneeddatasource="conditionsGrid_NeedDataSource" Skin="Sunset" CssClass="addedTablesGrid"  
                    AutoGenerateEditColumn="True" onitemupdated="conditionsGrid_ItemUpdated"  
                    onupdatecommand="conditionsGrid_UpdateCommand"  
                    AllowAutomaticUpdates="true" onitemcommand="conditionsGrid_ItemCommand"
                <MasterTableView Width="100%"
                    <NoRecordsTemplate> 
                        Drag columns here. 
                    </NoRecordsTemplate> 
                    <Columns> 
                        <telerik:GridBoundColumn HeaderText="Column" UniqueName="columnColumn" DataField="columnName" DataType="System.String" EmptyDataText="Ooops" ReadOnly="true"
                        </telerik:GridBoundColumn> 
                        <telerik:GridTemplateColumn HeaderText="Value" UniqueName="type1"
                            <ItemTemplate> 
                                <asp:DropDownList runat="server"
                                    <asp:ListItem Text="Equals" Value="="></asp:ListItem> 
                                    <asp:ListItem Text="Greater than" Value=">"></asp:ListItem> 
                                    <asp:ListItem Text="Less than" Value="<"></asp:ListItem> 
                                    <asp:ListItem Text="Not equal to" Value="!="></asp:ListItem> 
                                </asp:DropDownList> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridBoundColumn HeaderText="Value" UniqueName="valueColumn" DataField="value" > 
                        </telerik:GridBoundColumn> 
                    </Columns> 
                </MasterTableView> 
                <ClientSettings AllowRowsDragDrop="true"
                    <Selecting AllowRowSelect="true" EnableDragToSelectRows="true" /> 
                </ClientSettings> 
            </telerik:RadGrid> 



        protected void ColumnTreeView_NodeDrop(object sender, RadTreeNodeDragDropEventArgs e) 
        { 
            if (string.IsNullOrEmpty(e.HtmlElementID)) 
                return
 
            if (e.HtmlElementID == "MainBodyPlaceHolder_conditionsGrid"
            { 
                List<GridConditionRow> added = AddedTableConditions; 
 
                foreach (RadTreeNode node in e.DraggedNodes) 
                { 
                    GridConditionRow Row = new GridConditionRow(); 
                    Row.columnName = node.Value; 
                    Row.value = ""
                    added.Add(Row);                     
                } 
                 
                AddedTableConditions = added; 
 
                conditionsGrid.DataSource = AddedTableConditions; 
                conditionsGrid.DataBind(); 
            } 
        } 
 
        protected void conditionsGrid_UpdateCommand(object source, GridCommandEventArgs e) 
        { 
            //It's here that I can't seem to find the updated information to alter the List with. 
        } 


Thanks! 
Ben.
Ben
Top achievements
Rank 1
 answered on 25 Jun 2010
2 answers
252 views
Hello sir,
             I am using RadListBox with its ItemTemplate like shown below:

        <telerik:RadListBox runat="server" ID="RadListOrderColumns" AllowReorder="true"
                        Height="200px" Width="350px" TransferMode="Move"
                        SelectionMode="Multiple">
                    <ItemTemplate>                   
                    <table>
                    <tr>
                    <td>
                            <asp:Label runat="server" Width="70px" Text='<%# DataBinder.Eval(Container, "DataItem.Database_Name") %>' ></asp:Label>
                     </td>
                     <td>                                                                                       
                         <input id="Text1" type="text" value="" />
                     </td>
                    </tr>                 
                     </table>
                    </ItemTemplate>                  
                  </telerik:RadListBox>
*******************************************************************************************************
So, when i enter any thing in that input (text box) and when i try to use 'delete' key it does not work.
               i can not delete anything using 'delete' key whereas 'backspace' works fine.
This is a strange problem, i have tried to use 'RadTextBox' and 'asp:textbox' in place of 'input' still i am facing same problem.

Please help, i can't understand how delete key stops working in a textbox.

Genady Sergeev
Telerik team
 answered on 25 Jun 2010
2 answers
97 views
I am using the new Telerik Dll and in doing so the grid pager style gets messed up. please suggest a way to fix this. The dll i am using is of version 2010.1.519.35. This problem was not there before.

Debojyoti
Top achievements
Rank 1
 answered on 25 Jun 2010
1 answer
119 views
This all worked in visual studio 2008, I just upgraded to 2010, project is targeted to 4 framework, ajax toolkit 40412 and latest telerik toolkit RadControls for ASP.NET AJAX Q1 2010
In my first page I have this:
    <telerik:RadScriptManager ID="ScriptManager1" runat="server"
        EnableTheming="True">
    <AuthenticationService Path="~/Services/SpendusAuthService.asmx" />
       <Scripts>
          <asp:ScriptReference Path="~/js/logon.js"/>
       </Scripts>
       <Services>
          <asp:ServiceReference Path="~/EndPoints/RegistrationService.svc" />
       </Services>
    </telerik:RadScriptManager>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Forest">
               </telerik:RadWindowManager>

and when I attempt to run I get this error :
Microsoft JScript runtime error: AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll.

If I switch the the toolkitscriptmanager I get telerik errors with radwindowmanager. what to do
T. Tsonev
Telerik team
 answered on 25 Jun 2010
0 answers
556 views

You can find information about known issues and important changes for the entire UI for ASP.NET AJAX suite in the following pinned thread: Known Issues and Important Changes in UI for ASP.NET AJAX.

 

Q1 SP2 2010 (Version number: 2010.1.519 and lower)

Problem: The RadScriptManager is incompatible with the Ajax Control Toolkit (Version number 40412 and higher).

The following error appears when controls from the ACT are present on the page:
Microsoft JScript runtime error: AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll.

Solution for .NET 4.0 projects:  Upgrade the RadControls for ASP.NET AJAX version 2010.1.625 or newer.

Important: Make sure you use the .NET 4.0 build of both Telerik.Web.UI.dll and AjaxControlToolkit.dll

If upgrade is not an option use the following workaround:
<telerik:RadScriptManager runat="server" EnableScriptCombine="false" /> 

Solution for .NET 3.5 projects: Override the references to MicrosoftAjax.js and MicrosoftAjaxWebForms.js to point to the ACT script files.

<telerik:RadScriptManager runat="server"
    <Scripts> 
        <asp:ScriptReference Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
            Name="MicrosoftAjax.js" Path="Scripts-40412/MicrosoftAjax.js" /> 
        <asp:ScriptReference Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
            Name="MicrosoftAjaxWebForms.js" Path="Scripts-40412/MicrosoftAjaxWebForms.js" /> 
    </Scripts> 
</telerik:RadScriptManager> 
 

The script files are obtained by building the ACT from source. Sample project, including the scripts for version 40412, is attached in the related forum post: FIX: RadScriptManager compatibility issues with Ajax Control Toolkit
Telerik Admin
Top achievements
Rank 1
Iron
 asked on 25 Jun 2010
1 answer
91 views
Hi,

I'm using Telerik Controls V2010.1.519.35 with Google Chrome V5.0.375.86.

My RadScheduler control is web service bound, and is a TimelineView, grouped by resource.

Initially, the Scheduler displays with all the date headers intact, and the Resources listed correctly down the side, however when the Scheduler displays the appointments, many of the headings disappear - this does not occur on Firefox or IE7, and surprisingly does not occur on Safari 4.

I note that the headings also disappear on pages that have no appointments, and the pattern of missing headers differs.

I have looked in Chrome's Element viewer, and the TH elements that appear empty are indeed empty, so it's the DOM, not the webkit renderer that's at fault.

Hope that you can fix it.

Cheers,

Mark
Peter
Telerik team
 answered on 25 Jun 2010
5 answers
149 views
It appears that the AutoCompleteSeparator property prevents the Text property from being updated in a databound RadComboBox when the SelectedIndex is changed during an AJAX postback. (So I click the Reset button, and the SelectedIndex gets set programmatically to 0, as intended, but users still see the previously selected text in the control.)

 

<telerik:RadComboBox ID="MyComboBox" runat="server" Width="250" CausesValidation="false" AutoPostBack="false" MarkFirstMatch="true" AllowCustomText="false" AutoCompleteSeparator=";" ExpandAnimation-Duration="250" AccessKey="O" /> 
Kalina
Telerik team
 answered on 25 Jun 2010
3 answers
359 views

Hi

I have a RadListView with a RadComboBox in the fieldset itemtemplate, and the RadComboBox has a CheckBox ItemTemplate.

What I’m need to do is to change the text of the first item in my combobox and hide the checkbox.

It works fine if I have only one combobox but I need this in a ListView.
Thanks,
Nicole

 protected void RadListView1_ItemDataBound(object sender, RadListViewItemEventArgs e)  
 {  
 
            RadComboBox cmbColores = (RadComboBox)e.Item.FindControl("cbmColores1");  
 
            DataTable dt = CargarCombos();  
 
            //Add Item  
            dt.Rows.Add(-1, "");  
 
            DataView dv = new DataView();  
            dv = dt.DefaultView;  
            dv.Sort = "NombreCompleto";  
            DataTable dt1 = dv.ToTable();  
 
            cmbColores.DataSource = dt1;  
            cmbColores.DataTextField = "NombreCompleto";  
            cmbColores.DataValueField = "SKUID";  
            cmbColores.DataBind();  
             //change text: first item combobox
            cmbColores.FindItemByValue("-1").Text = " -- Seleccione --";  
            RadComboBoxItem item = cmbColores.FindItemByValue("-1");  
            CheckBox chk = (CheckBox)item.FindControl("chk1");  
             //first item combobox
            chk.Visible = false;  
 

 

 <telerik:RadListView ID="RadListView1" Width="100%" AllowPaging="true" runat="server" 
                    ItemPlaceholderID="ProductsHolder" DataKeyNames="SKUID" OnNeedDataSource="RadListView1_NeedDataSource" 
                    OnItemDataBound="RadListView1_ItemDataBound" OnItemCommand="RadListView1_ItemCommand">  
                    <ItemTemplate> 
                        <fieldset> 
 
                        <telerik:RadComboBox ID="cbmColores1" runat="server" Skin="Windows7" Width="180px" 
                          EmptyMessage="Color..." LoadingMessage="Cargando..." OnClientDropDownClosed="onDropDownClosing" 
                         AutoPostBack="False">  
                                            <ItemTemplate> 
                                                <div onclick="StopPropagation(event)">  
                                                    <asp:CheckBox runat="server" ID="chk1" Checked="false" /> 
                                                    <asp:Label runat="server" ID="Label1" AssociatedControlID="chk1">  
                                                     <%# DataBinder.Eval(Container.DataItem, "NombreCompleto")%> 
                                                    </asp:Label> 
                                                </div> 
                                            </ItemTemplate> 
                                        </telerik:RadComboBox> 
                         </fieldset> 
                    </ItemTemplate> 
                    <LayoutTemplate> 
                        <fieldset id="RadListView1" > 
                         </fieldset> 
                    </LayoutTemplate> 
                </telerik:RadListView> 


Nikolay Rusev
Telerik team
 answered on 25 Jun 2010
1 answer
122 views
hi,

I have only one Grid in my form.

I don't want to use paging but to display all data (some 400 data) all at once with scrollbar, and want to maximise the Grid display to full screen height and width. 

However, it never appears in 100% height & 100% width no matter what I do.

Imagine that I have a 19" monitor and the Grid only use up half the screen with scrollbar (rather than full screen with scrollbar) ..

Please help..

Thanks

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" 
    Culture="auto" %> 
 
<%@ Register Assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 
    Namespace="System.Web.UI.WebControls" TagPrefix="asp" %> 
<%@ 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> 
    <style type="text/css">  
    </style> 
</head> 
<body style="height:100%">  
    <form id="form1" runat="server" style="height:100%">  
    <asp:ScriptManager runat="server" ID="Manager1">  
    </asp:ScriptManager> 
 
    <telerik:RadGrid ID="RadGrid1" runat="server" Width="95%" ShowStatusBar="true" AutoGenerateColumns="False" 
        PageSize="7" AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="False" Height="100%" 
        OnDetailTableDataBind="RadGrid1_DetailTableDataBind" OnNeedDataSource="RadGrid1_NeedDataSource" 
        OnPreRender="RadGrid1_PreRender" onitemcommand="RadGrid1_ItemCommand">  
        <PagerStyle Mode="NumericPages"></PagerStyle> 
        <MasterTableView Width="100%" DataKeyNames="CustomerID" AllowMultiColumnSorting="True" Name="MasterTable" 
         CommandItemDisplay="Top" HierarchyLoadMode="Client">  
         <CommandItemTemplate>    
            <div align="left">    
              <asp:LinkButton ID="initInsertLinkButton" runat="server" CommandName="InitInsert">Add new    
              </asp:LinkButton>    
              <asp:LinkButton ID="editSelectedLinkButton" runat="server" CommandName="EditSelected">Edit Selected    
              </asp:LinkButton>    
            </div>    
        </CommandItemTemplate>    
 
           
            <ExpandCollapseColumn Visible="True">  
            </ExpandCollapseColumn> 
            <Columns>                 
                <telerik:GridBoundColumn SortExpression="CustomerID" HeaderText="CustomerID" HeaderButtonType="TextButton" 
                    DataField="CustomerID">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="ContactName" HeaderText="Contact Name" HeaderButtonType="TextButton" 
                    DataField="ContactName">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="CompanyName" HeaderText="Company" HeaderButtonType="TextButton" 
                    DataField="CompanyName">  
                </telerik:GridBoundColumn> 
            </Columns> 
        </MasterTableView> 
        <ClientSettings> 
            <Selecting AllowRowSelect="True"></Selecting> 
            <ClientEvents OnRowSelected="RowSelected"></ClientEvents> 
            <Scrolling AllowScroll="true" ScrollHeight="100%"  /> 
        </ClientSettings> 
    </telerik:RadGrid> 
    </form> 
</body> 
</html> 
 


Dimo
Telerik team
 answered on 25 Jun 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?