Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
221 views
Hello,

I'm using the automatically generated edit and insert controls for the RadTreeView and so far everything is working out fine, except that I'm stuck on one thing.

I would like to limit the number of nested inserts a user can do by disabling and hiding the insert on certain rows (which will be determined programatically in the ItemDataBound Event).

This is just a simple example of what I'd like to do.  Basically if the "level" of the item is 4, I would like to disable and hide the insert.

protected void ItemDataBound(object sender, TreeListItemDataBoundEventArgs e)
   {
       if (e.Item.ItemType == TreeListItemType.AlternatingItem || e.Item.ItemType == TreeListItemType.Item)
       {
           TreeListDataItem item = e.Item as TreeListDataItem;
           int level = (int)DataBinder.Eval(item.DataItem,"Level");
           if (level == 4)
           {
               item["InsertCommandColumn"].Enabled = false;
                
           }
             
       }
   }

The item["InsertCommandColumn"].Enabled kind of works, but it keeps the control visible and confusing for the end user.

If I hide the Cell entirely, all of the other cells shift over to fill the void.

Is there a more graceful way to disable an automatically generated insert button on a row by row basis?
David
Top achievements
Rank 1
 answered on 25 Mar 2011
2 answers
117 views
Hello Telerik,

I read that in the latest release you added AsyncUpload to the File Explorer.

  • http://www.telerik.com/products/aspnet-ajax/whats-new.aspx
  • RadFileExplorer - With Q1 2011 release, the Telerik ASP.NET AJAX FileExplorer component adds valuable features, such as AsyncUpload and filter textbox for grid. See demo
I went to the "see demo" page, but all I saw was the new filter.

When are you going to have a demo of the new feature? Do you have any example source code?

Thanks,

-Josh



Joshua
Top achievements
Rank 1
 answered on 25 Mar 2011
11 answers
1.5K+ views
I have read the online help on you to config the web.config file for the Telerik RadUpload Premetheus server control. I still obtain an error message the "Could not load type "Telerik.Web.UI.RadUploadProgressHandler from assembly "Telerik.Web.UI".

How do I solve this issue so that I can use the RadUpload server control?
Nishat Mazhar
Top achievements
Rank 1
 answered on 25 Mar 2011
2 answers
540 views
In radWindow, I have to pass the whole http path to enable the rad window route to the page, "~/Popus/Default.aspx" doesn't work, I have to put "http://localhost:1234/Popus/Default.aspx". Any ideas?

Thanks.
Shannnon
Top achievements
Rank 1
 answered on 25 Mar 2011
4 answers
281 views
I have been playing around with the button with splitbutton enabled, trying to show a contextmenu.

having read articles on the subject none seem to do the trick, or atleast not the way i want it to.

setting the target element of contextmenu only applies when user right-clicks, and is catched on the whole button, not the splitbutton.

Using this script i get
"Unable to get value of the property 'relatedTarget': object is null or undefined"

function showMenu(e)
 {
    var contextMenu = $find("<%ctl00_phHead_pbCaseDetails_i0_i0_RadContextMenu1");
    if ((!e.relatedTarget) || (!$telerik.isDescendantOrSelf(contextMenu.get_element(), e.relatedTarget)))
    {
       contextMenu.show(e);
    }
    $telerik.cancelRawEvent(e);
}

<telerik:RadButton ID="btnCaseSave" runat="server" EnableSplitButton="True" AutoPostBack="false" 
    Skin="Windows7" Text="Spara" OnClientClicked="showMenu(event)">
</telerik:RadButton>
<telerik:RadContextMenu ID="RadContextMenu1" runat="server" Skin="Windows7">
<Targets>
<telerik:ContextMenuElementTarget ElementID="ctl00_phHead_pbCaseDetails_i0_i0_btnCaseSave" />
</Targets>
    <Items>
        <telerik:RadMenuItem Text="Spara och avsluta">
        </telerik:RadMenuItem>
    </Items>
</telerik:RadContextMenu>


How do i get the contextmenu to show on left-click on splitbutton only, and keep postback method on the main button?
Christian
Top achievements
Rank 1
 answered on 25 Mar 2011
2 answers
221 views
I've got the code below, when rendered in IE the buttons are clickable, yet in Firefox and Safari neither buttons are clickable.  They show as enabled but mouse does not change its cursor type and cannot click on the button...

Using button elsewhere on the site and all works just fine...all suggestions welcome...!

Cheers
Cliff

<div style="clear:both; padding-top:5px;"></div>
    <div class="HeaderButtons">
        <div class="Previous">
            <telerik:RadButton ID="btnPrevious" Text="Previous" runat="server" Width="220px" onclick="btnPrevious_Click">
                <Icon PrimaryIconCssClass="rbPrevious" PrimaryIconLeft="5" PrimaryIconTop="5" 
                      SecondaryIconCssClass="rbPrevious" SecondaryIconRight="5" SecondaryIconTop="5"/>
            </telerik:RadButton> 
        </div>
        <div class="Progress">
            <asp:Label ID="lblProgress" runat="server" Text="Progress"></asp:Label>
        </div>
        <div class="Next">
            <telerik:RadButton ID="btnNext" Text="Next" runat="server" Width="220px" onclick="btnNext_Click">
                <Icon SecondaryIconCssClass="rbNext" SecondaryIconRight="5" SecondaryIconTop="5" 
                      PrimaryIconCssClass="rbNext" PrimaryIconLeft="5" PrimaryIconTop="5"/>
            </telerik:RadButton>  
        </div>
        <div id="divSubmit" runat="server" class="Progress" style="display:none" >
            <telerik:RadButton ID="btnSubmit" Text="Submit Evaluation" runat="server" Width="320px" onclick="btnSubmit_Click">
            </telerik:RadButton>  
        </div>
    </div>


.HeaderButtons
        {
            margin:auto;
            position:relative;
            display:block;
            margin:auto;
            text-align:center;
            width:955px;
            float:left;
        }
        .Previous
        {
            width:250px;
            position:absolute;
            left:0px;
            top:0px;
            text-align:left;
            float: left;
        }
        .Next
        {
            width:250px;
            position:absolute;
            right:0px;
            top:0px;
            text-align:right;
            float: right;
        }
        .Progress
        {
            width:955px;
            position:absolute;
            top:0px;
            left:0px;
            text-align:center;
        }

Cliff Gibson
Top achievements
Rank 1
 answered on 25 Mar 2011
3 answers
119 views

I am currently builting a resource management app. I have a row of data which consists of a resource name and their hours per month for 12 months.

I want the user to be able to edit each month's hours by double click and then edit in place (e.g. http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/editondblclick/defaultcs.aspx) - this works fine.

However, I also want to be able to edit the resource name in a popup window, as I need to have related comboboxes to select the resource name.

Is this possible? I only seem to be able to set the EditMode at MasterTableView level - which means one or the other, but not both.

Any help would be greatly appreciated!

Matt

Matt Kerry
Top achievements
Rank 1
 answered on 25 Mar 2011
1 answer
103 views
Hi, I am new to radWindow control. but I have used it quite a lot in my web application till now. I am developing the application in Dot Net Nuke so I have to work in User Controls. On my main page, i display a RadTreeView. If the user clicks an element in the rad tree view, then i show a grid with details of the selected tree node. in this detail grid (which has multiple records for a selected node) I have a button. if the user press this button i open a RadWindow to show more records. I am using all my RadWindows as Control Container, so i put the UserControl in the radWindow's ContentTemplate and set teh VisibleonPageLoad to true if the user press the button. Now in this opened radwindow i display a grid with more records. now in order to add/edit the records in the grid, i use another radwindow (Control Container) to show the edit form. In this radwindow i can open up another radwindow (again control container) to do certain functionality or to select a value from another user control. So in the end i have a Page then radwindow then another radwindow then another radwindow then some more radwindows.
It is working fine in terms of opening the windows and doing some thing in the window. but i can't make the windows to communicate between each other. One thing that came to my mind was to get the reference of the parent rad windows in their childs by using the parent window name, but the problem is that all the user controls which i am using in the radwindows are also used in other application functionality in different ways. so i wanted to make a generic solution so that if the user control is used independently i.e. with out the radwindow, it will still work.
What I am trying to do right now is that in my Last opened radwindow i display some records in a rad grid and the user can select one of the record and press a button on the rad window, which should close this radwindow for record selection and send the selected item as argument to the parent radwindow. (the parent window is not fixed. because the record selection control can be used multiple times in multiple places so i cant hardcode the parent window reference) I need to find the reference of the current window and the reference to the parent widow to pass the arguments or return value. and this can be done on any level (any number of nested windows).
I hope that this long description is enough to understand my problem.

In short: I want to get the reference to the current radwindow (The code available on demo sites gives error) so that i can close the window from client side. I want to send some arguments back to the parent (either page or another window)

 
Svetlina Anati
Telerik team
 answered on 25 Mar 2011
1 answer
230 views
Greetings,

I have been racking my brain and I think that this is probably something silly that I am missing. I have to generate a list of employee "requirements" in the form of checkboxes. I am databinding them to a database with the following fields:

OptionID (unique Identifier)
Name (for the display of the checkbox)
Checked (a bit)

Am I misunderstanding the Listbox behavior in that I would like to display the text field on a checkbox, with a "value" behind it, and then databind whether or not the checkbox should be checked?

Please also note that I can (and did) create a template field with a checkbox in it, but these checkboxes do not behave the way I would like them to when using the following code from the intro to listboxes:

 

StringBuilder sb = new StringBuilder(); 
IList<RadListBoxItem> collection =RadListBox1.CheckedItems; 
foreach (RadListBoxItem item in collection) 
{
  
    sb.Append(item.Value +  "<br />"); 
}

 

The checked box in the template is not counting towards the checked value of the list item.

I am jsut trying to cut down on code, because if I wanted to cycle through each item and manually check if it should be checked, I could do that using a radiobutton list.

I am using Visual Studio 2010 with radcontrols for asp.net ajax Q2 2010 NET40.

Thanks,

Thomas Turner

 

 

 

 

 

 

 

Dimitar Terziev
Telerik team
 answered on 25 Mar 2011
1 answer
183 views
Hi, I am struggling with what I assumed would be a simple task.  Essentially, in its simplest form it boils down to this...

  1. We have a master page with a scriptmanager.
  2. Using that master page we have a web form with a button on it.
  3. Within the web form is a user control that accepts a public property.  When we load the page, we pass the user control a default value for its public property.
  4. When we click the button it passes the user control a new value for its public property and updates the user control (using AJAX).

Help!?
Maria Ilieva
Telerik team
 answered on 25 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?