Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
96 views







Protected
Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
 
       ProgramAreaCombobox.DataSource = GetListProgramAreasHasFeature()
       ProgramAreaCombobox.DataBind()
 
       '<---- EdtMode
       If Not (TypeOf DataItem Is Telerik.Web.UI.GridInsertionObject) Then
 
           Dim a As Business.ReviewCommitteeAmendment = CType(_dataItem, Business.ReviewCommitteeAmendment)
           If Not a Is Nothing Then
               With AgreementAmendmentComboBox
                   .DataSource = GetAgreementAmendments(a.ProgramAreaId)
                   .DataBind()
                   .FindItemByValue(a.AmendmentId).Selected = True  '<-------- FIRES
                   .Enabled = True
               End With
           End If
 
       End If
       '<---- END EdtMode
 
   End Sub
<
MasterTableView CommandItemDisplay="Bottom" DataKeyNames="ID,AmendmentId,AgreementAmendmentID" EditMode="PopUp" >
            <EditFormSettings>
                    <PopUpSettings Modal="true" ZIndex="100010" />
            </EditFormSettings>           
</Columns>
                <EditFormSettings UserControlName="UserControls/ReviewCommittee/ReviewCommitteeAddEditAmendmentControl.ascx" EditFormType="WebUserControl">
                    <EditColumn UniqueName="EditCommandColumn1">
                    </EditColumn>
                </EditFormSettings>
     </MasterTableView>
 
USERCONTROL
<table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none"
    style="border-collapse: collapse;">
    <tr class="EditFormHeader">
        <td colspan="2">
            <b><%# GetTranslation("ReviewCommitteeAgreementAmendments", True)%></b>
        </td>
    </tr>
    <tr>
        <td>
            <table id="Table3" border="0">
                <tr>
                    <td><strong><%# GetTranslation("ProgramArea", True)%></strong>
                    </td>
                    <td>
                        <telerik:RadComboBox ID="ProgramAreaCombobox" runat="server" DropDownWidth="350"
                                        AutoPostBack="true" CausesValidation="false"
                                        SelectedValue='<%# DataBinder.Eval(Container, "DataItem.ProgramAreaId") %>'
                                        ZIndex="100011"
                                        EmptyMessage='<%#GetTranslation("PleaseSelect", False)%>' Width="250"
                                        LoadingMessage="Loading ...">
                        </telerik:RadComboBox>
                    </td>
                </tr>
                <tr>
 
 
 
                    <td colspan="2"> </td>
                </tr>
 
                <tr>
                    <td><strong><%# GetTranslation("Amendment", True)%></strong>
                    </td>
                    <td>
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                        <telerik:RadComboBox ID="AgreementAmendmentComboBox" runat="server"
                                        DropDownWidth="500" ZIndex="100011"
                                        SelectedValue='<%# DataBinder.Eval(Container, "DataItem.AgreementAmendmentId") %>'
                                        EmptyMessage='<%#GetTranslation("PleaseSelect", False)%>' Width="250"
                                        LoadingMessage="Loading ..." Enabled="false">
                        </telerik:RadComboBox>
                        <asp:RequiredFieldValidator ID="reqAgreementAmendment" runat="server" ErrorMessage='<%#GetTranslation("Required", False)%>'
                                ControlToValidate="AgreementAmendmentComboBox" ForeColor="Red" Font-Size="X-Small" Font-Bold="true" Display="Dynamic"  >
                        </asp:RequiredFieldValidator>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                    </td>
                </tr>
 
                <tr>
                    <td colspan="2"> </td>
                </tr>
                <tr>
                    <td>
                        <strong><%# GetTranslation("ReviewOrder", True)%></strong>
                    </td>
                    <td>
                        <asp:TextBox ID="ReviewOrder" runat="server" Width="70" Text='<%# DataBinder.Eval(Container, "DataItem.Order") %>'></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqReviewOrder" runat="server" ErrorMessage='<%#GetTranslation("Required", False)%>'
                                ControlToValidate="ReviewOrder" ForeColor="Red" Font-Size="X-Small" Font-Bold="true"  Display="Dynamic" >
                        </asp:RequiredFieldValidator>
                    </td>
                </tr>
            </table>
    <tr>
        <td colspan="2"></td>
    </tr>
    <tr>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td align="right" colspan="2">
            <asp:Button ID="btnUpdate" Text='<%#GetTranslation("Update", False)%>'  runat="server" CommandName="Update" Visible='<%# Not (TypeOf DataItem Is Telerik.Web.UI.GridInsertionObject) %>'></asp:Button>
            <asp:Button ID="btnInsert" Text='<%#GetTranslation("Insert", False)%>'  runat="server" CommandName="PerformInsert"
                Visible='<%# (TypeOf DataItem Is Telerik.Web.UI.GridInsertionObject) %>'></asp:Button>
              
            <asp:Button ID="btnCancel" Text='<%#GetTranslation("Cancel", False)%>'  runat="server" CausesValidation="False"
                CommandName="Cancel"></asp:Button>
        </td>
    </tr>
</table>

USERCONTROL

The Page Load fires, the Selected = tru Fires but when the page Loads, my Combos both say 'Please Select'.  If Not Page.IsPostback does not help as every click is a Postback.
I have the exact same probem here

Private Sub ProgramAreaCombobox_SelectedIndexChanged(sender As Object, e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles ProgramAreaCombobox.SelectedIndexChanged
 
        If Not String.IsNullOrWhiteSpace(e.Value) Then
            AgreementAmendmentComboBox.DataSource = GetAgreementAmendments(ProgramAreaCombobox.SelectedValue)
            AgreementAmendmentComboBox.DataBind()
            AgreementAmendmentComboBox.Enabled = True
        End If
 
    End Sub

becuase the code always sees e.value as nothing.

Ideas?

 
Tim
Top achievements
Rank 1
 answered on 18 Feb 2015
1 answer
957 views
Hey,

I have a Problem with following grid (trimmed down to the essential parts only). On a RadTextBox-Enter I want to call a JavaScript function, which calls the onClick function of  a button with ID "btnSearch". This it how it Looks like

<script type="text/javascript">
    function OnKeyPress(sender, args)
    {
        if (args.get_keyCode() == 13)
        {
            // find button "btnSearch" and click it
            var buttonTmp = $find("<%= btnSearch.ClientID %>");
            buttomTmp.click();
        }    
    }
</script>
 
<telerik:RadGrid runat="server" ID="grid1" GridLines="None" ShowFooter="False" Culture="de-DE">
    <MasterTableView AutoGenerateColumns="False" AllowMultiColumnSorting="True" CommandItemDisplay="Top">
        <CommandItemTemplate>
            <telerik:RadToolBar ID="radToolBar" Skin="Windows7" runat="server" AutoPostBack="true" Width="100%">
                <Items>
                    <telerik:RadToolBarButton Value="section1"  CssClass="rightAligned">
                        <ItemTemplate>
                            <telerik:RadButton runat="server" Skin="Windows7" Text="ButtonText1" CommandName="ButtonCommand1" OnClick="buttonAction1_Click"/>
                        </ItemTemplate>
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton IsSeparator="True" />
                    <telerik:RadToolBarButton Value="section2">
                        <ItemTemplate>
                            <telerik:RadTextBox ID="textbox1" runat="server" Skin="Windows7"><ClientEvents OnKeyPress="OnKeyPress" /></telerik:RadTextBox>
                            <telerik:RadButton ID="btnSearch" runat="server" Skin="Windows7" Text="Search" CommandName="Search" OnClick="searchButton_Click"/>
                        </ItemTemplate>
                    </telerik:RadToolBarButton>
                </Items>
            </telerik:RadToolBar>
        </CommandItemTemplate>
    </MasterTableView>
    <GroupingSettings CaseSensitive="False" />
</telerik:RadGrid>


Unfortunately, this does not seem to work, since the $find cannot find the button. I also tried to find it like this

var grid = $find("<%= activePassiveGrid.ClientID %>");
var MasterTable = grid.get_masterTableView();
var toolBar = MasterTable.get_dataItems()[0]......

But I don't get down to the button. Can anyone please lend me some helping hand to find and call my Button?
Fenris
Top achievements
Rank 1
 answered on 18 Feb 2015
0 answers
73 views
We are having Problems with Registration of the Custom Skins in our Project [ Downloaded (.ZIP) from the Telerik Skin Builder ]

We have used every approach discussed in the forums for the registration of the Custom Skins build by our self, but nothing seems to be working. We want Our own skin to be used in the RadControlls but our Skin Based on "Metro" dosen't appear in the Skin options

We also followed these link:

http://www.telerik.com/forums/tool-for-embedding-custom-skins-into-an-assembly
http://www.telerik.com/help/aspnet-ajax/introduction-skin-registration.html

Used every tool that's provided but nothing is helping to accomplish our goals.If anyone can help in resolving our issue. That would be very Kind. We have also 
Yasir
Top achievements
Rank 1
 asked on 18 Feb 2015
4 answers
182 views
Hi,

Since adding a detail table to my master table, the exporting of data from the master table to CSV has become very slow. I temporarily removed the detail table and the export worked fine. I came across this forum thread http://www.telerik.com/forums/how-to-suppress-detailtable-bind-when-exporting but setting the hierarchyloadmode has not made any difference. I do not have the hierarchyloadmode set anywhere else, so it's just using the default setting.

Here is the code for the RadGrid export:

Protected Sub lnkbtndownloaddata_Click(ByVal sender As Object, ByVal e As System.EventArgs)
RadGrid1.MasterTableView.HierarchyLoadMode = GridChildLoadMode.ServerOnDemand
RadGrid1.ExportSettings.IgnorePaging = True
RadGrid1.MasterTableView.ExportToCSV()
End Sub

Like I said, setting the hierarchyloadmode has not made any difference to the speed of exporting.

Is there anything else I could try? Is there a way to temporarily disable the detail table prior to exporting?

Regards

Tim
Danny
Top achievements
Rank 1
 answered on 18 Feb 2015
6 answers
391 views
Hi,

I would like to show/hide context menu items based on some properties of the appointment.  Context menu items are added from server side code. I am using javascipt and webservice to do this. When I call the client side script "CheckTimerStatus" , it overrides the built in JS fxn that toggles the contextmenu. How can I make both codes execute without affecting each other.

I am calling  OnClientAppointmentContextMenu="CheckTimerStatus"


function  CheckTimerStatus (sender, eventargs){
  // hide/display contextmenuitems

}

 protected void rsTicketsSchedule_DataBound(object sender, EventArgs e)
    {
       
        //AddMenuItemsToConetxtMenu
         ...........   Logic to add context menu based on some properties....

}



Thanks,
Prava
Boyan Dimitrov
Telerik team
 answered on 18 Feb 2015
1 answer
243 views
Hi, I'm trying to hide the context menu in the OnClientAppointmentContextMenu event , but i don't find the way to get that. I have found only the way of hide the menu items and disabled the context menu . If you know how hide and show the context menu , please help me with the solution.
Thanks in advanced

sender.get_appointmentContextMenus()[0].set_enabled(false);  //THIS CODE DISABLED THE MENUCONTEXT

var items = sender.get_appointmentContextMenus()[0].get_items(); //THIS CODE HIDE A MENU ITEM
items.getItem(0).hide();

How can I hide the contextmenu????
Nencho
Telerik team
 answered on 18 Feb 2015
1 answer
118 views
Hello,

I am using Telerik Version 2011.1.413.35.

I am facing problem in RadGrid filter option like mentioned here -
1. 'EqualTo' , 'NotEqualTo' , 'Between' and 'NotBetween'  search criteria are not working.
2. 'GreaterThan' search filter is showing result for 'greater than or equal to' search criteria.
3. 'LessThanOrEqualTo' search filter is showing result for 'LessThan' search criteria.

After searching I have found few solutions like below URL, but those gave me no luck.
http://www.telerik.com/help/aspnet/grid/grdfilteringfordatetimecolumnwithdataformatstring.html

Can you please provide me any workable link or bunch of code which may help me to overcome the Telerik RadGrid Filter issue mentioned above.

This is kind of urgent.

Thanks in advance.

Sajal Halder
20-20 Technologies Inc.
Maria Ilieva
Telerik team
 answered on 18 Feb 2015
1 answer
199 views
I have a RadGrid and am using an EditForm for Inserting/Updating. The edit form type is a popup. In the EditForm, I call the ItemCommand code behind function this way:

<telerik:RadButton  CommandName="PerformInsert" ID="rbAddSubscription" runat="server" Text="<%$ Resources: global, string_addSubscription%>" OnClientClicking="btnAddSubscription"></telerik:RadButton>

It works fine. The row gets added to the DB, I rebind the grid, and all is well. But if I then refresh the browser page, the ItemCommand code behind function runs, and inserts the row again. The edit popup is closed. If I debug the ItemCommand during the page refresh, the CommandName is "PerformInsert". I've tried to clear the edit indexes, setting e.canceled = true, etc., but it stays the same. The popup form is not longer open, which is right. The the CommandName were no longer "PerformInsert", my problem would go away, as I'm checking for that in the ItemCommand.

Any insight would be very much appreciated.

 
Maria Ilieva
Telerik team
 answered on 18 Feb 2015
1 answer
190 views
I've searched the forum and come across these two threads which are exactly what I experienced, that is, the yellow dots blink and eventually stay solid near the end of the upload, and then IE freezes over and you can't click on anything (nor go to another tab) and the browser must be shut down.

http://www.telerik.com/forums/radasyncupload-blinking-yellow
http://www.telerik.com/forums/radasyncupload-1fc6f6296712

Points:
It only happens to IE11. Earlier versions work.
It doesn't always happens but it happens often enough (at least 1/2 times. Occassionally I can upload successfully)
  -this indicates to me that it's not an authentication issue? My site has Windows authentication only.
File location is a network drive (not sure if this is relevant)
Chrome browser always works without any issues. Only IE11.

When it happens the only way to quit is to shut down the browser by Windows Task manager.

Any help please? This has been going on for a while. I'm using 2014Q3.

Many thanks in advance.
Peter Filipov
Telerik team
 answered on 18 Feb 2015
6 answers
791 views
The text editing area of the editor seems to have about 3 lines worth of white space at the top that I can't reach or get rid of. I've tried various settings and width/height combinations but there is always that empty white space at the top. The code for the Editor I am using is enclosed below along with a screen capture. Thanks for any help in getting rid of the white space at the top.

<telerik:RadEditor ID="raeMessage" Runat="server" Width="340px"
Height="300px" EmptyMessage="Please type your message here..." MaxHtmlLength="10000" AutoResizeHeight="True" EditModes="Design" EnableResize="False">
<Tools>
<telerik:EditorToolGroup Tag="MainToolbar">
<telerik:EditorTool Name="FindAndReplace" RenderMode="Classic" />
<telerik:EditorSeparator RenderMode="Classic" />
<telerik:EditorSplitButton Name="Undo" RenderMode="Classic">
</telerik:EditorSplitButton>
<telerik:EditorSplitButton Name="Redo" RenderMode="Classic">
</telerik:EditorSplitButton>
<telerik:EditorSeparator RenderMode="Classic" />
<telerik:EditorTool Name="Cut" RenderMode="Classic" />
<telerik:EditorTool Name="Copy" RenderMode="Classic" />
<telerik:EditorTool Name="Paste" RenderMode="Classic" ShortCut="CTRL+V / CMD+V" />
</telerik:EditorToolGroup>
<telerik:EditorToolGroup Tag="Formatting">
<telerik:EditorTool Name="Bold" RenderMode="Classic" />
<telerik:EditorTool Name="Italic" RenderMode="Classic" />
<telerik:EditorTool Name="Underline" RenderMode="Classic" />
<telerik:EditorSeparator RenderMode="Classic" />
<telerik:EditorSplitButton Name="ForeColor" RenderMode="Classic">
</telerik:EditorSplitButton>
<telerik:EditorSplitButton Name="BackColor" RenderMode="Classic">
</telerik:EditorSplitButton>
<telerik:EditorSeparator RenderMode="Classic" />
<telerik:EditorDropDown Name="FontName" RenderMode="Classic">
</telerik:EditorDropDown>
<telerik:EditorDropDown Name="RealFontSize" RenderMode="Classic">
</telerik:EditorDropDown>
</telerik:EditorToolGroup>
</Tools>
<Content>
</Content>
<TrackChangesSettings CanAcceptTrackChanges="False" />
</telerik:RadEditor>
Ianko
Telerik team
 answered on 18 Feb 2015
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?