Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
130 views
I have  a Radcombobox with lots of items and if you open the items, they will hide behind the Radmenu on top of the page.
How can I fox this?
Kalina
Telerik team
 answered on 13 Jan 2010
6 answers
157 views
Hi;

I set a Grid using DataListView section where I found Telerik Demos Page. In this section I must handle items, (can be catch item ID like this client side). How can I do this ? I added markup code below.

MarkUp Code :

                     <telerik:RadGrid ID="rgLessonContent" runat="server" 
                            GridLines="None" AllowPaging="true" OnPreRender="rgLessonContent_PreRender" 
                            PageSize="9" OnNeedDataSource="rgLessonContent_NeedDataSource"  
                            ShowHeader="False"> 
                            <ClientSettings> 
                                <Selecting AllowRowSelect="True" /> 
                                <ClientEvents OnRowSelected="RowSelected" /> 
                            </ClientSettings> 
                            <PagerStyle Mode="NextPrevAndNumeric" /> 
                            <MasterTableView TableLayout="Fixed" > 
                                <ItemTemplate> 
                                    <%# (((GridItem)Container).ItemIndex != 0)? "</td></tr></table>" : "" %> 
                                    <asp:Panel ID="ItemContainer" CssClass='<%# (((GridItem)Container).ItemType == GridItemType.Item)? "item" : "alternatingItem" %>' 
                                        runat="server" Width="400px" Height="150px"> 
                                        <table width="100%" style="border-style:none"> 
                                            <tr> 
                                                <td style="width: 100px"> 
                                                    <asp:Image runat="server" ID="imgSlide" Width="100px" Height="100px" ImageUrl='<%# Eval("LessonContentSlideImage")%>' /> 
                                                </td> 
                                                <td> 
                                                    <table width="100%" style="border-style:none"> 
                                                        <tr> 
                                                            <td> 
                                                                <asp:Label ID="Label2" runat="server" Text="Lesson Name : " CssClass="itemBlueBoldLabel" /> 
                                                            </td> 
                                                            <td> 
                                                                <asp:Label ID="Label3" runat="server" Text='<%# Eval("LessonName")%>' CssClass="itemBlackLabel" /> 
                                                            </td> 
                                                        </tr> 
                                                        <tr> 
                                                            <td> 
                                                                <asp:Label ID="Label4" runat="server" Text="Content Name : " CssClass="itemBlueBoldLabel" /> 
                                                            </td> 
                                                            <td> 
                                                                <asp:Label ID="Label5" runat="server" Text='<%# Eval("Name")%>' CssClass="itemBlackLabel" /> 
                                                            </td> 
                                                        </tr> 
                                                        <tr> 
                                                            <td> 
                                                                <asp:Label ID="Label6" runat="server" Text="Passing Score : " CssClass="itemBlueBoldLabel" /> 
                                                            </td> 
                                                            <td> 
                                                                <asp:Label ID="Label7" runat="server" Text='<%# Eval("PassingScore")%>' CssClass="itemBlackLabel" /> 
                                                            </td> 
                                                        </tr> 
                                                        <tr> 
                                                            <td> 
                                                                <asp:Label ID="Label8" runat="server" Text="Maximum Score : " CssClass="itemBlueBoldLabel" /> 
                                                            </td> 
                                                            <td> 
                                                                <asp:Label ID="Label9" runat="server" Text='<%# Eval("MaxScore")%>' CssClass="itemBlackLabel" /> 
                                                            </td> 
                                                        </tr> 
                                                        <tr> 
                                                            <td> 
                                                                <asp:Label ID="Label10" runat="server" Text="Published : " CssClass="itemBlueBoldLabel" /> 
                                                            </td> 
                                                            <td> 
                                                                <asp:Label ID="Label11" runat="server" Text='<%# Eval("IsPublished")%>' CssClass="itemBlackLabel" /> 
                                                            </td> 
                                                        </tr> 
                                                    </table> 
                                                </td> 
                                            </tr> 
                                        </table> 
                                    </asp:Panel> 
                                </ItemTemplate> 
                            </MasterTableView> 
                            <GroupingSettings CaseSensitive="false" /> 
                        </telerik:RadGrid> 
Erturk
Top achievements
Rank 1
 answered on 13 Jan 2010
6 answers
228 views
Is there a way to drag drop from a Listbox to a Treeview or vis versa?  If so, do you guys have an example?  Thanks in advance.
Valeri Hristov
Telerik team
 answered on 13 Jan 2010
1 answer
100 views
Wierdness!
I have 1 RadComboBox in an HTML table cell, and 3 RadTextBoxes in an HTML table cell.  The combobox will (I hope) populate the 3 textboxes with areacode + prefix + number based on the selected index in the combobox.  There is more than enough horizontal real estate for these controls to exist inline in the 2 table cells. But...when I add this:

<AjaxSettings> 
    <telerik:AjaxSetting AjaxControlID="radComboBoxID">  
        <UpdatedControls> 
            <telerik:AjaxUpdatedControl ControlID="radTextBoxHomeAC" LoadingPanelID="RadLoadingPanel1"/>  
            <telerik:AjaxUpdatedControl ControlID="radTextBoxHomePrefix" LoadingPanelID="RadLoadingPanel1"/>  
            <telerik:AjaxUpdatedControl ControlID="radTextBoxHomeNum" LoadingPanelID="RadLoadingPanel1"/>  
        </UpdatedControls> 
    </telerik:AjaxSetting> 
</AjaxSettings> 

The 3 texboxes are stacked vertically on top of one another.  I remove the AjaxSettings, and they go horizontal again.

What's up with this?

Cheers!
Mark
Dimo
Telerik team
 answered on 13 Jan 2010
1 answer
115 views
Hi,

I am using the Editor to create html and add form elements to the html, more specifically Textboxes and TextAreas. Textboxes contain a value property which shows up in the properties pane at the bottom. In this area you can paste your own text.

A Textarea does not contain a value property, thus does not show up in the properties pane. In Internet Explorer the content of a TextArea can be changed by double clicking the TextArea and editing in-place. But when you try to paste, the textarea disappears and gets replaced by the pasted text

Is there a way to paste text into the value of a TextArea?

Kind regards,
Dries
Rumen
Telerik team
 answered on 13 Jan 2010
2 answers
135 views

Hi,

I don't understand if this is possible... I've search and read a lot in examples and forum but I don't found any.

My scenario is a DetailsView within some ComboBox in edit template...

...when I'm in edit mode I will be select the binded value in the Combobox
(like when appends with this code <telerik:RadComboBox ID="RadCmb1" runat="server" ... SelectedValue='<%# Bind("Value")) %>' > )
...but I my case I load the ComboBox data from a webservice, but there are not items while a text is write in combo and for this reason the binding operation throws a error.

I use webservice for performance because the items in combobox are very much...
...there is a way to select an item from value when binding DetailsView?

Thanks
New

Simon
Telerik team
 answered on 13 Jan 2010
3 answers
175 views
Why am I not able to do this with the stylesheetmanager?
    <telerik:RadStyleSheetManager ID="ssm" runat="server" EnableStyleSheetCombine="true"> 
        <StyleSheets> 
            <telerik:StyleSheetReference Path="~/Apps/RTO/styles/rto.css"  /> 
            <telerik:StyleSheetReference Path="~/Apps/RTO/styles/popup.css" /> 
        </StyleSheets> 
    </telerik:RadStyleSheetManager> 

T. Tsonev
Telerik team
 answered on 13 Jan 2010
2 answers
150 views

Folks,

 

Environment: RadControls for ASP.NET AJAX Q2 2009 SP1 with Visual Studio 2008 SP1.  I am using Northwind Employee Table as prototype for my RadGrid and Form template with just 5 columns ([EmployeeID], [LastName], [FirstName], [City], [Country]).

 

Currently, if DataField ‘Country’ is Null it updates the Datafield value to “USA”. However if it is not Null, it does not update the Datafield value to “USA”; keeps the edited value.

 

My intention: 

1)  For each rows, I would like to assign automatically
SqlDataSource1.UpdateParameters["Country"].DefaultValue = “USA"  (i.e. GridBoundColumn ‘Country’ value  be “USA”) after each RadGrid1_UpdateCommand whether it is null or has any existing values.

 

2) Can I change the GridBoundColumn ‘Country’ to read only so that user’s can’t make any changes to that column? But I should be to update it automatically as per #1.

 

Below is my codes. Thanks for any help.

 

GC_0620



_________
.ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 
 
<%@ 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></title>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
      
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">  
        </telerik:RadScriptManager> 
      
    </div> 
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"   
        ConnectionString="<%$ ConnectionStrings:NorthWindConnectionString %>"   
        DeleteCommand="DELETE FROM [Employees] WHERE [EmployeeID] = @EmployeeID"   
        InsertCommand="INSERT INTO [Employees] ([LastName], [FirstName], [City], [Country]) VALUES (@LastName, @FirstName, @City, @Country)"   
        SelectCommand="SELECT [EmployeeID], [LastName], [FirstName], [City], [Country] FROM [Employees] ORDER BY [LastName]"   
        UpdateCommand="UPDATE [Employees] SET [LastName] = @LastName, [FirstName] = @FirstName, [City] = @City, [Country] = @Country WHERE [EmployeeID] = @EmployeeID">  
        <DeleteParameters> 
            <asp:Parameter Name="EmployeeID" Type="Int32" /> 
        </DeleteParameters> 
        <UpdateParameters> 
            <asp:Parameter Name="LastName" Type="String" /> 
            <asp:Parameter Name="FirstName" Type="String" /> 
            <asp:Parameter Name="City" Type="String" /> 
            <asp:Parameter Name="Country" Type="String" /> 
            <asp:Parameter Name="EmployeeID" Type="Int32" /> 
        </UpdateParameters> 
        <InsertParameters> 
            <asp:Parameter Name="LastName" Type="String" /> 
            <asp:Parameter Name="FirstName" Type="String" /> 
            <asp:Parameter Name="City" Type="String" /> 
            <asp:Parameter Name="Country" Type="String" /> 
        </InsertParameters> 
    </asp:SqlDataSource> 
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True"   
        AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"   
        AllowAutomaticDeletes="True" AllowAutomaticInserts="True" 
            AllowAutomaticUpdates="True" 
        DataSourceID="SqlDataSource1" GridLines="None"   
        AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True"   
        onupdatecommand="RadGrid1_UpdateCommand" > 
<MasterTableView datakeynames="EmployeeID" CommandItemDisplay="TopAndBottom"  Name = "Master" datasourceid="SqlDataSource1">  
<RowIndicatorColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
    <Columns> 
        <telerik:GridBoundColumn DataField="EmployeeID" DataType="System.Int32"   
            HeaderText="EmployeeID" ReadOnly="True" SortExpression="EmployeeID"   
            UniqueName="EmployeeID">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="LastName" HeaderText="LastName"   
            SortExpression="LastName" UniqueName="LastName">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="FirstName" HeaderText="FirstName"   
            SortExpression="FirstName" UniqueName="FirstName">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="City" HeaderText="City"   
            SortExpression="City" UniqueName="City">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Country" HeaderText="Country"     
            SortExpression="Country" UniqueName="Country">  
        </telerik:GridBoundColumn> 
    </Columns> 
                    <EditFormSettings EditFormType="Template">  
                    <FormTemplate> 
                        <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none" 
                            style="border-collapse: collapse; background: white;">  
                             
                            <tr> 
                                <td> 
                                    <table id="Table4" cellspacing="1" cellpadding="1" width="250" border="0" class="module">  
                                        <tr> 
                                            <td> 
                                                FirstName:</td> 
                                            <td> 
                                                <asp:TextBox ID="TextBox2" Text='<%# Bind( "FirstName") %>' runat="server" > 
                                                </asp:TextBox></td>  
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                Last Name:</td> 
                                            <td> 
                                                <asp:TextBox ID="TextBox3" Text='<%# Bind( "LastName") %>' runat="server" > 
                                                </asp:TextBox></td>  
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                City:</td> 
                                            <td> 
                                                <asp:TextBox ID="Textbox5" Text='<%# Bind( "City") %>' runat="server">  
                                                </asp:TextBox></td>  
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                Country:</td> 
                                            <td> 
                                                <asp:TextBox ID="TextBox4" Text='<%# Bind( "Country") %>' runat="server" > 
                                                </asp:TextBox></td>  
                                        </tr> 
                                    </table> 
                                </td> 
                                <td> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td align="right" colspan="2">  
                                    <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' 
                                        runat="server"  CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>  
                                    </asp:Button>&nbsp;  
                                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" 
                                        CommandName="Cancel"></asp:Button></td>  
                            </tr> 
                        </table> 
                    </FormTemplate> 
                </EditFormSettings> 
 
</MasterTableView> 
        <ClientSettings> 
            <Selecting AllowRowSelect="True" /> 
        </ClientSettings> 
    </telerik:RadGrid> 
    </form> 
</body> 
</html> 
 

.Code Behind
using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using Telerik.Web.UI;  
 
 
public partial class _Default : System.Web.UI.Page  
{  
    protected void Page_Load(object sender, EventArgs e)  
    {  
 
    }  
    protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e)  
    {  
        if (e.Item is GridEditableItem && e.Item.IsInEditMode && e.Item.OwnerTableView.Name == "Master")  
        {  
            SqlDataSource1.UpdateParameters["Country"].DefaultValue = "USA";  
 
       }  
    }  
      
}  
 
Radoslav
Telerik team
 answered on 13 Jan 2010
5 answers
202 views
I have a RadMenu that has two top-level items, each with a transparent PNG image.  When the menu is loaded, I can see the menu's background color behind the transparent part of the PNG as expected.  However, when I hover over the menu and the menu's highlighted background color shows, the non-highlighted color is what is displayed behind the transparent part of the PNG.  Not only that, but this odd coloring is offest about 8px (1/2 the width of the PNG) to the right.

I've attached an image of what this looks like.

Obviously, this is ugly and isn't what I would consider "releasable" when we go to testing in a couple of days.  What can be done about this?

PS: For some reason, "Default", "Black", "Simple", "Telerik", and "Web20" all seem to not show this odd coloring.
Ryan
Top achievements
Rank 1
 answered on 13 Jan 2010
1 answer
98 views
Hi,
Is it possible to have a self-referencing hierarchy grid and bind the nested rows server side?

<telerik:RadGrid ID="radGridUnits" runat="server" AllowPaging="false" Width="100%" 
            AllowSorting="false" AutoGenerateColumns="false" GridLines="Both" CssClass="selfHierarchyTable"  
            oninsertcommand="radGridUnits_InsertCommand"  
            onupdatecommand="radGridUnits_UpdateCommand"  
            ondeletecommand="radGridUnits_DeleteCommand" 
            onitemdatabound="radGridUnits_ItemDataBound"  
            onneeddatasource="radGridUnits_NeedDataSource" 
            OnItemCreated="radGridUnits_ItemCreated" 
            OnColumnCreated="radGridUnits_ColumnCreated" 
            Skin="Default" onitemcommand="radGridUnits_ItemCommand"> 
             
            <mastertableview commanditemdisplay="Top" datakeynames="ID, ParentID"  
                HierarchyLoadMode="ServerOnDemand"   
                editmode="EditForms" name="Master" Width="100%"  
                nomasterrecordstext="<%$ Resources:resources,Msg_NoUnits %>"  
                tablelayout="Fixed"> 
                <SelfHierarchySettings ParentKeyName="ParentID" KeyName="ID" /> 
                <commanditemsettings addnewrecordtext="<%$ Resources:resources,Grid_AddUnit %>" refreshtext="<%$ Resources:resources,Grid_Refresh %>" /> 
                <Columns> 
                    <telerik:GridTemplateColumn UniqueName="Name2" HeaderText="<%$ Resources:resources,Label_Name %>"> 
                        <ItemTemplate> 
                            <asp:Button ID="MyExpandCollapseButton" runat="server" CommandName="ExpandCollapse" OnClick="button_Click"></asp:Button> 
                            <asp:Label ID="labelName" runat="server" Text='<%# Eval("Name") %>'></asp:Label> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 

I was guessing that I should use ItemCommand event and check for ExpandCollapse argument but I cant figure out how to add the table structure to the grid then.
Maybe it's not exactly an self referencing grid I'm after, the important thing is to bind every level server side because it's a lot of levels and total number of rows.
 
Is this possible?

Regards,
Mattias

Tsvetoslav
Telerik team
 answered on 13 Jan 2010
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?