Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
218 views
I have a combobox that placed inside a radwindow. Item request event of the combobox not working.
Princy
Top achievements
Rank 2
 answered on 06 May 2013
1 answer
242 views
Hi All,

How to set radcombox item to enable false in one another radcombobox item selected index changed .

I have implemented code is below. Kindly correct me what i have missed from code.

        protected void radcombo1_OnSelectedIndexChanged(object sender, EventArgs e)
        {
               string a = radcombo1.SelectedValue.Trim();
                 
                for (int i = 0; i < radcombo2.Items.Count; i++)
                {
                    string b = radcombo2.Items[i].Value;
                    string c = radcombo2.Items[i].Text;
 
                   if ((a == "TGROSS") && (b.Substring(0, 2) == "16"))
                   {
                       RadComboBoxItem item = radcombo2.FindItemByText(c);
                       item.Enabled = false;
                      
                   }
                 
                    
                }
                radcombo2.SelectedIndex = 0;
}


Thanks in Advance..!
Princy
Top achievements
Rank 2
 answered on 06 May 2013
4 answers
221 views
Hi all,
I have a scheduler, whenever i mouse hover to an appointment subject is visible in tooltip, even i have not written any code for tooltip. I just want to remove that tooltip. Please help............ 
Princy
Top achievements
Rank 2
 answered on 06 May 2013
0 answers
118 views
hello guys

                i' ve been googling days for search for the solution but no luck to find one so i gonna try to ask from you who are expert on this control..ok..the scenario is i have a master page with a radtreeview bind to a sql database now i have 5 web user control which initiate to fill up the radtreeview during insert execution the problem is i cannot reload the radtreeview because it was on the master page..the question how am i going to rebind or reload the radtreeview in the master page during insert on my user control? is there a way to do it on server side coz i'm not so much familiar using javascript? your support is greatly appreciated..

thanks
Jols
Top achievements
Rank 2
 asked on 06 May 2013
2 answers
134 views
Hello ,

i need to create a column in the grid , contain button this button " confirm "  when i press on it i want to add value " Confirmed "
in specific cell

 
Jayesh Goyani
Top achievements
Rank 2
 answered on 05 May 2013
4 answers
87 views
Hi, I have a problem with a hierarchical RadMenu generated with a datatable when using custom images for each menu option and that requires some extra radmenuitems manually defined.

The problem is that when I set the images, the "text" defined is shown to the right of the png file representing the menu option. If I don't set the text value or even if I set string.empty to it, then the name of a class "System.data.datarowview" is shown to the right of each menu item image.


I defined a RadMenu in the following way in the aspx file:

<telerik:RadMenu ID="TelerikRadMenu" runat="server" Skin="WebBlue" AppendDataBoundItems="True" />

I have a sql server table with the following structure:

IdMenu int
IdMenuParent int
Description varchar(100)
Tooltip varchar(200)
ImageBaseName varchar(50)
TargetUrl varchar(max)
OpenInTopFrame boolean

Then I generate the menu in the vb like this:

private useimagesinradmenu as boolean = false
private basethemepath as string = "~/App_Themes/Default/Images/Menu/"

Private Sub GeneraMenuTelerik()
'Get the menu for this particular logged user from a user object defined outside. 
'It works fine.
Dim dt As DataTable = CurentUser.Menu.GetFullMenuAsDataTable()

basethemepath = String.Format("~/App_Themes/{0}/Images/Menu/", CurrentUser.Theme)
useimagesmenu as boolean = ValidateAllImgExist(basethemepath, dt)

useimagesinradmenu = useimagesmenu

Dim btninit As New RadMenuItem()

'for simplicity I only show how I generate a single databounditem, but there are more depending
'certain conditions.
With btninit
.EnableImageSprite = useimagesmenu
.HoveredImageUrl = String.Format(basethemepath + "/{0}_hover.png", "init")
.ImageUrl = String.Format(basethemepath + "/{0}_normal.png", "init")
.Target = "_Top"
.NavigateUrl = "~/Home.aspx"
.Text = "Home"
.ToolTip = "Go to system's home page"
End With
 
With TelerikRadMenu
With .Items
.Add(btninit)
End With

.DataSource = dt
.DataFieldID = "IdMenu"
.DataFieldParentID = "IdMenuParent"
.DataTextField = "Description" 'If I comment this line or set string.empty as value I get the text  "System.data.datarowview" else 
.DataNavigateUrlField = "TargetUrl"
.EnableEmbeddedSkins = Not useimagesmenu
.EnableImageSprites = useimagesmenu
.DataBind()
End With
End Sub

Protected Sub TelerikRadMenu_ItemDataBound(sender As Object, e As RadMenuEventArgs) Handles TelerikRadMenu.ItemDataBound
e.Item.ToolTip = CStr(DataBinder.Eval(e.Item.DataItem, "Tooltip"))
If CBool(DataBinder.Eval(e.Item.DataItem, "OpenInTopFrame")) Then
e.Item.Target = "_top"
Else
e.Item.Target = "mainFrame"
End If

if useimagesinradmenu Then
Dim imgbasename As String = DataBinder.Eval(e.Item.DataItem, "ImageBaseName ").ToString()
Dim imgnormal As String = String.Format("{0}{1}_normal.png", basethemepath, imgbasename)
Dim imghover As String = String.Format("{0}{1}_hover.png", basethemepath, imgbasename)

e.Item.ImageUrl = imgnormal
e.Item.HoveredImageUrl = imghover
End If
End Sub

How can I hide the right text?

Thanks
Sergio E.
Cdc DevTeam
Ivan Zhekov
Telerik team
 answered on 05 May 2013
9 answers
460 views
I have a DotNetNuke module that uses a RadGrid with InPlace editing. Markup follows:

        <telerik:RadGrid ID="lstInstallations" runat="server" AutoGenerateColumns="false"
            AllowPaging="true" OnNeedDataSource="lstInstallations_NeedDataSource" OnInsertCommand="lstInstallations_InsertCommand"
            OnUpdateCommand="lstInstallations_UpdateCommand" OnDeleteCommand="lstInstallations_DeleteCommand"
            OnItemCreated="lstInstallations_ItemCreated" CssClass="installation-table">
            <MasterTableView EditMode="InPlace" DataKeyNames="InstallationId" CommandItemDisplay="Bottom">
                <Columns>
                    <telerik:GridEditCommandColumn UniqueName="Edit" ItemStyle-CssClass="command-column" />
                    <telerik:GridButtonColumn CommandName="Delete" UniqueName="DeleteInstallation" ItemStyle-CssClass="command-column" />
                    <telerik:GridBoundColumn DataField="Domain" UniqueName="Domain" />
                </Columns>
            </MasterTableView>
            <ValidationSettings ValidationGroup="Installations" />
        </telerik:RadGrid>

This code worked correctly for AJAX controls for DotNetNuke v.2012.3.1205.40, but in v.2013.1.220.40, the behaviour has changed. The grid does not show a text box for the Domain column when it enters Insert mode. If you click the Insert link, it correctly shows a validation message saying that the field is required, and then gives the expected text box. If you then enter a value and click the Insert link again, you get the following error:

Editor cannot be initialized for column: Domain ---> Telerik.Web.UI.GridColumnEditorException: Editor cannot be initialized for column: Domain at Telerik.Web.UI.GridEditManager.GetColumnEditor(IGridEditableColumn column) at Telerik.Web.UI.GridBoundColumn.FillValues(IDictionary newValues, GridEditableItem editableItem) at Telerik.Web.UI.GridEditableItem.ExtractValues(IDictionary newValues) at Telerik.Web.UI.GridTableView.ExtractValuesFromItem(IDictionary newValues, GridEditableItem editedItem)

This appears to be a bug. Is there a fix for it, or a workaround, please?
Segev
Top achievements
Rank 1
 answered on 05 May 2013
1 answer
207 views
I have RadAsyncUpload inside RADgrid  edit template , before I ajaxify the control using RadAjaxManager every thing was working fine ,, but after i set it to ajax manager or sournd it between rad ajax panels the control does not appear... 
here is the code ,, 

    <radscriptblock id="RadScriptBlock1" runat="server">
<script language="javascript" type="text/javascript">
 
    function OnClientBlurHandler(sender, eventArgs) {
        var textInTheCombo = sender.get_text();
        var item = sender.findItemByText(textInTheCombo);
        //if there is no item with that text
        if (!item) {
            sender.set_text("");
        }
    }
 
</script>
<script language="javascript" type="text/javascript">
    function AddNewFields(radUpload, args) {
        var FildNameLable = '<% = Resources.TMS.UI.TM_AddNewTask_lblAttachmentFileName%>';
        var curLiEl = args.get_row();
        var firstInput = curLiEl.getElementsByTagName("input")[0];
        var input = CreateInput("Title", "text");
        input.className = "copyOfRADTextCSS";
        input.id = input.name = radUpload.getID(input.name);
        var label = CreateLabel(FildNameLable, input.id);
        var fileInputSpan = curLiEl.getElementsByTagName("span")[0];
        var firstNode = curLiEl.childNodes[0];
        curLiEl.insertBefore(label, fileInputSpan.nextSibling);
        curLiEl.insertBefore(input, label.nextSibling);
    }
 
    function CreateLabel(text, associatedControlId) {
        var label = document.createElement("label");
        label.innerHTML = text;
        label.setAttribute("for", associatedControlId);
        label.style.fontSize = 12;
 
        return label;
    }
    function CreateInput(inputName, type) {
        var input = document.createElement("input");
        input.type = type;
        input.name = inputName;
        return input;
    }
    function ConfirmMessage(MessageID) {
        var messageBody = '';
        if (MessageID == "TaskParticipateDelete")
            messageBody = '<% = Resources.TMS.UI.Confirmation_TaskDetails_TaskParticipateDeleteConfirmation%>';
        else if (MessageID == "AttachmentDelete")
            var messageBody = '<% = Resources.TMS.UI.Confirmation_TaskDetails_AttachmentDeleteConfirmation%>';
        else if (MessageID == "EndTask")
            var messageBody = '<% = Resources.TMS.UI.Confirmation_TaskDetails_EndTakConfirmation%>';
 
    return confirm(messageBody);
}
</script>
<script type="text/javascript">
    //On insert and update buttons click temporarily disables ajax to perform upload actions
    function conditionalPostback(e, sender) {
        var theRegexp = new RegExp("\.ImageButton1", "ig");
        if (sender.EventTarget.match(theRegexp)) {
            alert(sender.EventTarget.match(theRegexp));
            var upload = $find(window['UploadId']);
            alert(upload.toString());
            //AJAX is disabled only if file is selected for upload
            if (upload.getFileInputs()[0].value != "") {
                sender.EnableAjax = false;
                alert("EnableAjax = false");
            }
        }
    }
    // end insert and update issue,
 
        var uploadedFilesCount = 0;
        var isEditMode;
        function validateRadUpload(source, e) {
            // When the RadGrid is in Edit mode the user is not obliged to upload file.
            if (isEditMode == null || isEditMode == undefined) {
                e.IsValid = false;
 
                if (uploadedFilesCount > 0) {
                    e.IsValid = true;
                }
            }
            isEditMode = null;
        }
 
        function OnClientFileUploaded(sender, eventArgs) {
            uploadedFilesCount++;
        }
 
    </script>
    </radscriptblock>
<telerik:RadAjaxManager DefaultLoadingPanelID="LoadingPanel1" ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="MasterRadGrid">
            <UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="MasterRadGrid"></telerik:AjaxUpdatedControl>
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
 
 
<telerik:RadGrid StatusBarSettings-LoadingText="جاري التحديث" CssClass="GridAlign"
                            ID="MasterRadGrid" runat="server" ShowStatusBar="true" AutoGenerateColumns="False"
                            PageSize="3" AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="True"
                            GridLines="None" AllowAutomaticDeletes="True" AllowAutomaticInserts="False" AllowAutomaticUpdates="false"
                            OnInsertCommand="MasterRadGrid_InsertCommand" OnDetailTableDataBind="MasterRadGrid_DetailTableDataBind"
                            OnNeedDataSource="MasterRadGrid_NeedDataSource" OnUpdateCommand="MasterRadGrid_UpdateCommand"
                            Skin="Metro" OnDeleteCommand="MasterRadGrid_DeleteCommand" OnItemDataBound="MasterRadGrid_ItemDataBound">
 <PagerStyle Mode="NumericPages"></PagerStyle>
                            <MasterTableView DataKeyNames="CommentID" AllowMultiColumnSorting="True" Width="100%"
                                CommandItemDisplay="Top" Name="MainComment">
<FormTemplate>
                                        <div id="content">
                                            <table>
                                                <tr>
                                                    <td colspan="4" style="width: 40%; padding-right: 15px">
                                                        <telerik:RadAsyncUpload Width="500px" ID="rpTaskAttachments" runat="server">
                                                        </telerik:RadAsyncUpload>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </FormTemplate>
 </EditFormSettings>
                            </MasterTableView>
                        </telerik:RadGrid>

Mohammad
Top achievements
Rank 1
 answered on 05 May 2013
2 answers
103 views
Dears , 
i am trying to download a file from ajaxified control , my problem is the file is saved in server network path ex(//sharedFile/Folder/File.extention).
i tried the below link but it did not work with no errors occurred. 
http://www.telerik.com/help/aspnet-ajax/ajax-download.html

any idea how is can be done ?!

Mohammad
Top achievements
Rank 1
 answered on 05 May 2013
0 answers
92 views
I have 2 entities: Passengers and IDTypes, Passenger has a navigation property called IDType (bound to IDType_ID)

How can i  build a dropdown in the formtemplate? i have one :
<asp:DropDownList ID="dropdownPassengerIDTypes" runat="server" DataSourceID="dsIDTypes" DataTextField="IDTYPE_NAME"
                                DataValueField="ID" SelectedValue='<%# Bind("IDType_ID") %>' AppendDataBoundItems="True">
                                <asp:ListItem Text="Seleccione un Tipo" Value="0"></asp:ListItem>
                            </asp:DropDownList>

BUT IDType_ID does not exists in my Passengers Entity.. can someone help me?
Nahuel
Top achievements
Rank 1
 asked on 04 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?