Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
77 views
Hi all,
  I want to store the ID of each row which can be retrieved on the client side. At the same time, it is not shown to  the user. How to implement this?
Thanks in advance.
Shinu
Top achievements
Rank 2
 answered on 07 Mar 2012
1 answer
104 views
Hi,

I want to search within the treeview by code or name.On searching with a value i want to expand the parent nodes of the child node which i am searching for and make it selected.

Help me
Thnx in advance
Remya
Top achievements
Rank 1
 answered on 07 Mar 2012
3 answers
122 views

Hi Friends,

 We are developing a project in N tier architecture. In Presentation Layer I have written for aspx page and how to add/edit in this gridview.

<telerik:RadGrid ID="RadGridview1" runat="server" AllowPaging="false" AutoGenerateColumns="False" PageSize="10" Width="100%" Height="100%"  
    
onpageindexchanged="RadGridview1_PageIndexChanged"
   
   
<MasterTableView ClientDataKeyNames="ID" DataKeyNames="ID" CommandItemDisplay ="Top"  EditMode="EditForms"
   
 <RowIndicatorColumn Visible="true"></RowIndicatorColumn
   
 <EditFormSettings EditFormType="Template"
   
 <FormTemplate
   
 <table width="100%"
   
<tr
   
<td
   
<asp:Label ID="lbl_etHeading" runat="server" Text="Add New Component Category" ></asp:Label
   
</td
   
</tr
   
   
<tr
   
<td width="30%"
   
<asp:Label ID="radlblUserName" runat="server" Text="UserName"></asp:Label
   
</td
   
<td width="40%"
   
<telerik:RadTextBox ID="radtxtUserName" runat="server" width="250px" 
   
Text='<%#Bind("UserName")%>' SelectionOnFocus="CaretToEnd" MaxLength="50"> 
   
</telerik:RadTextBox
   
</td
   
<td width="30%"
   
</td
   
</tr
   
   
<tr
   
<td width="30%"
   
<asp:Label ID="radlblFirstName" runat="server" Text="FirstName" Visible="true"></asp:Label
   
</td
   
   
<td width="40%"
   
<telerik:RadTextBox ID="radtxtFirstName" runat="server" width="250px" 
   
Text='<%#Bind("FirstName")%>' SelectionOnFocus="CaretToEnd" MaxLength="100" TextMode="MultiLine"> 
   
</telerik:RadTextBox
   
</td
   
<td width="30%"></td
   
</tr
   
   
   
   
<tr
   
<td
   
<asp:Button ID="Insert" runat="server" CommandName="PerformInsert" Text="Insert" /> 
   
<asp:Button ID="Update" runat="server" CommandName="Update" Text="Update" /> 
   
<asp:Button ID="Cancel" runat="server" CommandName="Cancel" Text="Cancel" /> 
   
</td
   
</tr
   
</table
   
</FormTemplate
   
</EditFormSettings
   
   
   
   
<Columns
   
<telerik:GridTemplateColumn HeaderText="#"
   
<ItemTemplate
   
<asp:Label ID="numberLabel" runat="server" Width="30px"></asp:Label
   
</ItemTemplate
   
<HeaderStyle Width="30px" /> 
   
</telerik:GridTemplateColumn
   
<telerik:GridTemplateColumn HeaderText="UserName" UniqueName="UserName"
   
<ItemTemplate
   
<asp:LinkButton ID="lnkbtn_Edit" runat="server" CommandName="Edit" Text='<%#Eval("UserName") %>'></asp:LinkButton
   
</ItemTemplate
   
</telerik:GridTemplateColumn
   
<telerik:gridboundcolumn HeaderText="FirstName" DataField="FirstName" UniqueName="FirstName"></telerik:gridboundcolumn
   
</Columns
   
   
   
   
<CommandItemTemplate
   
<asp:LinkButton ID="lnkbtn_AddNew" runat="server" CommandName="InitInsert" Text="Add New Component Category"></asp:LinkButton
   
</CommandItemTemplate
   
   
   
</MasterTableView
   
</telerik:RadGrid>


Any idea about in aspx.cs page that means which event or methods, i have to use.

I used RadGridview1_InsertCommand event to add/edit values but i cant pass textbox value to business entity.

 


 

Thanks in Advance..!



Susi
Top achievements
Rank 1
 answered on 07 Mar 2012
1 answer
118 views
Hi Team,

I want to show rotating image when expanding treeview node. I dont know is there any property for rotating image. I am using a property LoadingMessage="Loading..." and its showing fine whenever expanding a particular node but i want to display rotating image instead of loading message.

Here is my code:

<telerik:RadTreeView ID="RadTreeView" runat="server" OnNodeExpand="RadTree_OnNodeExpand" 
 Skin="HCPro" EnableEmbeddedSkins="false" Width="245px" OnNodeClick="RadTree_OnNodeClick" LoadingStatusPosition="BeforeNodeText" Style="white-space: normal" SingleExpandPath="true" LoadingMessage="Loading...">
 <DataBindings>
 <telerik:RadTreeNodeBinding ExpandMode="ServerSideCallBack" />
 </DataBindings>
</telerik:RadTreeView>

Thanks,
Arunshyam. S
Princy
Top achievements
Rank 2
 answered on 07 Mar 2012
5 answers
238 views
I have a RadPanelBar that I am trying to display with the following conditions:
    The first RadPanelItem needs to have a fixed height and a scrollbar when the content of the item exceeds the fixed height.
    The second RadPanelItem needs to have one of its sub items replaced with a RadMenu that pops out to the side.

Using the information I have found on the this web site, I have created a sample web site (which I am not able to attach). The problem is that I have only been able to meet one goal at a time. In order to have the menu appear correctly, it is necessary to uncomment the <style> tag in the .aspx document so that the css statement "overflow: visible !important;" is applied to the content. However, when I do this, the content of the first RadPanelItem then overflows and overwrites the content of following RadPanelItems. Is there any way to have the content of the first RadPanelItem either ignore the overflow command or, failing that, override it?

I am using the latest Telerik release.

Since I am not able to attach my sample web site, I will paste some relevant fragments:
WebForm1.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApp.WebForm1" %>
 
<%@ 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">
<head runat="server">
    <title></title>
<%--    <style type="text/css">
        .RadPanelBar, .RadPanelBar .rpSlide, .RadPanelBar .rpGroup, .RadPanelBar .rpItem        /*, .RadPanelBar .rpTemplate*/
        {
            overflow: visible !important;
        }
      div.RadPanelBar .rpLevel1 .rpItem
      {
         padding:0;
      }
         
      * html .RadPanelBar .RadMenu ul.rmRootGroup
      {
         zoom: 1;
      }
         
      div.RadMenu .rmRootGroup
      {
         border: 0;
      }
         
      div.RadMenu .rmLink
      {
         float: none;
      }
        .NoOverflow, .NoOverflow .RadPanelBar, .NoOverflow .rpLevel1, .NoOverflow .rpExpanded, .NoOverflow .rpGroup, .NoOverflow .rpItem        /*, .RadPanelBar .rpTemplate*/
        {
            overflow: scroll !important;
        }
    </style>--%>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadPanelBar runat="server" ID="RadPanelBar1" Height="400px" Width="30%"
            ExpandMode="MultipleExpandedItems">
            <Items>
                <telerik:RadPanelItem Text="<strong>Project Summary</strong>" Value="SummaryItem"
                    ChildGroupCssClass="NoOverflow" ChildGroupHeight="164px" Expanded="true">
                    <Items>
                        <telerik:RadPanelItem Text="" Value="ProjectSummary" Height="40px" Expanded="true" CssClass="myCssClass" />
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="<strong>Actions</strong>" Value="ProjectItem" Expanded="true">
                    <Items>
                        <telerik:RadPanelItem Value="AdvanceProject" runat="server" />
                        <telerik:RadPanelItem Text="Edit Project Settings" Value="EditProject" ToolTip="Edit the project settings" />
                        <telerik:RadPanelItem Text="Edit Assumptions" Value="EditSolution" ToolTip="Edit the assumptions and rerun the current solution" />
                        <telerik:RadPanelItem Text="View Solution" Value="ViewSolution" ToolTip="View the current solution" />
                        <telerik:RadPanelItem Text="Archive This Solution" Value="ArchiveSolution" ToolTip="Save this solution in its current state">
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="<strong>Archive</strong>" Value="SolutionList">
                    <Items>
                        <telerik:RadPanelItem Text="Archived Solutions" Value="EditLog" />
                        <telerik:RadPanelItem Text="Select Archived Solution" Value="LoggedSolutions" />
                    </Items>
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelBar>
    </div>
    </form>
</body>
</html>

and WebForm1.aspx.cs
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;
 
namespace WebApp
    {
    public class AdvanceMenuItem
        {
        public int? Id { get; set; }
        public string Name { get; set; }
        public string Value { get; set; }
        public int? parentId { get; set; }
        }
 
    public partial class WebForm1 : System.Web.UI.Page
        {
        protected void Page_Load( object sender, EventArgs e )
            {
            RadPanelItem summaryItem = RadPanelBar1.FindItemByValue( "ProjectSummary" );
            if ( summaryItem != null )
                {
                Table t = new Table() { CellPadding = 0, CellSpacing = 0, Width = new Unit( 98, UnitType.Percentage ), Height = summaryItem.Height };
                int count = 0;
                TableRow r = new TableRow();
                TableCell c = new TableCell() { CssClass = "PanelCellHeader", Width = new Unit( 40, UnitType.Percentage ) };
                c.Controls.Add( new Label() { Text = "", ID = "Label" + count.ToString() } );
                r.Cells.Add( c );
                t.Rows.Add( r );
                count++;
 
                for ( int i = 1; i < 10; i++ )
                    {
                    r = new TableRow();
                    c = new TableCell() { CssClass = "PanelCell" };
                    c.Controls.Add( new Label() { Text = "Item " + i.ToString(), ID = "Label" + i.ToString() } );
                    r.Cells.Add( c );
 
                    c = new TableCell() { CssClass = "PanelCell" };
                    c.Controls.Add( new Label() { Text = "Value " + i.ToString(), ID = "Value" + i.ToString() } );
                    r.Cells.Add( c );
                    t.Rows.Add( r );
                    }
                summaryItem.Controls.Add( t );
                }
 
            RadPanelItem advanceItem = RadPanelBar1.FindItemByValue( "AdvanceProject" );        // zzzASC - perhaps this should be something besides 'advance'
            if ( advanceItem != null )
                {
                List<AdvanceMenuItem> items = new List<AdvanceMenuItem>();
                items.Add( new AdvanceMenuItem() { Id = 1, parentId = null, Name = "Advance Project" } );
                items.Add( new AdvanceMenuItem() { Id = 2, parentId = 1, Name = "User Solution" } );
                items.Add( new AdvanceMenuItem() { Id = 3, parentId = 1, Name = "Balanced Solution" } );
                RadMenu rMenu = new RadMenu() { Flow = ItemFlow.Vertical, DataFieldID = "Id", DataFieldParentID = "parentId", DataTextField = "Name", Width = Unit.Percentage( 100 ) }; //
                rMenu.DataSource = items;
                rMenu.DataBind();
                foreach ( RadMenuItem menuItem in rMenu.GetAllItems() )
                    {
                    menuItem.Width = Unit.Percentage( 100 );
                    }
 
                advanceItem.Text = "";
                advanceItem.Expanded = true;
                advanceItem.Controls.Add( rMenu );
                }
            }
        }
    }

Thanks in advance,
Andy Canham
P
Top achievements
Rank 1
 answered on 06 Mar 2012
5 answers
73 views
I need to be able to set the localization elements for the 'Past from Word' dialog in the RadEditor.  I've tried customizing the dialog and adding a code behind to retrieve the localization values but I get a runtime error saying the code behind class type can not be found.  I've also tried accessing our localization framework directly in the MozillaPasteHtmlDialog.ascx file but it appears that no script block code will actually run.  I'm assuming this has something to do with how the Telerik.Web.UI.DialogHandler.aspx handler works.
 
I assume there is a way to set these values (specifically UseControlVMessage, Paste, and Cancel) from code while setting up the RadEditor as you would the MainStrings and ToolsStrings but I can not find a way to do that after much searching through the documentation and online.

I'm using version 2009.2.701.35 and can not upgrade to a newer version so I need a solution that works in that version.  Any assistance would be greatly appreciated.
Kyle Finley
Top achievements
Rank 1
 answered on 06 Mar 2012
0 answers
35 views
Thought I would save others a bit of grief after solving a problem.  Symptoms:  page with RadMultiPage views with a RadGrid not on the default view.  All works great on FF, Safari, Chrome. 

On IE 9 in standard and compatibility mode get a javascript error regarding "unable to get value of the property 'Cols': object is  null..."

After doing some digging, it turned out that though the page view with the RadGrid wasn't being displayed until a button was pressed which also initialized a session variable with the grid data, the RadGrid's NeedsData function was firing and the DataSource was being set to nothing.  It went from:

rgdData.DataSource = Session("GridData")

to:

Dim dv As DataView = Nothing
Try
     dv = Session("GridData")
Catch ex As Exception
     dv = Nothing
End Try
If Not dv Is Nothing Then rgdData.DataSource = dv

The IE error went away!
Ken
Top achievements
Rank 1
 asked on 06 Mar 2012
3 answers
119 views
Hello :)

I have a rad grid, some rows are erad only, and I don't want them to be changed during automatic update

how can I keep the value as it is ?

I tried to put these columns as read only, but after updating, the value is returned to NULL

any help please ?!
Casey
Top achievements
Rank 1
 answered on 06 Mar 2012
2 answers
116 views
I have an asyncupload control on a form. When the user submits the form, I validate the other form fields server-side and return a message to the user if one or more fields fails that validation. If all of the fields pass, the postback uploads the file as intended. However, if I fail the validation, the asyncupload control file list is cleared. Is there a way to retain the clientside list so the user doesn't have to re-upload the file if I fail the validation? Here is the code that I used for the upload:

protected void upAttachment_FileUploaded(object sender, FileUploadedEventArgs e)
{
    if (MessageSent)
    {
        byte[] buffer = new byte[e.File.ContentLength];
        using (Stream stream = e.File.InputStream)
        {
            stream.Read(buffer, 0, e.File.ContentLength);
 
            using (BinaryWriter bWriter = new BinaryWriter(File.Open(UploadDir + "\\" + e.File.FileName, FileMode.Create)))
            {
                bWriter.Write(buffer);
            }
        }
    }
}
Maxi
Top achievements
Rank 1
 answered on 06 Mar 2012
1 answer
123 views
Hi.
I added telerik radmenu on my website project and i want to build Radmenu.
when i go on radmenu smart tag and select "Build Radmenu" i see this error : "exception has been thrown by the target of an invocation"
But in the Source page i  writing this codes(for example):



<telerik:RadMenu ID="RadMenu1" Runat="server"
        EnableTheming="True" style="top: 0px; left: 0px"
        onitemclick="RadMenu1_ItemClick">
       <Items>
                <telerik:RadMenuItem Text="Products" Value="1" ExpandMode="WebService">
 
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Text="Purchase" Value="132" ExpandMode="WebService">
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Text="Support" Value="141" ExpandMode="WebService">
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Text="Community" Value="155" ExpandMode="WebService">
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Text="Corporate" Value="164" ExpandMode="WebService">
                </telerik:RadMenuItem>
            </Items>
    </telerik:RadMenu>
----------------------------------------------------------------------------------------------------------------------------------------------
after this codes when i go back on Design page i see Radmenu items Builded . but i dont want to write the codes, i want when i select
Build Radmenu on smart tag , show me the window item collection to build items and childitems. as like Getting started menu on help radmenu.
so please help me , is it a bug or something like this ? or the problem is my Visual studio ?
Mr.siLeNt
Top achievements
Rank 1
 answered on 06 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?