Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
94 views
Hi,

I need to add a rootnode checkbox to a treeview that would check or uncheck all nodes on check/uncheck.


I have tried to add it on client and server side but did not get it to work


On the server side:


Protected Sub treeview1_DataBound(ByVal sender As Object, ByVal e As EventArgs) Handles groups.DataBound


Dim rootNode As New RadTreeNode("Select/ Unselect all")


Dim nodeArray() As RadTreeNode = Nothing


treeview1.Nodes.CopyTo(nodeArray, 0)


rootNode.Nodes.AddRange(nodeArray)


End Sub


On the client side:


<asp:CheckBox id="chkGroup1" runat="server" Text="Select/UnselectAll" OnClick="selectthis(this);" />


function selectthis(element) {
var tree = document.form1.treeview1.ClientID;
if (element.checked)
{
for (var i = 0; i < tree.get_nodes().get_count(); i++) 
{
var node = tree.get_nodes().getNode(i);
node.set_checked(true);
node.set_expanded(true);
}
}
}




The server side implementation fails as the array is null and the client side cannot fetch the element.


Pls let me know if there is way around this or any other way I can add a root checkbox to the tree.


Thanks!
Kate
Telerik team
 answered on 01 Feb 2011
11 answers
601 views
Hi guys,

I am having an issue with the RadCaptcha control. We need to set the ImageStorageLocation to CaptchaImageStorage.Session in order to make the control work in our environment (we are not using persistent load balancing). My problem is that when the property is set this way the Captcha image is always broken (the URL returns a 404 error). If I set it back to cache the image displays fine on my local box (but has the same issues that you would expect to see across the farm environment with the gray box and not validating correctly).

From what I can tell this is being caused by a null reference exception that is coming out of the ProcessRequest method of the CaptchaImageHandler class, but from what I can see on my end I'm not exactly sure what is causing this.

I'm using the web part as part of a web part for a MOSS 2007 website. Below is the code I am using to add the control to the page inside the CreateChildControls method

Controls.Add(new RadCaptcha  
{  
    Display = ValidatorDisplay.Static,  
    EnableRefreshImage = true,  
    ErrorMessage = "The code you entered is not valid",  
    IgnoreCase = true,  
    CaptchaTextBoxLabel = "Please enter the code from the above image.",  
    ImageStorageLocation = CaptchaImageStorage.Session  
}); 

Can anyone help me shed any light on why this is happening? We need to take our solution to production in the next week or two at latest and I would really like to keep the Captcha control on the form

Cheers,

Brian Farnhill
SharePoint Server MVP
Pero
Telerik team
 answered on 01 Feb 2011
2 answers
89 views
Hi all,

In Footer(ascx file),I would like to find the Radgrid ID which comes from other pages that using the footer.
For example, "Car Information" page uses Radgrid to display car info and it uses "footer.ascx" as its footer.
Now, in the "footer.ascx", I want to get the Radgrid ID in order to change its skin.
Are there any ways to do this?

Thanks.

Andy.
Andy
Top achievements
Rank 1
 answered on 01 Feb 2011
1 answer
113 views
Hi,

     I am facing a issue while filter a radgrid. I have a filter Expression written in my program and that is throwing some exception while runing. Please solve me this issue ASAP. I will attach my code here with the exception message what I am facing while Running.
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
      
      
        <script type="text/javascript">
            function showMenu(e) {
                var contextMenu = $find("<%= RadContext.ClientID %>");
  
                contextMenu.show(e);
            }
            var combo;
            function OnClientLoad(sender, args) {
                 combo = sender;
            }
            function getFilterComboBox() {
                  
                var comboItem = combo.get_selectedItem();  // combo represents the FilterCombo 
                document.getElementById('<%=hdnRadCombo.ClientID %>').value = comboItem._text;
            
  
</script>
    <telerik:RadGrid runat="server" ID="JobSummaryGrid" AllowFilteringByColumn="true"
            AutoGenerateColumns="false">
    <MasterTableView AllowFilteringByColumn="true" AllowSorting="true" AllowPaging="true">
      <Columns>
              
            <telerik:GridBoundColumn DataField="header" DataType="System.String" HeaderText="Header"
             UniqueName="Header" FilterControlWidth="70px">
            </telerik:GridBoundColumn>
  
            <telerik:GridBoundColumn DataField="details" DataType="System.String" HeaderText="details" 
            UniqueName="details" FilterControlWidth="70px">
            </telerik:GridBoundColumn>
  
            <telerik:GridBoundColumn DataField="orgin" DataType="System.String" HeaderText="orgin"
             UniqueName="orgin" FilterControlWidth="70px">
            </telerik:GridBoundColumn>
  
            <telerik:GridBoundColumn DataField="contenttitle" DataType="System.String" HeaderText="contenttitle"
             UniqueName="contenttitle" FilterControlWidth="70px" >
            </telerik:GridBoundColumn>
  
            <telerik:GridBoundColumn DataField="JoinDate" DataType="System.DateTime" HeaderText="JoinDate"
             UniqueName="JoinDate" FilterControlWidth="70px">
            </telerik:GridBoundColumn>
  
            <telerik:GridBoundColumn DataField="serviceType" DataType="System.String" HeaderText="serviceType"
             UniqueName="serviceType" FilterControlWidth="70px" ShowFilterIcon="true" AllowFiltering="true">
             <FilterTemplate>
                <telerik:RadComboBox runat="server" ID="radCombobox1" DataTextField="serviceType"
                 DataValueField="serviceType" OnClientLoad="OnClientLoad" OnClientSelectedIndexChanged="getFilterComboBox">
                <Items>
                    <telerik:RadComboBoxItem Text="serviceType1" />
                    <telerik:RadComboBoxItem Text="serviceType2" />
                    <telerik:RadComboBoxItem Text="serviceType3" />
                </Items>
                </telerik:RadComboBox>                
                 
                <img src="FilterIcon.JPG" alt="Landscape" width="22px" onclick="showMenu(event)" />
                     
                <asp:ImageButton runat="server" ID="imgButtonClearFilter" ImageUrl="~/ClearFilter.jpeg" OnClick="clearFilter" />
             </FilterTemplate>
             </telerik:GridBoundColumn>
      </Columns>        
    </MasterTableView>
    </telerik:RadGrid>
    <telerik:RadScriptManager runat="server">
    </telerik:RadScriptManager>
    <telerik:RadContextMenu runat="server" ID="RadContext" 
            onitemclick="RadContext_ItemClick">
    <Items>
        <telerik:RadMenuItem Text="EqualTo"/>
    </Items>
    </telerik:RadContextMenu>
    <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
     <asp:HiddenField ID="hdnRadCombo" runat="server" />
</asp:Content>
protected void RadContext_ItemClick(object sender, RadMenuEventArgs e)
    {
        radComboboxSelectedString = hdnRadCombo.Value;
        switch (e.Item.Text)
        {
            case "EqualTo":
  
                foreach (GridBoundColumn column in JobSummaryGrid.MasterTableView.Columns)
                {
                    if (column.UniqueName == "serviceType")
                    {                       
                        JobSummaryGrid.MasterTableView.FilterExpression = "(Convert.ToString(it[serviceType])=" + radComboboxSelectedString + ")";//"it.serviceType ="+radComboboxSelectedString+"";
                        //JobSummaryGrid.MasterTableView.FilterExpression = "(it"+"[ Header]"+".ToString().StartsWith("+"6"+"))";
                        column.CurrentFilterFunction = GridKnownFunction.EqualTo;
                        JobSummaryGrid.MasterTableView.Rebind();
                          
                    }
                }
                break;
        }
    }  
Marin
Telerik team
 answered on 01 Feb 2011
1 answer
80 views
hi i have datapager with my listview control.

i want change button image 'next' 'prev'
how can i do ?

this button have no imageUrl !
<telerik:RadDataPagerButtonField FieldType="FirstPrev" />


this my exemple work fine, but with the original button...:(

<telerik:RadDataPager ID="RadDataPager1" runat="server" PagedControlID="RadListView1" PageSize="10" >
                                    <Fields>
                                        <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                                       <telerik:RadDataPagerTemplatePageField>
                                            <PagerTemplate>
                                                <div style="float: right;font-family:Arial;font-size:10px;">
                                                    <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex+1%>" />&nbsp;-&nbsp;
                                                    <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>" />
                                                </div>
                                            </PagerTemplate>
                                        </telerik:RadDataPagerTemplatePageField>
                                    <telerik:RadDataPagerButtonField FieldType="NextLast" />
                                    </Fields>
                                </telerik:RadDataPager>
brian
Top achievements
Rank 1
 answered on 01 Feb 2011
8 answers
147 views
Hi guys;

When we use loading panel in our project we are getting some errors.
Our project have two panels and also two button into these panels when and
the loadiing panel firing with buttons ,we are getting  _event error and the
other error "Microsoft JScript runtime error: 'null' is null or not an object rad ajax manager".How we solve that problem..
(In other words,I wanna control loading panel with that buttons..)
our code like that;
<panel>
          <button>
</panel>
<panel>
        <button>
        <radgrid>
</panel>
        <loading panel>
Some code parts are coppied bellow there..

 

 

<telerik:RadAjaxManager ID="SiparisRadAjaxManager" DefaultLoadingPanelID="SiparisRadAjaxLoadingPanel"

 

 

 

 

 

 

runat="server">

 

 

 

 

 

 

<AjaxSettings>

 

 

 

 

 

 

<telerik:AjaxSetting AjaxControlID="SiparisRadGrid">

 

 

 

 

 

 

<UpdatedControls>

 

 

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="SiparisRadGrid" LoadingPanelID="SiparisRadAjaxLoadingPanel" />

 

 

 

 

 

 

</UpdatedControls>

 

 

 

 

 

 

</telerik:AjaxSetting>

 

 

 

 

 

 

<telerik:AjaxSetting AjaxControlID="SiparisKaydetButton" EventName="SiparisKaydet_Click">

 

 

 

 

 

 

<UpdatedControls>

 

 

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="SiparisPanel" LoadingPanelID="SiparisRadAjaxLoadingPanel" />

 

 

 

 

 

 

</UpdatedControls>

 

 

 

 

 

 

</telerik:AjaxSetting>

 

 

 

 

 

 

<telerik:AjaxSetting AjaxControlID="SiparisDetayKaydetButton" EventName="SiparisDetayKaydetButton_Click">

 

 

 

 

 

 

<UpdatedControls>

 

 

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="SiparisDetayPanel" LoadingPanelID="SiparisRadAjaxLoadingPanel" />

 

 

 

 

 

 

</UpdatedControls>

 

 

 

 

 

 

</telerik:AjaxSetting>

 

 

 

 

 

 

</AjaxSettings>

 

 

 

 

 

 

</telerik:RadAjaxManager>

 

 

 

 

 

 

<telerik:RadAjaxLoadingPanel ID="SiparisRadAjaxLoadingPanel" Skin="Web20"

 

 

 

 

 

 

runat="server">

 

 

 

 

 

 

</telerik:RadAjaxLoadingPanel>

 

 

 

 



fibonacci
Top achievements
Rank 1
 answered on 01 Feb 2011
1 answer
37 views
Is it possible to have one spell check control at the Page/form level for all controls inside the page/form?
Please help with example.
Thanks
Rumen
Telerik team
 answered on 01 Feb 2011
1 answer
147 views
Hi
I have an issue where I create a RadWindow which contains a drop-down. The drop-down has quite a number of items, so the height of it needs be larger than the RadWindow itself. What I want is for the drop-down to show over the RadWindow and the over the window behind as well. Instead, the RadWindow creates a vertical scrollbar and the drop-down remains contained within the RadWindow.
Does anyone know of any way to effectivly make the inner control show in front of everything else and avoid the scrolling effect?
I have attached a file showing what the problem is - might be easier to understand!
Thanks in advance!
Georgi Tunev
Telerik team
 answered on 01 Feb 2011
9 answers
147 views
I have three docks in three zones, and a destination zone. I want to be able to drag docks into the destination zone, only allowing for at most one dock in the destination zone. I've written custom javascript code to do this, but my problem is that when I drag a dock onto the destination zone, before I let go of the mouse, the placeholder already shows up - it effectively pushes around the existing dock in the destination zone. How do I disable the placeholder? This is the code that checks to see if the destination zone contains a dock and if so, prevents another one from being dragged in there (on the dock I have OnClientDrag set to DragDock, this function):

        function DragDock(dock) {
            // get the hit zone
            var hitZone = dock._hitZone;
           
            if (hitZone != null) {
                // find out if the hit zone has a dock
                if (hitZone.get_docks().length > 0) {
                    // if so, add the hit zone to the list of forbidden zones of the incoming dock
                    var forbiddenZones = dock.get_forbiddenZones();
                    forbiddenZones.push(hitZone._clientID);
                }
            }
Pero
Telerik team
 answered on 01 Feb 2011
13 answers
163 views
Hello,

I have come across the following javascript code to access a collection of ComboBox objects:

var combos = Telerik.Web.UI.RadComboBox.ComboBoxes;

Is there an equivalent for RadTextBoxes?

Thanks,

Ken Jones
Ken Jones
Top achievements
Rank 1
 answered on 01 Feb 2011
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?