Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
117 views
I'm attempting to use a RadGrid that will allow a user to enter a new row. I have the CommandItemTemplate created, and I have everything wired up so that the proper server side method is being run when I click the insert button. The problem is I'm not getting any of the data I'm trying to add. The row has one editable column, and in that column's EditItemTemplate is a RadComboBox. When I run through the InsertCommand method, no matter what I selected in that combo box, the selected index I get is -1.

To grab the combo box, I'm using:

protected void TrackGrid_InsertCommand(object source, GridCommandEventArgs e) {   
GridEditableItem editedItem = e.Item as GridEditableItem;
RadComboBox titleBox = editedItem["Title"].FindControl("RadComboBox1") as RadComboBox;       
}

Is there some other way I should be trying to grab this data?
MatFindlay
Top achievements
Rank 1
 answered on 11 Aug 2008
1 answer
189 views
The documentation hints that you can, for example, change the mouse cursor during a drag operation in the OnClientNodeDragging event depending on if the cursor is over a valid or invalid drop location, and shows how to get the X/Y coordinates of the cursor. 

But, does anyone have an example of how you could translate the X/Y into an actual html element or control, to determine if the current location is valid or not?
Sean
Top achievements
Rank 2
 answered on 11 Aug 2008
2 answers
225 views
I've two problems after embedding a RadNumericTextBox within the CommandItemTemplate of a RedGrid.

1) ShowSpinButtons="True", yet they are not showing up.  If I place the RadNumericTextBox out side the grid they show...

2) How do I change the font color of the label?

                                <CommandItemTemplate>
                                    <div style="text-align: right">
                                        <table style="border: none">
                                            <tr>
                                                <td style="vertical-align: middle; padding-left: 10px">
                                                    <telerik:RadNumericTextBox ID="RadNumericTextBox2" runat="server" Culture="English (United States)"
                                                        EmptyMessage="P&L Threashold" InvalidStyleDuration="100" Label="Threashold" ShowSpinButtons="True"
                                                        Skin="Vista" ToolTip="Enter P&L Threashold" Type="Currency" Value="25" Width="125px">
                                                        <EnabledStyle HorizontalAlign="Right" />
                                                        <NumberFormat AllowRounding="True" KeepNotRoundedValue="False" />
                                                    </telerik:RadNumericTextBox>
                                                </td>
                                                <td>
                                                    <asp:LinkButton ID="LinkButton4" runat="server" CommandName="RebindGrid"><img style="border:0px;vertical-align:middle;" alt="" src="images/Refresh.gif" /> Refresh Products</asp:LinkButton>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </CommandItemTemplate>

Thanks!
Matthew Fitzpatrick
Top achievements
Rank 1
 answered on 11 Aug 2008
6 answers
147 views

Would it be difficult to setup the PanelBar to act like this:
I will be using this with DNN -

ResidentsMenu

  1. ResItem1
  2. ResItem2
  3. ResItem3
  4. ResItem4
  5. ResItem5

If  you click on ResItem4 for example The ResItem Menu Collapses & you have:

ResidentsMenu
 > ResItem4Menu
  1. ResItem4-Item1
  2. ResItem4-Item2
  3. ResItem4-Item3
  4. ResItem4-Item4
  5. ResItem4-Item5

Clicking on ResidentsMenu will bring that menu back, Clicking on one of the ReItem4 sub-items will bring you to that page.

Phil
Top achievements
Rank 2
 answered on 11 Aug 2008
2 answers
121 views
Hi All,

I have built my RadGrid and it's working like a dream but i have a quick question.

Depending on one of the fields information in this case ".xls" i want to show an excel icon at the side of that. The icons sit in a folder in my web project so i can use them all over the app. Is there a way i can do this programmatically when i bring my dataset back?

Cheers

Jonny
Jonny Sheldrake
Top achievements
Rank 1
 answered on 11 Aug 2008
1 answer
106 views
We were using 4.3.1.0 code was working fine.
Now I download 4.4.6.0.

Error is comming like

Could not load file or assembly 'RadMenu.Net2, Version=4.3.1.0, Culture=neutral, PublicKeyToken=bbe59a8ad3533e68' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)


Please suggest what to do?
Daniel
Telerik team
 answered on 11 Aug 2008
2 answers
188 views
I have a rad grid and textbox that is in an UpdatePanel.  The grid has paging, dynamic tooltips on mouse over, and it's datasource is a sql stored procedure

I have a text box that is not within the grid that I want to use to filter.  I'm able to get the AJAX manager called when text is entered into the field.  However, I'm having issues with the filtering.

I can't see what I'm missing...

ASPX:
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="False" CodeFile="StaffByName.aspx.vb" Inherits="Staff_Staff" title="Yellow Pages" %>
<%@ MasterType VirtualPath="~/MasterPage.master" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<%@ Register Src="~/UserControls/StaffProfile.ascx" TagName="StaffProfile" TagPrefix="uc1" %>
<asp:Content ID="Content" ContentPlaceHolderID="ContentPlaceHolder" Runat="Server">
 <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
                <script type="text/javascript">
                var timer = null;

                function KeyUp()
                {
                    if (timer != null)
                    {
                      clearTimeout(timer);
                    }
                    timer = setTimeout(LoadTable,500);
                }

                function LoadTable()
                {
                     $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("StaffGrid");
                }
                </script>
            </telerik:RadCodeBlock>
    <div id="titleBar">Staff by Name</div>
               <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                           <ContentTemplate> 
                           Search:  <asp:TextBox ID="TextBox1" onkeyup="KeyUp();" runat="server"></asp:TextBox>
                               <telerik:RadGrid ID="StaffGrid" runat="server" PageSize="20" AllowPaging="True" 
                                   DataSourceID="sdsStaffView" GridLines="None" AutoGenerateColumns="False" AllowSorting="True">
                        <ClientSettings EnableRowHoverStyle="true">
                        </ClientSettings>
                        <MasterTableView  DataKeyNames="UserID">
                            <RowIndicatorColumn>
                                <HeaderStyle Width="20px" />
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn>
                                <HeaderStyle Width="20px" />
                            </ExpandCollapseColumn>
                            <Columns>
                                <telerik:GridBoundColumn DataField="UserID" DataType="System.Int64" HeaderText="UserID"
                                    ReadOnly="True" SortExpression="UserID" UniqueName="UserID" Visible="False">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="UserName" DataType="system.string" HeaderText="User"
                                    SortExpression="UserName" UniqueName="UserName">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Title" DataType="system.int32" HeaderText="Title"
                                    SortExpression="Title" UniqueName="Title">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Ext" DataType="system.datetime" HeaderText="Ext"
                                    SortExpression="Ext" UniqueName="Ext">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="CostCenter" DataType="system.datetime" HeaderText="Cost Center"
                                    SortExpression="CostCenter" UniqueName="CostCenter">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Office" DataType="system.datetime" HeaderText="Office"
                                    SortExpression="Office" UniqueName="Office">
                                </telerik:GridBoundColumn>
                            </Columns>
                        </MasterTableView>                    
                        <FilterMenu EnableTheming="True">
                            <CollapseAnimation Duration="200" Type="OutQuint" />
                        </FilterMenu>
                    </telerik:RadGrid>
                     <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server"
                                   OnAjaxUpdate="RadToolTipManager1_AjaxUpdate" Position="Center"
        Sticky="false" OffsetY="0" BackColor="#45473F" BorderColor="#45473F"
        BorderWidth="0px" EnableTheming="True">
                                                                                                                </telerik:RadToolTipManager>
                      <asp:repeater id="repeater1" runat="server" datasourceid="sdsStaffView" Visible="False">
            <itemtemplate>
                <div>
                     <asp:label id="lblName" runat="server"><%#Eval("UserID")%></asp:label>
                       </div>
            </itemtemplate>
        </asp:repeater>
                         <asp:SqlDataSource ID="sdsStaffView" runat="server"
                ConnectionString="<%$ ConnectionStrings:AppConnectionString %>"
                SelectCommand="proc_xUserProfileStaffByNameView"
                SelectCommandType="StoredProcedure" FilterExpression="UserName='{0}' ">
           <FilterParameters>
                    <asp:ControlParameter Name="Search" ControlId="TextBox1" PropertyName="Text"/>
                </FilterParameters>

                </asp:SqlDataSource>
                         </ContentTemplate> 
                       </asp:UpdatePanel>
                      <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
                       <telerik:AjaxSetting AjaxControlID="UpdatePanel1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="UpdatePanel1" LoadingPanelID="RadAjaxLoadingPanel1"/>
                </UpdatedControls>
                           <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="TextBox1" LoadingPanelID="RadAjaxLoadingPanel1"/>
                </UpdatedControls>
                         </telerik:AjaxSetting>
        </AjaxSettings>
         </telerik:RadAjaxManager>

 <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" Width="75px">
        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'
            style="border: 0px;" />
    </telerik:RadAjaxLoadingPanel>
                                                     </asp:Content>


ASPX.VB:
Imports System
Imports System.Collections
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Web
Imports System.Web.SessionState
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls
Imports Telerik.Web.UI
Imports System.Data.SqlClient
Imports System.IO

Partial Public Class Staff_Staff
    Inherits System.Web.UI.Page
    Dim count As Integer = 0

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            Me.RadToolTipManager1.TargetControls.Clear()
        End If
    End Sub
    Protected Sub RadToolTipManager1_AjaxUpdate(ByVal sender As Object, ByVal e As Telerik.Web.UI.ToolTipUpdateEventArgs) 'Handles RadToolTipManager1.AjaxUpdate
        Me.UpdateToolTip(e.Value, e.UpdatePanel)
    End Sub
    Sub UpdateToolTip(ByVal elementID As String, ByVal panel As UpdatePanel)
        Dim ctrl As Control = Page.LoadControl("~\UserControls\StaffProfile.ascx")
        panel.ContentTemplateContainer.Controls.Add(ctrl)
        Dim details As StaffProfile = DirectCast(ctrl, StaffProfile)
        details.UserID = CType(elementID, Integer)
    End Sub
    Protected Sub StaffGrid_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles StaffGrid.ItemDataBound
        If e.Item.ItemType = GridItemType.AlternatingItem OrElse e.Item.ItemType = GridItemType.Item Then
            Dim requestRowView As DataRowView = TryCast(e.Item.DataItem, DataRowView)
            If requestRowView IsNot Nothing Then
                Dim reqID As Integer = CInt(requestRowView("UserID"))
                Dim gridItem As GridDataItem = TryCast(e.Item, GridDataItem)
                Dim target As New ToolTipTargetControl(gridItem.ClientID, CType(reqID, String), True)
                RadToolTipManager1.TargetControls.Add(target)
            End If
        End If
    End Sub

Protected Sub StaffGrid_PageIndexChanged(ByVal source As Object, ByVal e As Telerik.Web.UI.GridPageChangedEventArgs) Handles StaffGrid.PageIndexChanged
        RadToolTipManager1.TargetControls.Clear()
    End Sub

   Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest
        If e.Argument.IndexOf("StaffGrid") <> -1 Then
            If Me.TextBox1.Text = "" Then
                StaffGrid.MasterTableView.FilterExpression = ""
            Else
                StaffGrid.MasterTableView.FilterExpression = Me.TextBox1.Text
            End If
            StaffGrid.DataBind()
        End If

    End Sub
avarndel
Top achievements
Rank 1
 answered on 11 Aug 2008
14 answers
255 views
Trying to modify the example 'Wizard ' of RadTabStrip I have a problem:

In the second tab one can upload one or more files.
In the third (last) tab a grid shows the uploaded files.
In the grid I  have a checkboxlist loaded with values form a database.

Here comes my problem: I want to update the preview each time someone selects a checkbox. In the codebehind I cannot find the ID of the checkboxlist, so I'm not able to use the 'SelectedIndexChanged' or 'OnCheckChanged'.
Has this something to do with putting the checkboxlist in an itemtemplate?

               <telerik:RadGrid ID="RadGrid2" runat="server" DataSourceID="dsFiles"   
                    GridLines="None" Skin="Office2007" AutoGenerateColumns="False"   
                    Width="750px">  
<MasterTableView datasourceid="dsFiles" CellPadding="0" CellSpacing="0">  
<Columns> 
<telerik:GridBoundColumn DataField="FileName" HeaderText="File" Sortexpression="FileName" ItemStyle-Width="200px">  
<ItemStyle Width="200px"></ItemStyle> 
    </telerik:GridBoundColumn> 
<telerik:GridTemplateColumn> 
<ItemTemplate> 
    <asp:CheckBoxList ID="chkTasks" runat="server"   
        DataTextField="SoortBewerking" DataValueField="BewerkingId"   
        DataSourceID="dsTasks" Width="550px" TextAlign="Right"   
        RepeatLayout="Table" OnSelectedIndexChanged="SelectedIndexChanged"   
        DataMember="DefaultView" ondatabinding="SelectedIndexChanged"   
        ontextchanged="SelectedIndexChanged">  
    </asp:CheckBoxList> 
</ItemTemplate> 
</telerik:GridTemplateColumn> 
 
</Columns> 

Kyle Parker
Top achievements
Rank 1
 answered on 11 Aug 2008
1 answer
169 views
I am trying to put the same column header names in the group headers of a RadGrid.  These columns should line up with the columns of the grid.  However, it appears that the Group header row is just a single cell.  I have been through countless examples, none of which provide this, what should be, simple functionality.
Clearly, the Group Footer has column cells, one for each column, so why can't this be done in the Group Header?  Also, would like to put a checkbox in each Group Column Header, to select/deselect based on column values.
Nikolay Rusev
Telerik team
 answered on 11 Aug 2008
3 answers
133 views
Hi,

I installed RadControls for ASP.NET AJAX Q2 2008. When I use the formdecorator, it makes the radiobuttons on the html table disappear, although the radiobuttons are out of the decoration zone.
My code is as follows:

<

tr>

<td colspan="2">

<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="Buttons" DecorationZoneID="buttonZone"

Skin="WebBlue" />

<div id="buttonZone">

<asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click"

Text="Save" />

</div>

</td>

</tr>

<tr>

<td colspan="2">

    <asp:RadioButton ID="RadioButton1" runat="server" Text="Test Test" /></td>

</tr>

Georgi Tunev
Telerik team
 answered on 11 Aug 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?