Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
114 views
We are using RadContextMenu in our product.
I am using Contextmenu within Repeater, The problem I am facing is, I have tried to add client side events in itemdataboud and itemcreated but nothing works.
I am adding it like:
 contextMenu.Attributes.Add("OnItemClicked","return test1();");

But the test1 has never fired.
Note here that I don't care about sender and args parameters.
Can someone please tell me how to add client side attribute in server side code, although the above statement worked for other radcontrols like RadNumericTextbox.

Any help will be greatly appreciated, I have tried to find solutions for many hours now but nothing help, please.
Shinu
Top achievements
Rank 2
 answered on 18 Feb 2014
9 answers
956 views
I have a scenario where I have a RadTabStrip with 2 tabs and a RadMultiPage with 2 pages.  In the first page I have a RadGrid and the second page is a form. I am using RadAjaxManager to ajaxify the page. I want to be able to click an edit link from the RadGrid and have the multipage and tabstrip change to the form page.

The problem I am having is when I click on edit, the RadMultipage changes, but the RadTabStrip does not. If I take the RadAjaxManager out then it works correctly.

I have replicated the problem using a simple setup with just buttons in each page. Clicking the button should change both the RadTabStrip and RadMultipage.

Here is my aspx code
    <telerik:RadTabStrip ID="RadTabStrip1" runat="server"   
        MultiPageID="RadMultiPage1">  
        <Tabs> 
            <telerik:RadTab runat="server" Text="List">  
            </telerik:RadTab> 
            <telerik:RadTab runat="server" Text="Form">  
            </telerik:RadTab> 
        </Tabs> 
    </telerik:RadTabStrip> 
    <telerik:RadMultiPage ID="RadMultiPage1" runat="server">  
        <telerik:RadPageView ID="RadPageView1" runat="server">  
            List View<br /><br /> 
            <asp:Button ID="Button1" runat="server" Text="Go to Form View" /> 
         </telerik:RadPageView> 
        <telerik:RadPageView ID="RadPageView2" runat="server" Width="100%">  
            Form View<br /><br /> 
            <asp:Button ID="Button2" runat="server" Text="Go to List View" /> 
         </telerik:RadPageView> 
    </telerik:RadMultiPage> 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"   
        Skin="Default" Transparency="1">  
    </telerik:RadAjaxLoadingPanel> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"   
        DefaultLoadingPanelID="RadAjaxLoadingPanel1">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadTabStrip1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" /> 
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="RadMultiPage1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" /> 
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
 

Here is the code behind
    Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load  
 
        If Not Page.IsPostBack Then 
            RadTabStrip1.SelectedIndex = 0  
            RadMultiPage1.SelectedIndex = 0  
        End If 
    End Sub 
 
    Protected Sub Button1_Click(ByVal sender As ObjectByVal e As System.EventArgs) Handles Button1.Click  
        RadTabStrip1.SelectedIndex = 1  
        RadMultiPage1.SelectedIndex = 1  
    End Sub 
 
 
    Protected Sub Button2_Click(ByVal sender As ObjectByVal e As System.EventArgs) Handles Button2.Click  
        RadTabStrip1.SelectedIndex = 0  
        RadMultiPage1.SelectedIndex = 0  
    End Sub 
 

If I take out the RadAjaxManager it works correctly.
Using the RadAjaxManager the RadTabStrip does not update.  Any ideas?

p.s. I have tried this with version 2009.2.701.20,  2009.2.826.20, 2009.3.1103.20 of  Telerik.Web.UI
Ambarish
Top achievements
Rank 1
 answered on 18 Feb 2014
1 answer
83 views
I have a RadGrid driven by a LinqToSQL data layer that returns a dataset for binding.  I also have custom paging implemented.  Under normal conditions the data layer only returns a page's worth of data, 10 to 15 records.  If a filter is entered, custom paging is turned off and the entire data set is returned.  Normally this is not a burden as the total data set is usually around 100 records or so and the users know that filtering slows things down a bit.

However I've just seen some behavior I can't explain.   The field most likely to be filtered on is a varchar(max), although for display purposes only the first 75 char are displayed. 

The problem is as follows: The filter works but only if a Refresh of the grid is done first.  (i.e. doing 2 filters in a row will not work.)  Otherwise it seems to hang. 
I've seen this same problem using both old and new versions of the RadGrid.  (Our production version is running a 2012 version.  I have the latest on my development machine.)  

What could I be missing?


As currently implemented the Refresh button calls the following code.
  
                RadGrid1.MasterTableView.SortExpressions.Clear();

                // Clear all filters
                foreach (GridColumn column in RadGrid1.MasterTableView.OwnerGrid.Columns)
                {
                    column.CurrentFilterFunction = GridKnownFunction.NoFilter;
                    column.CurrentFilterValue = string.Empty;
                }

                RadGrid1.MasterTableView.FilterExpression = string.Empty;

                RadGrid1.Rebind();
Princy
Top achievements
Rank 2
 answered on 18 Feb 2014
16 answers
298 views
Hi,
we are facing issue in radeditor hyperlink manager.
I tried setting the target window for the link using hyperlink manager. No matter which option you choose, the link only opens in a 'new window'. The other choices available in hyperlink manager such as 'same window ' or 'parent window' do not work.

by default 'target' value is getting saved as  'new window', when i am choosing any other options like 'parent window 'and after clicking ok it is modified as 'new window'. when I reopen the hyperlink manager I am only getting 'new window' but not the previous option what i have chosen.
can any one help me in finding the solution. currently we are using telerik version '2012.2.912.35' and i have given the EditModes="Design".

Thanks.
Ianko
Telerik team
 answered on 18 Feb 2014
1 answer
79 views
hi,



In editor I am trying to write some content. In that some words are
place on right hand side using tab key (i.e 4 time &nbsp;).

At design time it display properly but when I print that document the
right hand side words goes to  the next line or some time it comes in
middle of the page.

how I can solve this alignment problem??
Please check attachment images
"after print" : image after print content of editor on a4 page.
"Before print" : image at time of design in editor.


thank you.
Ianko
Telerik team
 answered on 18 Feb 2014
1 answer
175 views
Hi,

I have a MasterPage that opens a RADWindow in Model Window. Then when the user click on a new button in the RadWindow, it opens another RadWindow on top with no problem. However I can not set the skin of the 2nd RADWindow.

function GetRadWindow() {
    var oWindow = null;
    if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz az well)
    return oWindow;
}
function NewStatus() {
    var oManager = GetRadWindow().get_windowManager();
    setTimeout(function () {
        var winId = "Win" + Math.random().toString();
        var winPage = "AddStatus.aspx" + winId;
        var oNew = oManager.open("", "Window2");
        oNew.setUrl(winPage);
        oNew.SetSize(750, 550);
        oNew.set_visibleStatusbar(false);
        oNew.set_title("Status Screen");
        oNew.Skin = "Forest";
        oNew.set_keepInScreenBounds(true);
        oNew.set_enableShadow(true);
        oNew.set_destroyOnClose(true);
        oNew.set_animation(Telerik.Web.UI.WindowAnimation.Slide);
        oNew.set_initialBehaviors(Telerik.Web.UI.WindowBehaviors.None);
        oNew.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close);
        oNew.add_close(OnClientCloseHandler);
        oNew.setActive(true);
        oNew.set_modal(true);
        oNew.Show();
    }, 0);
}

Am I missing something? What is the correct way of getting the result needed ? 
Shinu
Top achievements
Rank 2
 answered on 18 Feb 2014
3 answers
807 views
I have a simple radgrid that has one GridColumnGroup that displays above 4 bound columns.
------------------------------
<ColumnGroups>
<telerik:GridColumnGroup HeaderText="Reporting Period" Name="ReportingPeriod"/>
</ColumnGroups>

<telerik:GridBoundColumn DataField="Numerator" HeaderText="Numerator" UniqueName="Numerator"  ColumnGroupName="ReportingPeriod" />

That is all, there is no "grouping", etc. It is purely for display.

Is there a way to  change the HeaderText of the GridColumnGroup dynamically? I cannot seem to be able to access it on itemdatabound, or any other way. I want to change the text to a "value", but there is no way to reference it? (to the reporting period dates dynamically)
Any help would be appreciated.
Thanks


Princy
Top achievements
Rank 2
 answered on 18 Feb 2014
1 answer
169 views
Hi,

I am having a rad grid in my parent page. I am trying to access that from the usercontrol which is inside that page. But it is always giving nothing. Please help me out.
The code i am using inside my usercontrol is

Dim radGrid as RadGrid=CType(Page.findControl("radGrid_ID"),RadGrid)

Please reply soon
Shinu
Top achievements
Rank 2
 answered on 18 Feb 2014
6 answers
678 views
I thought this would be straight forward, but doesnt look like and i have been trying for a while now. 

I have a usercontrol on a web page. The web page also has a Telerik RadGrid. On the usercontrol, i am submitting some information and on success, i need to access the RadGrid from the usercontrol and rebind the RadGrid.

I have been trying the following code in UserControl, but i get 'Nothing'

Parent.Page.FindControl("RadGrid_Numbers")


Can someone please help? I am not sure what i am missing here.
first
Top achievements
Rank 1
 answered on 18 Feb 2014
2 answers
126 views
Hi,
    I am kinda stuck with multiple timeslot selection, like that of outlook. Although it highlights all the selected timeslot but then I am not able to find out the date selected.

Since I am using my own UserControl I disabled Insert/Edit/Delete of Radscheduler, so FormCreated wont' be fired.
I am using RadAjaxManager for server side event. In my Client event  
OnClientTimeSlotContextMenuItemClicked="OnClientTimeSlotContextMenuItemClicked"

 
function OnClientTimeSlotContextMenuItemClicked(sender, eventArgs) {<br><br>                var menuItem = eventArgs.get_item();<br>                var timeSlot = eventArgs.get_slot();<br>                if (menuItem != null) {<br>                    var selectedMenuItem = menuItem._properties._data.value;<br>                    if (selectedMenuItem == "createTimesheet") {<br><br><br>                    } else if (selectedMenuItem == "createTodo") {<br><br>                    } else if (selectedMenuItem == "AllDay") {<br>                        var radWindow = $find("<%=rWindowAppointmentInsert.ClientID %>");<br>                        radWindow.show();<br>                        var startDate = new Date(timeSlot._startTime);<br>                        var duration = timeSlot.get_durationInMinutes();<br>                        var arg = "Type=AllDay,Start=" + timeSlot._startTime.toDateString() + " " + startDate.getHours() + ":" + startDate.getMinutes();<br>                        arg += ",Duration=" + duration;<br>                        $find("<%=rAjaxMgrScheduler.ClientID %>").ajaxRequest(arg);<br>                        return false;<br>                    } else if (selectedMenuItem == "Insert") {<br>                        var radWindow = $find("<%=rWindowAppointmentInsert.ClientID %>");<br>                        radWindow.show();<br>                        var startDate = new Date(timeSlot._startTime);<br>                        var duration = timeSlot.get_durationInMinutes();<br>                        var arg = "Type=Insert,Start=" + timeSlot._startTime.toDateString() + " " + startDate.getHours() + ":" + startDate.getMinutes();<br>                        arg += ",Duration=" + duration;<br>                        $find("<%=rAjaxMgrScheduler.ClientID %>").ajaxRequest(arg);<br>                        return false;<br>                    } else { <br>                    <br>                    }<br>                }<br>                return false;<br>            }
I cannot find how to get start and end date.

Thank you



Lakpa
Top achievements
Rank 1
 answered on 17 Feb 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?