Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
74 views
Did someone has example of using DNN and RadScheduler? Any plans for coming up with RadScheduler available for DNN?
Peter
Telerik team
 answered on 18 Jan 2008
4 answers
321 views
I am attempting to replicate the behavior found in this example:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Programming/SelectRowWithCheckBox/DefaultCS.aspx

I have everything setup virtually identically as far as I can tell with the exception that I am binding my datasource in the codebehind.  What is happening is that whenever I click a checkbox it says "loading" then the box is unchecked and the row is not selected.  I will post my code below just in case I have something wrong.

thanks
~David

<asp:ScriptManager ID="ScriptManager1" runat="server" />
<telerik:RadAjaxManager ID="RadAjaxManager1" EnableAJAX="true" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="myTasksDG">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="myTasksDG" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

<telerik:RadGrid id="myTasksDG"
                OnItemCreated="myTasksDG_ItemCreated"
                ShowStatusBar="true"
                runat="server"
                AllowPaging="True"
                AllowSorting="True"
                PageSize="3"               
                AllowMultiRowSelection="true"
                GridLines="None" 
                Skin="WebBlue"
                AutoGenerateColumns="False"
                OnPreRender="myTasksDG_PreRender">       
                <MasterTableView ShowFooter="True">              
                    <Columns>
                        <telerik:GridBoundColumn visible="True" datafield="TICK_ID" readonly="True" headertext="ID"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn visible="False" datafield="APP_LOCATION" readonly="True" headertext="ID"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn visible="True" datafield="APP_USER" readonly="True" headertext="Submitted By:"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn visible="True" datafield="APP_WORKER" readonly="True" headertext="Assigned To:"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn visible="True" datafield="APP_NAME" readonly="True" headertext="Form Type:"></telerik:GridBoundColumn>                                                                             
                   
                        <telerik:GridTemplateColumn HeaderText="Time in Que:">
                        <ItemTemplate>
                            <b><font Color="<%#DataBinder.Eval(Container.DataItem , "itemColor")%>"> <%#DataBinder.Eval(Container.DataItem , "TIME_IN_QUE")%></font></b>
                        </ItemTemplate>   
                        </telerik:GridTemplateColumn>  
                       
                        <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn">
                            <HeaderTemplate>
                             <asp:CheckBox id="headerChkbox" OnCheckedChanged="ToggleSelectedState" AutoPostBack="True" runat="server"></asp:CheckBox>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox id="CheckBox1" OnCheckedChanged="ToggleRowSelection" AutoPostBack="True" runat="server"></asp:CheckBox>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>

                       
                    </Columns>
                    </MasterTableView>
         
                    
                <PagerStyle Mode="NextPrevAndNumeric" />
                </telerik:RadGrid>










    protected void ToggleRowSelection(object sender, EventArgs e)
    {
        ((sender as CheckBox).Parent.Parent as GridItem).Selected = (sender as CheckBox).Checked;
    }

    protected void myTasksDG_ItemCreated(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            e.Item.PreRender += new EventHandler(myTasksDG_ItemPreRender);
        }
    }

    private void myTasksDG_ItemPreRender(object sender, EventArgs e)
    {
        ((sender as GridDataItem)["CheckBoxTemplateColumn"].FindControl("CheckBox1") as CheckBox).Checked = (sender as GridDataItem).Selected;
    }

   

    protected void ToggleSelectedState(object sender, EventArgs e)
    {
        if ((sender as CheckBox).Checked)
        {
            foreach (GridDataItem dataItem in myTasksDG.MasterTableView.Items)
            {
                (dataItem.FindControl("CheckBox1") as CheckBox).Checked = true;
                dataItem.Selected = true;
            }
        }
        else
        {
            foreach (GridDataItem dataItem in myTasksDG.MasterTableView.Items)
            {
                (dataItem.FindControl("CheckBox1") as CheckBox).Checked = false;
                dataItem.Selected = false;
            }
        }
    }

    protected void myTasksDG_PreRender(object sender, EventArgs e)
    {
        string text = "Selected rows: " + myTasksDG.SelectedItems.Count;
        myTasksDG.Controls.Add(new LiteralControl(string.Format("<span style='color:yellow;font-weight:bolder;'>{0}</span>", text)));
    }
David
Top achievements
Rank 1
 answered on 18 Jan 2008
6 answers
170 views
I cant find any example on how to make the smileylist populated codebehind in the promotheus editor..

any suggestions?

Telerik.WebControls.RadEditorUtils.ToolbarDropDown dropdown = (ToolbarDropDown)RadEditor1.Toolbars[0].Tools[2];  
George
Telerik team
 answered on 18 Jan 2008
2 answers
151 views
Hi,
I would like to offset the dropdown group in the radmenu using CSS. The online examples show how to do that programmatically, but I'd like to do it in the CSS if possible.

I'm using a horizontal menu and I want to move the dropdown group down and right 1px. I believe the correct class is rmGroup.

Thanks for any help with this.
Joe
Top achievements
Rank 2
 answered on 18 Jan 2008
1 answer
69 views
Hi there
I was able to make the RadEditor the default editor in my sharepoint site, however, while adding a new document to a document library or editing an existing document which I created externally through word 2007, it complains with the error below:
New Document requires a Windows Sharepoint Services-sompatible application and Internet explorer 6.0 or greater.

I followed the support article on microsoft and they suggest installing sharepoint support as well as re-registering the Owssupp.dll file. I did the former successfully however, the dll unreg and reg fails.

This problem started only after integrating the radeditor with Sharepoint.

How do I get around using the radeditor to submit new content to a document library in sparepoint? Does it have anything to do with enabling the word 2007 template since I do not see it by defauly in the document template drop down list.

Thanks

Rachna Khune
SDE - Microsoft
Lini
Telerik team
 answered on 18 Jan 2008
1 answer
123 views
I have an application using a horizontal menu, where I need to split the root items at a certain point, with some aligned to the left of the container, and the rest aligned to the right of the container.

e.g. Standard menu items on the left, Help and Login items on the right... with the menu stretching over the container. Like...

Item-1 | Item-2 | Item-3                                      | Item-4 | Item-5

Obviously I can achieve this with multiple menus, but I thought there is probably a more elegent way to manage this... and I'm simply not looking in the right place.
T. Tsonev
Telerik team
 answered on 18 Jan 2008
4 answers
152 views

I have a sample RadScheduler as follows. When I put the AdvancedEditTemplate it gives me below error. When I add RadAjaxManager, it gives me error too. If I don't  use RadAjaxManager and AdvancedEditTemplate, it displays the scheduler fine.  What should I do?

Could not find ResourceType selected for grouping. Please, check that the GroupBy attribute is properly set and a ResourceType with the same name exists.

    <telerik:RadScheduler ID="RadScheduler1" runat="server"
        Skin="Office2007"
        SelectedView="ResourceView"
        AllowDelete="False"
        AllowEdit="True"
        AllowInsert="False"
        DataStartField="Start"
        DataEndField="End" DataKeyField="AptId"
        MinutesPerRow="5"
        DataSourceID="AptSource" DataSubjectField="Act"
        FirstDayOfWeek="Sunday" LastDayOfWeek="Saturday"
        OverflowBehavior="Scroll"
        >
        <ResourceTypes>
            <telerik:ResourceType DataSourceID="PhySource"
                    Name="Physician" TextField="Name" KeyField="PhyId"
                    ForeignKeyField="PhyId" />
        </ResourceTypes>
<%--        <AdvancedEditTemplate>
        <asp:Panel ID="pnlEdit" runat="server">
            Patient Name: <asp:TextBox ID="txtName" runat="server" />
            Activity: <asp:TextBox ID="TextBox1" runat="server" />
            Start Time: <asp:TextBox ID="TextBox2" runat="server" />
            End Time: <asp:TextBox ID="TextBox3" runat="server" />
        </asp:Panel>   
        </AdvancedEditTemplate>
--%>        <AppointmentTemplate>
            <asp:Panel ID="pnlSlot" runat="server">
            <span style="background-color:Yellow;">Troy</span>
            <span style="background-color:Blue;">Livonia</span>
            <span style="background-color:Green;">Novi</span>
            </asp:Panel>
        </AppointmentTemplate>
    </telerik:RadScheduler>   


Peter
Telerik team
 answered on 18 Jan 2008
4 answers
336 views
I am trying to create a window for use with the asp:login control, but having trouble getting the window to close when logged in automatically.

1) I created a User Control that has a LoginView, showing a button of "Login" or  "Logout" accordingly to current status.  This control will always be at the top right of every page (master page).  When clicked, it opens a window that points to the loginpage.aspx.

2)  Loginpage.aspx has a LoginView that shows the Login control and the LoginStatus appropriately.  Within the Login control's template I added a button [Cancel] that closes the window. 


What I would like is when user clicks the [Login] button, that it automatically closes the window and refreshes the parent.  Problem I am finding is trapping the code to perform this. 
  • Using the OnLoggedIn event and codebehind, I can do a Request.Redirect, but I don't know the parent nor does the redirect work properly (redirects within window).
  • Java script, I can get the parent window and redirect, but can't get the code to call the script.
  • Tried combining prior to by injecting script out to label control on the OnLoggedIn event, but that didn't seem to work.

I am using VS 2008 and find attempting to debug is very difficult given the CMS system this is built upon and the various relative paths in it (VS 2008 wants to create port/instances for debugging, changing the effective URL).


Any thoughts on how to accomplish this?

Georgi Tunev
Telerik team
 answered on 18 Jan 2008
6 answers
180 views
I use as "GridButtonColumn" to show a column for edit and delete. I want to execute my own actions on clicking on the buttons. The same for build in "Add new record" button. How can I do that?
Markus
Top achievements
Rank 1
 answered on 18 Jan 2008
2 answers
279 views
I have a grid with a detail table (code below).

If I try to use the expandItem method, it expands the item, but does NOT change the + (plus) image to a - (minus) and if get_expanded is then called on that item it returns false. I am trying to implement a way for the user to click on a row and have the detail rows show. With these methods not working correctly I don't know how it will be possible. Any help would be greatly appreciated.

Here's the grid code
<telerik:RadGrid ID="rgCurrentOrders" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" GridLines="None" PageSize="20" Skin="Telerik"> 
    <ExportSettings> 
        <Pdf FontType="Subset" PaperSize="Letter" /> 
        <Excel Format="Html" /> 
    </ExportSettings> 
    <PagerStyle Mode="NextPrevAndNumeric" Font-Size="10pt" PageButtonCount="20" /> 
    <ClientSettings> 
        <ClientEvents OnRowClick="rgCurrentOrders_RowClick" OnRowMouseOver="rgCurrentOrders_RowMouseOver" OnRowMouseOut="rgCurrentOrders_RowMouseOut" /> 
    </ClientSettings> 
    <MasterTableView CommandItemDisplay="None" CurrentResetPageIndexAction="SetPageIndexToFirst" 
        Dir="LTR" Frame="Border" TableLayout="Auto" HierarchyLoadMode="Client" DataKeyNames="order_id"> 
        <DetailTables> 
            <telerik:GridTableView Name="LineItems" DataKeyNames="reference_number" HierarchyLoadMode="Client" Width="100%" runat="server"> 
                <ParentTableRelation> 
                    <telerik:GridRelationFields MasterKeyField="order_id" DetailKeyField="order_id" /> 
                </ParentTableRelation> 
                <Columns> 
                    <telerik:GridHyperLinkColumn DataTextField="reference_number" DataNavigateUrlFields="reference_number_link" HeaderText="Ref #" UniqueName="reference_number"> 
                        <ItemStyle Width="5%" /> 
                    </telerik:GridHyperLinkColumn> 
                    <telerik:GridBoundColumn DataField="web_status_code" HeaderText="Status" UniqueName="web_status_code"> 
                        <ItemStyle Width="7%" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="urgency_description" HeaderText="Urgency" UniqueName="urgency_description"> 
                        <ItemStyle Width="7%" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="manufacturer" HeaderText="Manufacturer" UniqueName="manufacturer"> 
                        <ItemStyle Width="26%" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="model" HeaderText="Model" UniqueName="model"> 
                        <ItemStyle Width="15%" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="part_number" HeaderText="Part Number" UniqueName="part_number"> 
                        <ItemStyle Width="15%" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="work_order_number" HeaderText="WO #" UniqueName="work_order_number"> 
                        <ItemStyle Width="10%" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="equipment_number" HeaderText="Asset Id" UniqueName="equipment_number"> 
                        <ItemStyle Width="10%" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="quantity" HeaderText="Qty" UniqueName="quantity"> 
                        <ItemStyle Width="5%" /> 
                    </telerik:GridBoundColumn> 
                </Columns> 
                <ExpandCollapseColumn Resizable="False" Visible="False"> 
                    <HeaderStyle Width="20px" /> 
                </ExpandCollapseColumn> 
                <RowIndicatorColumn Visible="False"> 
                    <HeaderStyle Width="20px" /> 
                </RowIndicatorColumn> 
            </telerik:GridTableView> 
        </DetailTables> 
        <EditFormSettings> 
            <EditColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"> 
            </EditColumn> 
        </EditFormSettings> 
        <Columns> 
            <telerik:GridBoundColumn DataField="order_id" HeaderText="Seq #" UniqueName="order_id" CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" ForceExtractValue="None"></telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="cust_facility" HeaderText="Facility" UniqueName="cust_facility" CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" ForceExtractValue="None"></telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="address_description" HeaderText="Company" UniqueName="address_description" CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" ForceExtractValue="None"></telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="company_name" HeaderText="Company" UniqueName="company_name" CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" ForceExtractValue="None"></telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="date_entered" HeaderText="Date Entered" UniqueName="date_entered" DataFormatString="{0:d}" CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" ForceExtractValue="None"></telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="work_order_number" HeaderText="WO #" UniqueName="work_order_number" CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" ForceExtractValue="None"></telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="equipment_number" HeaderText="Asset Id" UniqueName="equipment_number" CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" ForceExtractValue="None"></telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="requestor_name" HeaderText="Requestor" UniqueName="requestor_name" CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" ForceExtractValue="None"></telerik:GridBoundColumn> 
        </Columns> 
        <ExpandCollapseColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
            Resizable="False" Visible="False"> 
            <HeaderStyle Width="20px" /> 
        </ExpandCollapseColumn> 
        <RowIndicatorColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
            Visible="False"> 
            <HeaderStyle Width="20px" /> 
        </RowIndicatorColumn> 
    </MasterTableView> 
</telerik:RadGrid> 


Here's the javascript code to reproduce the problem
function rgCurrentOrders_RowClick(sender, eventArgs) 
{ 
    //alert(eventArgs.get_itemIndexHierarchical()); 
     
    /*var currentItem = null;
    
    if (eventArgs.get_itemIndexHierarchical().indexOf(':') > 0)
    {
        var detailTableIndex = eventArgs.get_itemIndexHierarchical().split(':')[0];
        var rowIndex = eventArgs.get_itemIndexHierarchical().split(':')[1].split('_')[1];
        currentItem = sender.get_detailTables()[detailTableIndex].get_dataItems()[rowIndex];
    }
    else
    {
        currentItem = sender.get_masterTableView().get_dataItems()[eventArgs.get_itemIndexHierarchical()];
        
        alert('currentItem.get_expanded() = ' + currentItem.get_expanded());
        if (!currentItem.get_expanded())
        {
            sender.get_masterTableView().expandItem(eventArgs.get_itemIndexHierarchical());
        }
        else
        {
            alert('collapse');
            sender.get_masterTableView().collapseItem(eventArgs.get_itemIndexHierarchical());
        }
    }*/ 
    var masterTableView = $find('<%= rgCurrentOrders.ClientID %>').get_masterTableView(); 
    masterTableView.expandItem(0); 
    alert('expanded = ' + masterTableView.get_dataItems()[0].get_expanded()); 
} 
 
function rgCurrentOrders_RowMouseOver(sender, eventArgs) 
{ 
    var backgroundColor = ''; 
    var currentRow = null; 
     
    if (eventArgs.get_itemIndexHierarchical().indexOf(':') > 0) 
    { 
        var detailTableIndex = eventArgs.get_itemIndexHierarchical().split(':')[0]; 
        var rowIndex = eventArgs.get_itemIndexHierarchical().split(':')[1].split('_')[1]; 
        currentRow = sender.get_detailTables()[detailTableIndex].get_dataItems()[rowIndex].get_element(); 
        backgroundColor = '#e6f6e6'; 
    } 
    else 
    { 
        currentRow = sender.get_masterTableView().get_dataItems()[eventArgs.get_itemIndexHierarchical()].get_element(); 
        backgroundColor = '#e6eaff'; 
    } 
     
    if (currentRow != null) 
    { 
        currentRow.style.cursor = 'pointer'; 
        currentRow.style.backgroundColor = backgroundColor; 
    } 
} 
 
function rgCurrentOrders_RowMouseOut(sender, eventArgs) 
{ 
    var currentRow = null; 
     
    if (eventArgs.get_itemIndexHierarchical().indexOf(':') > 0) 
    { 
        var detailTableIndex = eventArgs.get_itemIndexHierarchical().split(':')[0]; 
        var rowIndex = eventArgs.get_itemIndexHierarchical().split(':')[1].split('_')[1]; 
        currentRow = sender.get_detailTables()[detailTableIndex].get_dataItems()[rowIndex].get_element(); 
    } 
    else 
    { 
        currentRow = sender.get_masterTableView().get_dataItems()[eventArgs.get_itemIndexHierarchical()].get_element(); 
    } 
     
    if (currentRow != null) 
    { 
        currentRow.style.backgroundColor = ''; 
    } 
} 


Please help.
Yavor
Telerik team
 answered on 18 Jan 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?