Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
109 views
Hello All:
I have a context-menu on a grid.  I have a non data-key (the 'lblStatus'), that I would like to cancel or continue the context menu.  So during the standard 'RowContextMenu' javascript function, I need to a reference to 'lblStatus'.  I believe that the following gets the data grid row.
var dataItem = Sender.get_masterTableView().get_dataItems()[index]; 

How do i obtain a reference to the status value?
Thanks.
Phil
Princy
Top achievements
Rank 2
 answered on 24 Mar 2010
1 answer
152 views
Hi there,

I am using telerik:RadEditor in my page, in which i have facilitate with
<telerik:EditorTool Name="imagemanager" Enabled="true" /> 
. By using image manager i can able to upload the image, and it's displaying in the page perfectely, while trying to send to mail id, in the mail it's showing empty space instead of what image i have send. But text format is displaying correctly.

Can anybody help me on this.
Regards,
Vimal Kumar Srivastava
Madhepura, Bihar
Rumen
Telerik team
 answered on 24 Mar 2010
5 answers
202 views
I have a rad tab and in each tab has some radeditors inside. I've set each radeditor to be autoresizeheight = true.

When I go to print the webpage, I have it set with css so that all the tabs print (set div's to display). However say I don't select a tab before I print, the tabs that I don't select will print the editors with scrollbars. The tabs that I have chosen will print with their heights set properly.

Is there anything I can do to force the autoresizeheight to run even if the editors are hidden?

Thanks

-Matt
Dobromir
Telerik team
 answered on 24 Mar 2010
4 answers
163 views
Hello,

I have a problem with the click around empty message in the RadListBox.

When i do click around empty message, the control throw an exception.

How i can disable the event selectedIndexChanged when there are not elements in
the RadListBox?

This is the error when i click on RadListBox (Empty):

Microsoft JScript runtime error: 'undefined' is null or not an object

The error is occurred at second line:
 
this._activeItem=e; 
d(e.get_element()).addClass("rlbActive"); 
e.ensureVisible(); 

Code:

                                <telerik:RadListBox ID="mailToSend" runat="server"  
                                     EmptyMessage="Emailsssssss" Height="150px" Width="200px" 
                                     SelectionMode="Multiple" AllowTransfer="True" TransferToID="mailToRemove"  
                                     AutoPostBackOnTransfer="True" AllowReorder="True" AutoPostBackOnReorder="True" 
                                     EnableDragAndDrop="True" Visible="false"> 
                                     <EmptyMessageTemplate> 
                                         Emailsssssss 
                                     </EmptyMessageTemplate> 
                                 </telerik:RadListBox> 
Schlurk
Top achievements
Rank 2
 answered on 24 Mar 2010
1 answer
129 views
Hi,

After a very long struggle, I managed to get buttons on my grid group headers. (Still there is an issue with it, like a postback making the controls to  vanish - Anyway, I'll look into it later) As of now, I've added buttons to the group header items and also I have defined an event-handler for the button click event.

Please see my code below for the radgrid_ItemDataBound event

if

 

(e.Item is GridGroupHeaderItem)

 

{

     

           Button

 

btnModifyStrategy = new Button();

 

           btnModifyStrategy.Text =

"Modify Strategy";

 

           btnModifyStrategy.CssClass =

"tab4-sub1btn";

 

 

            //btnModifyStrategy.UseSubmitBehavior = false;

 

           btnModifyStrategy.Click +=

new EventHandler(btnModifyStrategy_Click);

 

          groupheader.DataCell.Controls.Add(btnModifyStrategy);

}


The button is added to the group header now. But when I click on the button, the button click event is not fired. Its driving me too crazy as I've been into this problem since this morning.

Can you advise me on this?

Thanks in advance.

Sangeetha


Princy
Top achievements
Rank 2
 answered on 24 Mar 2010
10 answers
831 views
I have a RadGrid on my page, with a button in the CommandItemTemplate.  I want to execute a client function to determine if I need to postback to do some work to do something else on the client side.  When I do this, the button no longer causes a postback.  It will not postback even if I simplet do OnClientClick="return true;".  Is there a way to work around this.  Here is some sample code.

ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GridTest._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>Untitled Page</title> 
    <script language="javascript" type="text/javascript">  
        function onBtnClick()  
        {  
            return true;  
        }  
    </script> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <telerik:RadScriptManager runat="server">  
    </telerik:RadScriptManager> 
       <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadGrid1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="lbl" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <div> 
    <asp:Label ID="lbl" runat="server"></asp:Label> 
        <telerik:RadGrid ID="RadGrid1" Skin="WebBlue" Width="500" runat="server" GridLines="None"   
            onitemcommand="RadGrid1_ItemCommand">  
          
<MasterTableView CommandItemDisplay="Top">  
    <CommandItemTemplate> 
        <asp:Button ID="btnCmd" CommandName="ShowTime" OnClientClick="return onBtnClick();" runat="server" Text="Do Something" /> 
    </CommandItemTemplate> 
<RowIndicatorColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
</MasterTableView> 
          
        </telerik:RadGrid> 
      
    </div> 
   
    </form> 
</body> 
</html> 

Here is the c# code behind:
using System;  
using System.Collections;  
using System.Collections.Generic;  
using System.Configuration;  
using System.Data;  
using System.Linq;  
using System.Web;  
using System.Web.Security;  
using System.Web.UI;  
using System.Web.UI.HtmlControls;  
using System.Web.UI.WebControls;  
using System.Web.UI.WebControls.WebParts;  
using System.Xml.Linq;  
 
namespace GridTest  
{  
    public partial class _Default : System.Web.UI.Page  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            if (!IsPostBack)  
            {  
                List<Sample> sampleList = new List<Sample>();  
                for (int x = 0; x < 15; x++)  
                {  
                    Sample s = new Sample();  
                    s.Name = String.Format("Name {0}", x);  
                    s.Description = String.Format("Description for item {0}", x);  
                    sampleList.Add(s);  
                }  
 
                RadGrid1.DataSource = sampleList;  
                RadGrid1.DataBind();  
            }  
        }  
 
        protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)  
        {  
            if (e.CommandName == "ShowTime")  
            {  
                lbl.Text = String.Format("Processed at {0}.", DateTime.Now.ToLongTimeString());  
            }  
        }  
    }  
 
    public class Sample  
    {  
        public string Name { get; set; }  
        public string Description { get; set; }  
    }  
}  
 

Thanks,
Doug
kachy
Top achievements
Rank 1
 answered on 24 Mar 2010
1 answer
106 views
Hi

I just replicate some of the editor built-in functions to my top toolbar, most of them works fine. e.g. Bold, HR, but I cannot make "InsertSymbol","InsertTable", "StripAll" work.  If I use "editor.fire("StripAll")" I will receive "undefine xxxxxxx" error.

Dobromir
Telerik team
 answered on 24 Mar 2010
1 answer
115 views
I have a button on a page and an xmlhttppanel that encloses an asp:Literal. Users click the button and a webservice is invoked that returns 3 comboboxes and another button into the Literal.

My intention is that the users may select items in the comboboxes, click the button, the webservice is invoked again and I am able to inspect any of the controls within the form of the page within the webservice. I want to repeat this several times, each time returning a different combination of comboboxes, radiobuttons and other html elements.  

My motivation is I do not want to post the entire page back, I want to update the Literal only. Because my html will change each time, its difficult to write a single javascript function to collect all values of html controls on the page and submit them to the web service.

Is there a way to access the page form from the webservice using xmlhttppanel? If not, is there a better approach?
Pero
Telerik team
 answered on 24 Mar 2010
3 answers
190 views
I have two grids which have the same amount of rows, but the heights of the rows are not the same.  Is it possible to loop through both tables and set the row height in each table to the same amount?  The first table is going to have a dynamic row height, and I would like the second table to have the same row heights as the first table.  Is this possible?

Thanks!
Yavor
Telerik team
 answered on 24 Mar 2010
4 answers
160 views
Hi,
we have 2008.03.1314.35 version of control where we found a peculiar problem, when we select the item from drop-down and click out side the combo box then it reset it's text by old text.

    <telerik:RadComboBox ID="RadComboBox1" runat="server"  Skin="Office2007"  EnableLoadOnDemand="false" AutoPostBack="false" MarkFirstMatch="true" Height="100px" OnClientSelectedIndexChanged="OnClientSelectedIndexChanged">
    </telerik:RadComboBox>
     
regards,
Sanjeev
Sanjeev
Top achievements
Rank 1
 answered on 24 Mar 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?