Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
487 views
Currently I have a grid with multiple rows. The last column of the grid is an imagebutton inside a GridTemplateColumn to "remove" the row. What i mean by remove is actually change the value of another column in a GridBoundColumn and hide the desired row. 

I currently have an itemcommand and commandname on the imagebutton.
<asp:ImageButton runat="server" ID="imgRemoveCostCenter" ImageUrl="~/Images/Remove.png" OnItemCommand="rad_CostCenters_ItemCommand" CommandName="HideCostCenter" />

The grid itself has the OnItemCommand event bound.
<telerik:RadGrid ID="rad_CostCenters" OnItemCommand="rad_CostCenters_ItemCommand" AllowMultiRowEdit="true" AutoGenerateColumns="false" EnableTheming="true" Skin="Default" AllowSorting="false" runat="server" ShowHeader="true" OnItemDataBound="Rad_ManagersList_ItemDataBound">

Have a GridTemplateColumn to hold the "ActionID"
<telerik:GridBoundColumn UniqueName="ActionID" DataField="ActionID" Visible="false" />

and finally have the function in the code-behind:
protected void rad_CostCenters_ItemCommand(object sender, GridCommandEventArgs e)
{
    GridDataItem item = (GridDataItem)e.Item;
 
    int _ActionID = Convert.ToInt16(item["ActionID"].Text);
 
    if (e.CommandName == "HideCostCenter")
    {
        _ActionID = -1;
    }
    rad_CostCenters.Rebind();
}
protected void Rad_ManagersList_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridDataItem)
    {
        GridDataItem item = (GridDataItem)e.Item;
        DataRowView drv = (DataRowView)e.Item.DataItem;
 
        int _ActionID = Convert.ToInt16(item["ActionID"].Text);
 
        if (_ActionID == -1)
        { item.Display = false; }
    }
}

How can I get this to set the actionID so it can be rebound?
Jayesh Goyani
Top achievements
Rank 2
 answered on 04 Jan 2012
2 answers
112 views
I have a horizontal menu that works perfectly and looks exactly as intended in 2011 version of Firefox, Chrome, and Safari.
But - surprise - does look right in IE 9.   What happens is that the height of the menu is squeezed by about 5 pixels, so that it is less than the divider images. On mouseover the height of the buttons is correct. 

I am using Q3 2010 and don't want to pay for a version upgrade just for this issue on this site.
Is there a css hack that can be applied to correct the button height for the case of IE9 browser?

See attached screen shot

Thanks

Clive
Clive Hoggar
Top achievements
Rank 1
 answered on 04 Jan 2012
0 answers
137 views
Hello,

I am trying to design a recursive Search to allow people to search for files and folders, but need some help from the community and possibly telerik support staff if they so choose.

I was thinking of a pop-up window that as the users types into the textbox it performs ajax to get a list of all folders and files found within the current folder.

There would be an options to search Folders, Files or both. The would display a list and when a item from the list is clicked it will navigate to that item. If its a directory then load the directory, if its a file load the parent directory and select the file.
I have a sample that has a custom search button and when clicked I can manually load a given folder.

Any help would be appreciated.
David Beck
Top achievements
Rank 1
 asked on 04 Jan 2012
4 answers
346 views
Hello!

I´m trying to upgrade my code to the RadControls for ASP.NET AJAX. but get the error Unable to create type 'rad:RadSplitter'. Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

The error fires at the row declaring radsplitter.

I´m working in a web solution and the only extern dll I´ve included into reference is Telerik.Web.UI.

I´ve installed net3.5, but the code worked before with the old radcontrols.

<%

@ Register TagPrefix="rad" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<rad:RadSplitter id="rs_Content" runat="server" width="100%" Height="1000px" Orientation="Vertical" Skin="Default">
<rad:RadPane id="rp_Menu" runat="server" scrolling="none" Width="205px">
<div id="masterpage_div_moduledropdown">
<rad:RadComboBox ID="ddModules" runat="server" Width="200px" Skin="Vista" MarkFirstMatch="false" HighlightTemplatedItems="True" ShowToggleImage="True" AllowCustomText="false" EnableLoadOnDemand="false" AutoPostBack="true" onselectedindexchanged="ddModules_SelectedIndexChanged">

Dobromir
Telerik team
 answered on 04 Jan 2012
8 answers
266 views
Is there a way to get uploading files in server side?

I know I can get uploaded files thru AsyncUpload1.UploadedFiles, but I want the currently uploading files.

Thanks,
MTs
Bozhidar
Telerik team
 answered on 04 Jan 2012
3 answers
144 views
hello all,
I have a customized advanced edit form that displays a number of resources in drop down lists. I need to enable/disable these drop down lists based on user selections. Ive attempted to do this with jQuery but for whatever reason, when the change event is fired, it does not disable the drop downs.
here is the code:

<script type="text/javascript">
    (function ($) {
        $(function () {
            $('.rsAdvChkWrap').hide();
            $("[id$='_ResActivity_ResourceValue_Input']").bind('change', function () {
 
                if ($("[id$='_ResActivity_ResourceValue_Input']").val() !== 'ILT - Instructor Led Training') {
                    //alert('not equal');
                    $("[id$='_ResCourse_ResourceValue_Input']").attr('disabled', 'disabled');
                    $("[id$='_ResLocation_ResourceValue_Input']").attr('disabled', 'disabled');
 
                } else {
                    //alert('equal');
                    $("[id$='_ResCourse_ResourceValue_Input']").removeAttr('disabled');
                    $("[id$='_ResLocation_ResourceValue_Input']").removeAttr('disabled');
                }
            });
        });
    })($telerik.$);
</script>


I know that the event is firing because when I uncomment the alert() functions, I get the alert.
 Any thoughts/recommendations are appreciated.

Thanks
Alex
Plamen
Telerik team
 answered on 04 Jan 2012
7 answers
438 views
Hi,
how can i stop the nodes in my treeview from being highlighted when the mouse rolls over.

I have seen the following suggestion:http://www.telerik.com/community/forums/aspnet-ajax/treeview/disabling-styles-hover-and-selected.aspx

This is not what I want. I want to remove the class switch rather than alter the class behaviour.

How can I prevent any switching of stylesheet classes when the mouse hovers over the node.
Plamen
Telerik team
 answered on 04 Jan 2012
1 answer
138 views
Did a search, but could not find a related post.  I have this issue in ie9 and Firefox 8, have not tried other browsers.

When the RadUpload generates its HTML/JavaScript it has an invisible 'floating' input that when clicked opens the file browser dialog.  This input is, by default, floating at a relative position of -5000px above where the control is actually located.  Most of the time, bumping it 5000 pixels pushes it off the page, the problem is that on longer pages this can overlap with other visible controls/inputs and can cause unexpected behavior since clicking on this floating input will still bring up the file dialog for that RadUpload. 

In my case, I have a RadGrid with a template that contains RadUploads which are actually overlapping on each other, essentially making it impossible to click the intended upload.

I've create a sample page to illustrate this issue shown below.  This repeats 50 upload controls with some spacing between them.  Once on the page you can see that clicking around the 'Weirdness here' text will open up a file dialog.  This becomes an issue when this phantom input overlaps another control.  You can verify in the html that the input is floating.  When hovered over, the input snaps to the correct location, but will return to -5000px immediately after.

Markup:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DeleteMe.aspx.cs" Inherits="AuctionAdmin.DeleteMe" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
 
<!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">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <div>
        <asp:Repeater runat="server" ID="rptTest">
            <ItemTemplate>
                <%# Container.DataItem.ToString() /*Index number*/ %>              
                <telerik:RadUpload runat="server" ID="uploadTest" ControlObjectsVisibility="ClearButtons"></telerik:RadUpload>
                      Wierdness Here
                <br /><br /><br />
            </ItemTemplate>
        </asp:Repeater>
    </div>
    </form>
</body>
</html>

Code behind:
public partial class DeleteMe : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        List<int> list = new List<int>();
        for(int i=0; i<100; i++) list.Add(i);
        rptTest.DataSource = list;
        rptTest.DataBind();
    }
}


Generated Html:
<div id="rptTest_ctl47_uploadTest" class="RadUpload RadUpload_Default">
    <input id="rptTest_ctl47_uploadTest_ClientState" type="hidden" name="rptTest_ctl47_uploadTest_ClientState" autocomplete="off">
    <ul id="rptTest_ctl47_uploadTestListContainer" class="ruInputs">
        <li>
            <span class="ruFileWrap ruStyled">
                <input id="rptTest_ctl47_uploadTestfile0" class="ruFileInput" type="file" name="rptTest_ctl47_uploadTestfile0"
                       size="23" style="position: absolute; left: 0px; top: -5000px;" title="Desert.jpg" alt="Desert.jpg">
                <input class="ruFakeInput" type="text" size="22" title="Desert.jpg">
                <input class="ruButton ruBrowse" type="button" value="Select">
            </span>
        <input id="rptTest_ctl47_uploadTestclear0" class="ruButton ruClear" type="button" value="Clear" name="ClearInput">
        </li>
    </ul>
</div>

Bozhidar
Telerik team
 answered on 04 Jan 2012
1 answer
70 views
Hi,

I have used the latest Q3 RadCombo with more than 2000 items in my project. The search speed in IE is too slow while comparing 2010 Q3 release. But it doesn't have any issues in Chrome and FF. When will it be fixed?

Thank you
Richard
Top achievements
Rank 1
 answered on 04 Jan 2012
1 answer
137 views
Hi,

I am using RadUpload in RadListView itemtemplate. OnClientFileSelected of radupload i am setting filename to textbox and then calling blur().

function ImageFileSelected(radUpload, eventArgs) {
        var input = eventArgs.get_fileInputField().value;
        document.getElementById('txtHSPortraitBackground_text').focus();
        $find("txtHSPortraitBackground").set_value(input.substring(input.lastIndexOf('\\') + 1));
        document.getElementById('txtHSPortraitBackground_text').blur();
    }

this causes textchanged event of textbox.

protected void txtHSPortraitBackground_TextChanged(object sender, EventArgs e)
        {
            RadListViewDataItem item = rlvWebClip.Items[0];
            RadBinaryImage RadBinaryImageUP = ((RadBinaryImage)item.FindControl("RadBinaryImageUP"));
            RadUpload rulHSPortraitBackground = ((RadUpload)item.FindControl("rulHSPortraitBackground"));

            RadBinaryImageUP.DataValue = GetFileDataInByte(rulHSPortraitBackground);
        }

Here the issue is that the uploadedfiles.count is always 0. I am not able to find out why. So please help me.
Dimitar Terziev
Telerik team
 answered on 04 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?