Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
350 views
Am trying to access a control in the emptydata item template to disable it for certain users. My template looks like this:

<EmptyDataTemplate>
 
     This staff member currently has no blogs.
 
     <br />
 
     <asp:LinkButton ID="lnkBtnAddBlog" runat="server" CommandName="AddBlog"
             Visible="<%# AllowUserEdits() %>"> Add new blog</asp:LinkButton>
 
 </EmptyDataTemplate>

The function in the "visible" attribute isn't firing, yet the exact same button is in the Item template and it fires ok there.

I also can't find a FindControl function for the empty item in code..but i can for the other templates.

So how would i go about accessing that control?

Many thanks

James
James
Top achievements
Rank 1
 answered on 08 Sep 2010
1 answer
80 views

I need to make a input numeric textbox where only thousands are allow, and minimum value 5000

for example 5000, 7000, 10.000, ....

if some gives in 7300 if has to be rounded to 7000, if 259200 to 259000 >> so rounded to the nearest 1000

i have tried to do the first step (check if it is a thousand) with a 

 <
telerik:radnumerictextbox MinValue="5000" ClientEvents-OnKeyPress="" Culture="nl-BE" id="txtBedrag" runat="server">  

 

<NumberFormat DecimalDigits="0" />

 

<ClientEvents OnValueChanged="OnValueChanged" />

 

 

 

</telerik:radnumerictextbox> 

 

 

 

 

 

 

 

<

 

script type="text/javascript">

 

 

 

 

 

function

 

OnValueChanged(sender, eventArgs)

 {

 

var number = aspnetForm.ctl00_ContentPlaceHolder1_txtBedrag_text.value;  

 

 

 

if (number % 1000 > 0)  

 

return false;

 }

 

</script>

 

 

 

 

but this doenst do anyhting, if someone can help me, please let me know !

thanks,
wouter
Dimo
Telerik team
 answered on 08 Sep 2010
1 answer
59 views
hi
when i enable filtering and grouping rad grid shows out of page
please help
thanks
Dimo
Telerik team
 answered on 08 Sep 2010
3 answers
140 views
I have Rad panel Item on left  and xml window on right . When anyone clicks on childradpanelitem1 i want that about.htm loads in the xml window.

The Rad panel Items actually contains submenu of the selected main menu . That means when anyone clicks the submenu of my menu the respective file must appear in xml window . That is when he clicks on About Us (main menu) > Contact us (sub menu) the xml window must come loaded with contact.htm .

 I  want to have 6 aspx files for 6 menus and able to jump from one file to another depending on the submenu cicked . That means i am on Admission.aspx but user clicks on About Us (main menu) > Contact us (sub menu) which is in the file about.aspx and in that also the xml window must come loaded with contact.htm .
Pero
Telerik team
 answered on 08 Sep 2010
1 answer
100 views
Here's my code to make new nodes

function addApproverClick() {
        var window = $find("<%= newTabWindow.ClientID %>");
        var tree = $find("<%= treeView.ClientID %>");
        window.close();
 
        tree.trackChanges();
        var node = new Telerik.Web.UI.RadTreeNode();
        node.set_text('test');
        node.set_value(getPickerOptions());
        node.set_imageUrl("../images/person-white.png");
 
        selectedNode.expand();
        if (addType == "Add") {
            selectedNode.get_parent().get_nodes().add(node);
        } else {
            selectedNode.get_nodes().add(node);
        }
        tree.commitChanges();
    }

So it all works, great when I click a button on the page to postback, all the nodes created clientside are missing that image.

It seems that it's appending the Host to the beginning of it instead of what I assigned it.
http://postgrad.dev.medportal.ca/apps/rto/new/images/person-white.png

..weird?
Yana
Telerik team
 answered on 08 Sep 2010
8 answers
118 views
I am using the OnClientTimeSlotClick event to allow users to insert and edit appointments with a single click.  But I find that whenever the user clicks inside the insert or edit template, the click event bleeds through to the scheduler and raises the OnClientTimeSlotClick event.

I can kinda work around this by checking to see if an object with the class rsAptEditFormWrapper exists and if it does not open the insert form.  But this also prevents a user from cancelling out of the edit by clicking on a blank slot to create a new appointment.

Peter
Telerik team
 answered on 08 Sep 2010
1 answer
223 views
Hi Team

i have Radcombobox

 

<telerik:RadComboBox ID="Test" runat="server" EmptyMessage="Select"

 

 

EnableLoadOnDemand="true" EnableVirtualScrolling="true" Filter="Contains"

 

 

onKeyDown="if(event.keyCode==13) event.keyCode=9;" ItemsPerRequest="20" ShowMoreResultsBox="true"

 

 

TabIndex="133" Width="200px">

 

 

</telerik:RadComboBox>

if i click Clear button i need to set like select in dropdown.
i used like but not working

 

Test.SelectedIndex = -1;
Test.Selectedvalue="";
Test.Selectedvalue=0;
not working ...

Give me the Solution as soon as possible..

Shinu
Top achievements
Rank 2
 answered on 08 Sep 2010
2 answers
207 views
Consider the following grid ...
<telerik:RadGrid ID="RadGrid1"
                 runat="server"
                 AutoGenerateColumns="false"
                 AllowMultiRowSelection="false">
    <MasterTableView>
        <Columns>
            <telerik:GridClientSelectColumn UniqueName="Select"
                                            Visible="true"></telerik:GridClientSelectColumn>
            <telerik:GridBoundColumn UniqueName="Name"
                                     DataField="Name"
                                     HeaderText="Name"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Email"
                                     DataField="Email"
                                     HeaderText="Email"></telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
    <ClientSettings>
        <Selecting AllowRowSelect="true"/>
    </ClientSettings>
</telerik:RadGrid>
Running the page with this definition on it displays a grid with a select column. The select column's header has a checkbox in it. This is all good.

Now, consider the case where the above grid should only display the select column under programmer-defined conditions. Also consider that the grid should be limited to single row selection when the select column is not visible.

The following code sets up an example for this ...
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default5.aspx.cs" Inherits="Default5" %>
 
<!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>
    </head>
    <body>
        <form id="form1"
              runat="server">
            <telerik:RadScriptManager ID="RadScriptManager1"
                                      runat="server">
            </telerik:RadScriptManager>
            <telerik:RadGrid ID="RadGrid1"
                             runat="server"
                             AutoGenerateColumns="false"
                             AllowMultiRowSelection="false">
                <MasterTableView>
                    <Columns>
                        <telerik:GridClientSelectColumn UniqueName="Select"
                                                        Visible="true"></telerik:GridClientSelectColumn>
                        <telerik:GridBoundColumn UniqueName="Name"
                                                 DataField="Name"
                                                 HeaderText="Name"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn UniqueName="Email"
                                                 DataField="Email"
                                                 HeaderText="Email"></telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings>
                    <Selecting AllowRowSelect="true"/>
                </ClientSettings>
            </telerik:RadGrid>
            <asp:Button ID="Button1"
                        runat="server"
                        Text="Click"
                        OnClick="Button1_Click"/>
        </form>
    </body>
</html>
using System.Collections.Generic;
using System;
 
public class Contact
{
    public string Email { get; set; }
 
    public string Name { get; set; }
}
 
public partial class Default5 : System.Web.UI.Page
{
    protected void Button1_Click(object sender, EventArgs e)
    {
        bool currentValue = RadGrid1.Columns.FindByUniqueName("Select").Visible;
        RadGrid1.AllowMultiRowSelection = !currentValue;
        RadGrid1.Columns.FindByUniqueName("Select").Visible = !currentValue;
    }
 
    protected void Page_Load(object sender, EventArgs e)
    {
        List<Contact> contacts = new List<Contact>{
            new Contact{Name = "Stuart Hemming1", Email = "sejhemming@gmail.com"},
            new Contact{Name = "Stuart Hemming2", Email = "sejhemming2@gmail.com"},
            new Contact{Name = "Stuart Hemming3", Email = "sejhemming3@gmail.com"},
            new Contact{Name = "Stuart Hemming4", Email = "sejhemming4@gmail.com"},
            new Contact{Name = "Stuart Hemming5", Email = "sejhemming2@gmail.com"},
            new Contact{Name = "Stuart Hemming6", Email = "sejhemming@gmail.com"}
        };
        RadGrid1.DataSource = contacts;
        RadGrid1.DataBind();
    }
}

Run the page and you have a grid with 2 columns and a single button. Click the button to display the select column and to allow multirow selection. When the grid redraws, it does so with the select column displayed but no checkbox appears in the header.

Is this broken, or am I just missing something?

-- 
Stuart

Stuart Hemming
Top achievements
Rank 2
 answered on 08 Sep 2010
2 answers
87 views
'tis a minor thing, but do you think you could reorganise RadGrid | Client-side API | Subscribing to Client Events | Client Events so that the events are listed in alphabetical order?

-- 
Stuart
Stuart Hemming
Top achievements
Rank 2
 answered on 08 Sep 2010
3 answers
79 views
Hi,

I'm wonder if I can display two radtootipmanager controls together in the same time. Please, view the attached image to understand what I'm looking for.

Please, if you have any code or explaination, provide me with it.
I need an emergency help,

Regards,
Bader
Svetlina Anati
Telerik team
 answered on 08 Sep 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?