Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
382 views
Hello,

I've been reading up on the documentation of the RadMenu and the RadContextMenu, and am having trouble with a client-side call to RadContextMenuItem.click() performing a regular postback as if the mouse had clicked it.  This is the code I have:

                var menu = selectedNode.get_contextMenu(); 
                var item = menu.get_focusedItem(); 
                if (item) { 
                    alert("clicking '" + item.get_text() + "'"); 
                    item.click(); 
                } 
 

I am particularly trying to get this to work with a TreeView.  When I activate the context menu and tell it to show(), I also have it set to automatically focus the first item in the context menu so the keyboard arrows will function to select the desired item.  Then I have code set so when the enter key is pressed, it executes the above sample code.  The only problem is that when it gets to item.click() it doesn't do a post back.  The contextmenu remains open as if nothing happened.  The alert appears, telling me which item it is clicking (I just inserted that to make sure it was finding all the objects ok) but nothing else happens.

I am using the Q2 2008 ASP.NET Ajax controls.  Am I doing something wrong?
David
Top achievements
Rank 1
 answered on 27 Feb 2009
2 answers
79 views
Every time I sort all my selections go away on a grid. Is there a way to prevent this?
Dan
Top achievements
Rank 1
 answered on 27 Feb 2009
2 answers
180 views
How do I get the new date selected by the user? With the following code when I click on a date I keep on getting the date I assigned in pageload. The value never changes. What am I missing?? I just want to get the date the user selects on the calendar control.

Why does  e.SelectedDates has always one date in it and that date is the one I assign in pageload.?? I just the need the date, it should be straight forward.



<telerik:RadCalendar ID="telerikCalendar" runat="server" Font-Names="Arial,Verdana,Tahoma"
                ForeColor="Black" Style="border-color: #ececec"
                OnSelectionChanged="SelectedDateChange" EnableMultiSelect="false"
                AutoPostBack="true">
                    </telerik:RadCalendar>

In PageLoad:
if( !IsPostBack )
        {
            telerikCalendar.SelectedDate = DateTime.Now;
                 
          }




protected void SelectedDateChange(object sender, Telerik.Web.UI.Calendar.SelectedDatesEventArgs e)
    {
        
       DateTime t = (DateTime) telerikCalendar.SelectedDate;
        if ( e.SelectedDates.Count > 0)
        {
            strDateSelected = e.SelectedDates[0].Date.ToString();
         
        }
    }

It has been 7 hours since I posted my question and I have got no response yet. That is very disappointing.
Mo
Top achievements
Rank 1
 answered on 27 Feb 2009
2 answers
138 views
We created a website for one of our clients using the AspDotNetStorefront which includes the RadEditor in the admin portal for managing page content on the site.

We are running into an issue of Flash plugin detection on the home page using the Flash Manager feature in the RadEditor.  I put in a forum post on the AspdotNetStorefront site but no one has replied to it (http://forums.aspdotnetstorefront.com/showthread.php?t=15901).  I thought maybe you could help since it is your component.

We were originally using the following code using the SWFObject which detects the version of the Flash plugin or the absence of a plugin altogether:

<!-- FLASH -->
<div id="main-flash">
<!-- Flash not installed -->
<a href="http://get.adobe.com/flashplayer/" target="_blank"><img src="images/NoFlash.gif" width="960px" height="380px" /></a>
</div>
<script type="text/javascript">
var so = new SWFObject("images/flash/Intro.swf", "sotester", "960", "380", "9", "#ffffff" );
so.addParam("wmode", "opaque");
so.write("main-flash");
</script>
<!-- END FLASH -->

But in order for the client to be able to change the content themselves in the RadEditor they need to use the Flash Manager which adds a flash file to the rich content area in an embed tag as seen below.  

<embed pluginspage=http://www.macromedia.com/go/getflashplayer align=baseline src=/images/flash/NewIntro.swf width=960 height=380 type=application/x-shockwave-flash bgcolor="" salign="LT" quality="high" menu="false" loop="false"></embed>

Well, once in an embed tag, the SWFobject code no longer works and there is no flash detection.  So what i need to know is can we modify the RadEditor code to be able to spit the HTML out in the format of the code I included first above?  And if so, where would we do that since the storefront only contains the Editor .ascx pages and a RadEditor.Net2.dll

Any help on this would be much appreciated! we were on a client deadline to put this live today and now we are in a jam.  Thank you so much if you can help!
Lori
Top achievements
Rank 1
 answered on 27 Feb 2009
1 answer
171 views
Hi. I've migrated grid: radgrid.net2 > telerik.web.ui.
In the previous version grid object contains the "skipnspath" property (normally ~/RadControls/Grid/Skins). In the new version where can i modify/customize skins?

john
Dimo
Telerik team
 answered on 27 Feb 2009
4 answers
83 views
Hi, I have Radwindow with a RadGrid inside. I have a RadUpload in one of the columns of the grid and am trying to persist the value of the file selected by storing it in a hidden field on the OnClientFileSelected event of the Upload.

My javascript to do this

function SaveUploadFile(radUpload, eventArgs)
        {
                var obj = document.getElementById("hidden_field_id");
                obj.value = radUpload._fileInput.value;
        }

Now the getElementById is returning null when the OnClientFileSelected event fires. I have looked for a while for a solution and am wondering if it has to do with the fact that nothing in the Rad Window shows on the page source of the page. Would this prevent the javascript function from being able to find my hidden field id?

Thanks,
Abram
Abram
Top achievements
Rank 1
 answered on 27 Feb 2009
1 answer
169 views
Code is being written in C# for a Web App that is .net 2.0 framework

Right now I'm taking XML and parsing it into a DataTable in the code behind . Then I set the datasource

RadGrid1.DataSource = dataTable;
RadGrid1.DataBind();

Now it shows up correctly on my page. I have Edit and Delete buttons set up on that same table.

Yet when I click on the edit button my table disappears, as in, it turns to a black line. Which I assume means it lost it's data.

Where am I going wrong here?


Daniel
Telerik team
 answered on 27 Feb 2009
1 answer
81 views
Greetings,

I'm using RadGrid within a Sharepoint webpart. On the details table I have two rows set with the following:

   

boundColumn = New GridBoundColumn()  
boundColumn.DataField = "Field" 
boundColumn.HeaderText = "Text" 
boundColumn.AutoPostBackOnFilter = True 
boundColumn.CurrentFilterFunction = GridKnownFunction.StartsWith  
boundColumn.HeaderStyle.ForeColor = White 
boundColumn.FilterControlWidth = Unit.Pixel(25)  
.Columns.Add(boundColumn) 

 

All the properties get set during runtime except for FilterControlWidth. Any idea why it wouldn't get set?

Dimo
Telerik team
 answered on 27 Feb 2009
2 answers
101 views
Hi All,
I have a custom button on a RadEditor Toolbar,  which works fine on client side,
however I need to call a call a server side event or method.
I have the standard Asp.net Ajax controls, ie.  scriptmanager and the update panels.
If you could please provide an example or steps to handle this that would be appreciated.
Thank you in advance
~Julie
Julie
Top achievements
Rank 1
 answered on 27 Feb 2009
4 answers
195 views
I use a RadComboBox
when a RadComboBox is disabled, its text is gray.
Customer want the the text sytle of the disabled RadComboBox is normal(not gray just as the color that RadComboBox is enable)

How can i implement it whit RadComboBox?

I have a solution that setting  RadComboBox enable, but when you click the right image to display its items, nothing will happen.
so that the RadComboBox looks like is disabled but its color is normal.
can I add some javascript to achieve this?
charles
Top achievements
Rank 1
 answered on 27 Feb 2009
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?