Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
276 views
Hello,

I am using a RadGrid with clientside binding to a WCF service and it is not deselecting previously selected rows as the page changes.  I have written script to keep track of selected rows in JavaScript, but when changing pages, it keeps the row selected.  For example if I select row 3, and switch to the next page, the new row 3 is still selected.

What is the event that fires after data is bound on the client side.  I assume I can write a script to iterate over the grid's data and select and unselect rows.

Here is the code I have so far:
var selected = {};
        function RadGrid1_RowSelected(sender, args) {
            var ResourceKey = args.getDataKeyValue("resourceKey");
            if (!selected[ResourceKey]) {
                selected[ResourceKey] = true;
            }
            updateSelected();
        }
        function RadGrid1_RowDeselected(sender, args) {
            var ResourceKey = args.getDataKeyValue("resourceKey");
            if (selected[ResourceKey]) {
                selected[ResourceKey] = null;
            }
            updateSelected();
        }

Regards,
Josh
Joshua Owen
Top achievements
Rank 1
 answered on 02 Oct 2009
5 answers
342 views
Hi guys.
Im currently trying to fill a grid using webservice call.
The thing is a need to send an extra parameter to the webservice aside from the filters allowed by the grid.
Is there anyway of doing this?
Cheers

Radovan Radic
Top achievements
Rank 1
 answered on 02 Oct 2009
1 answer
119 views
Hey, I'm sure this is a simple task, but I'm having a difficult time getting this to work.

The custom control will eventually be more complex.  I'm just trying to JAX the control before I begin really building it out.  However, I can't get the controlled JAX'ed nor the Loading Panel working.

All I want in the below sample is a .NET panel control with a label and button.  When the button is clicked, I put the thread to sleep for 2 seconds.  I want the click to be asyncronous and display a loading panel across the entire .NET panel.

Here's what I've got:

using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Text;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using Telerik.Web.UI;  
 
namespace Elevate.UI.WebControls  
{  
    [ToolboxData("<{0}:SearchAjax runat=server></{0}:SearchAjax>")]  
    public class SearchAjax : Control, INamingContainer  
    {
        #region private properties  
          
        private Unit _width;
        #endregion  
 
        #region public accessors  
          
        public Unit Width  
        {  
            set { _width = value; }  
        }
        
        #endregion  
 
        protected override void OnInit(EventArgs e)  
        {  
            base.OnInit(e);  
            RadScriptManager scriptManager = new RadScriptManager();  
 
              
            Controls.Add(scriptManager);  
        }  
 
        protected override void CreateChildControls()  
        {  
 
            RadAjaxManager radAjaxManager = new RadAjaxManager();  
            AjaxSetting ajaxSetting = new AjaxSetting();  
            ajaxSetting.AjaxControlID = "button1";  
 
            AjaxUpdatedControl ajaxUpdatedControl = new AjaxUpdatedControl();  
            ajaxUpdatedControl.ControlID = "simplePanel";  
            ajaxUpdatedControl.LoadingPanelID = "ajaxLoadingPanel";  
 
            ajaxSetting.UpdatedControls.Add(ajaxUpdatedControl);  
            radAjaxManager.AjaxSettings.Add(ajaxSetting);  
 
            Controls.Add(radAjaxManager);  
 
            RadAjaxLoadingPanel radAjaxLoadingPanel = new RadAjaxLoadingPanel();  
            radAjaxLoadingPanel.ID = "ajaxLoadingPanel";  
            Controls.Add(radAjaxLoadingPanel);  
 
            Panel simplePanel = new Panel();  
            simplePanel.ID = "simplePanel";  
            simplePanel.Width = _width;  
            simplePanel.Attributes.Add("style", "padding:50px;height:300px;");  
 
            Label lblTest1 = new Label();  
            lblTest1.Text = "Panel 1";  
            simplePanel.Controls.Add(lblTest1);  
 
            simplePanel.Controls.Add(new LiteralControl("<br /><br />"));  
 
            Button button1 = new Button();  
            button1.ID = "button1";  
            button1.Text = "Press Me";  
            button1.Click += new EventHandler(button1_Click);  
            simplePanel.Controls.Add(button1);  
 
            Controls.Add(simplePanel);  
 
 
        }  
 
        void button1_Click(object sender, EventArgs e)  
        {  
            System.Threading.Thread.Sleep(2000);  
        }  
    }  
 
}  
 
Thanks,
Joshua
Joshua
Top achievements
Rank 1
 answered on 02 Oct 2009
2 answers
83 views
I am not quite sure that if I want to host a web site in my own server (without telerik software installed): will it be able to display correctly?
I developed on my laptop which currently have telerik software installed.  I want to deploy my web now; however, it give me a error missing telerik namespace when try to view it. 

How would I solve this problem?  Is there any solution to fix this that you can link me or advice me?

Thanks
Urt
Top achievements
Rank 1
 answered on 02 Oct 2009
1 answer
151 views
Is there a way I can show one context menu for a radtreeview node that has child nodes and another context menu on nodes that have no child nodes?

I am pretty sure this will have to be done in Java and I am not a Jscript wizard.

I have tried :

<

 

telerik:RadTreeView ID="RadTreeView1" Runat="server" Skin="Office2007" OnContextMenuItemClick="RadTreeView1_ContextMenuItemClick" >

 

 

<ContextMenus>

 

 

<telerik:RadTreeViewContextMenu Skin="Office2007" ID="MainContextMenu" runat="server" >

 

 

<Items>

 

 

<telerik:RadMenuItem Value="Expand" Text="Expand Descendants"></telerik:RadMenuItem>

 

 

<telerik:RadMenuItem Value="Collapse" Text="Collapse"></telerik:RadMenuItem>

 

 

</Items>

 

 

</telerik:RadTreeViewContextMenu>

 

 

 

</ContextMenus>

 

 

</telerik:RadTreeView>

 


and then on the treeview node bound event I am setting the contextmenuid per node.  This unfortunately has no effect and all nodes get this menu.

Any help would be appreciated.


Thanks,


Si


it-workz
Top achievements
Rank 1
 answered on 02 Oct 2009
1 answer
138 views
i want to check the cell value and then set the background color of that row to a certain color.
this is what i got
 If e.Item.ToString <> "Telerik.Web.UI.GridEditFormItem" And e.Item.ToString <> "Telerik.Web.UI.GridPagerItem" And e.Item.ToString <> "Telerik.Web.UI.GridHeaderItem" And e.Item.ToString <> "Telerik.Web.UI.GridFooterItem" And e.Item.ToString <> "Telerik.Web.UI.GridFilteringItem" Then  
            Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)  
            Select Case tmp_comp_report_ID  
                Case 5  
                    If e.Item.Cells(3).Text = "&nbsp;" Then  
                        e.Item.BackColor = System.Drawing.Color.Aqua  
                    Else  
                        e.Item.HorizontalAlign = HorizontalAlign.Right  
                    End If  
                Case 6  
                    If e.Item.Cells(3).Text <> "&nbsp;" And e.Item.Cells(4).Text = "&nbsp;" Then  
                        e.Item.BackColor = System.Drawing.Color.Aqua  
                    Else  
                        e.Item.HorizontalAlign = HorizontalAlign.Right  
                    End If  
            End Select  
        End If 
which works fine on the firt time. But after i use a drop down to change the data, it has the Telerik.Web.UI.GridPagerItem so i can't do anything else with it.
my declaration for grid is this
<telerik:RadGrid AutoGenerateColumns="true" ID="RadGrid1" Visible="false" MasterTableView-EnableNoRecordsTemplate="true" 
                            AllowSorting="True" GridLines="both" Skin="Telerik" 
                            PageSize="100" ShowStatusBar="true" AllowPaging="True" 
                            runat="server" OnExcelMLExportStylesCreated="RadGrid1_ExcelMLExportStylesCreated" 
                            OnExcelMLExportRowCreated="RadGrid1_ExcelMLExportRowCreated">  
                        <PagerStyle Mode="NextPrevAndNumeric" /> 
                        <ClientSettings EnableRowHoverStyle="true">  
                            <Selecting AllowRowSelect="True"  /> 
                        </ClientSettings> 
                        <MasterTableView Summary="testing" ></MasterTableView>  
                    </telerik:RadGrid> 
and datasource is this. assume i got result in sqldatareader
dt is datatable

dt.Load(rs)

RadGrid1.DataSource = dt

please help if you have anything. thanks alot

appdev
Top achievements
Rank 1
 answered on 02 Oct 2009
3 answers
155 views
Hi,

The right side button of rotator is not at proper place. It seems inside the frame.

This image is of Safari 3.1.

How to solve this issue?
Vyrban
Top achievements
Rank 1
 answered on 02 Oct 2009
1 answer
158 views
After using the Datepicker we have run into a hurdle. We have a solution that allows for an End Date on a form. The end date can be null or a valid date. The Datepicker allows the user to enter an invalid date (ex. 12/38/2009) and in the code behind it appears as a null entry (which is the same as leaving it blank) and does not have a code behind flag saying it is invalid. It would be great for the Datepicker not to allow typing an invalid date to begin with or to flag the entry so it is readable in code behind that it is not valid. Other datepickers from other vendors use a masked edit so you cannot type something like 12/38/2009.

Just some thoughts.  If anyone has a way to resolve this feel free to let me know.

Scott
Dimo
Telerik team
 answered on 02 Oct 2009
5 answers
185 views
Hi,

Here are what I would like to see in the next version:

  1. Several captcha's on the same page will display the same pictures all over - pictures should be individual.
  2. Click on the picture should fetch a new one.
  3. Better control over the input box and label.
  4. The ability to turn on/off sound (read out loud the letters/numbers in current language)
  5. More image "template" types to choose from.
Pero
Telerik team
 answered on 02 Oct 2009
6 answers
92 views
Hi, I'm upgrading RadEditor.Net2 with Telerik.Web.UI.RadEditor (2009 Q2) on my WebApplication, but it seems that Dockable="true" doesn't work for tools.
Basically I can't drag the toolbars even if I set Dockable="true" into the toolsfile.xml.

Here is a part of my toolsfile.xml file.

<root>
    <tools name="MainToolbar" Dockable="true">
        <tool name="Copy" shortcut="CTRL+C">
        ...
    </tools>
    ...
<root>

I'd like to make tools dockable because if you set particular sizes (not too strange...) of RadEditor, tools get splitted in two rows.

Can you help me?
Thanks

Saggiatorius
saggiatorius
Top achievements
Rank 1
 answered on 02 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?