Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
229 views
My editor has the test html below. I created a custom button to display the nodeName for any selected html element. If I select the outer div I get "DIV" as the nodeName. However if I select the inner div, I get "BODY" as the nodename. I was expecting "DIV". I need to get a reference to that div so I can change some of its attributes/

JavaScript for Command List:

alert(editor.getSelectedElement().nodeName);

Content in editor:

<div style="border-right: red 1px solid; border-top: red 1px solid; border-left: red 1px solid; width: 400px; border-bottom: red 1px solid; height: 400px" id="outerdiv">
<div id="innerdiv" style="border-right: blue 1px solid; border-top: blue 1px solid; margin: 30px; border-left: blue 1px solid; width: 300px; border-bottom: blue 1px solid; height: 300px">this is a  test</div>
</div>


abdu

Tervel
Telerik team
 answered on 17 Jun 2009
0 answers
83 views
Hi,
In our project, we need to have a tool bar with some buttons at the root level( say button1,button2,dropdownbutton3) .In turn Dropdownbutton3 has a button called button4. So far this  goes very well. Now the problem comes if I wan to appear some button next to it when the users clicks on button4.  Has anybody done something like this with a RadToolbar ?

Thanks
Dineth
Top achievements
Rank 1
 asked on 17 Jun 2009
2 answers
192 views
Hi ,
         I am generating docks dynamically. I need to access the custom command css class on the client side so tht i am able to change the image whenever custom command is clicked. Is this possible.

Any ideas ??


thanks

Ajit
ajit
Top achievements
Rank 1
 answered on 17 Jun 2009
5 answers
229 views

hallo, 

how can i reload the page after i insert or add appointment in scheduler ?

i have tried with : OnAppointmentInsert="insertUpdate"

 protected void insertUpdate(object sender, Telerik.Web.UI.SchedulerCancelEventArgs e)
{
Response.Redirect("Action.aspx");
}

Action.aspx is the page that contain Scheduler.

i have tried also with OnAppointmentCreated...but all not work.

thanx in before,

Stev

Veselin Vasilev
Telerik team
 answered on 17 Jun 2009
6 answers
1.0K+ views
Hi

We're currently allowing our users to export data in a RadGrid to Excel using the RadGrid1.MasterTableView.ExportToExcel() method.  The users can group the data in the grid while using the web application.  We need to make a few modifications to the grid - both structure and data - when the users clicks an 'Export to Excel' button.

While we know how the logic for making the changes below, our big issue is that none of these changes take effect during the 'Export to Excel' button click event.

We're facing a few issues:

1. For the export we need to normalise the grid, removing any grouping, to a flat structure (i.e. columns and rows only).  This includes making a column visible that's not visible while the grouping is in effect.

2. The grid contains images (eg. a check mark for a boolean field).  All the images appear as broken links in the Excel file.  We'd like to simply replace the image with a 'Yes' / 'No' or 'True' / 'False' as text.  Note that logic depends on the boolean values returned from the database, so this replacement must be done on the fly during the export (i.e. we can't change the backing value in the grid).

3. The sortable columns have column names displayed in hyperlinks in the Excel file.  While they work fine in the browser, they are broken in the Excel file.  We need to switch the hyperlink off and just have normal text headings (in bold possibly?).

4. Command line (specified as a CommandItemTemplate) appears in the spreadsheet.  We need to prevent this from appearing.

5. When opening the Excel file, the following error message appears: 'The file you are trying to open is in a different format than specified by the file extension ..' and warns the user of possible corruption and security concerns.  Although it is mentioned on http://www.telerik.com/help/aspnet-ajax/grdexport.html, it doesn't address the issue.  Is there a way to prevent this from appearing?

We've tried a number of options but to no avail.  Do we need to rebind the grid?  While testing, a grid.Rebind() causes a null exception.  Obviously any changes that are made must only apply to the exported Excel file and not have any side effect on the grid state as displayed in the browser.

We've also tried using ExportToCsv() and while this addresses some of the issues above, it doesn't help with the structure change & data modification.

Thanks
Frank
Top achievements
Rank 2
 answered on 17 Jun 2009
1 answer
148 views
Hi,
I want to move my html code:
<telerik:RadMenu ID="RadMenu1" runat="server" DataNavigateUrlField="Url"   
            DataSourceID="XmlDataSourceForMenu" DataTextField="Text" DataValueField="Value">  
</telerik:RadMenu> 
      
<asp:XmlDataSource ID="XmlDataSourceForMenu" runat="server"   
        DataFile="~/MenuConfig.xml" XPath="/Items/Item"></asp:XmlDataSource> 
to c# code.
So I wrote in Page_Load:
XmlDataSource XmlDataSourceForMenu = new XmlDataSource();  
XmlDataSourceForMenu.ID = "XmlDataSourceForMenuID";  
XmlDataSourceForMenu.DataFile = "~/MenuConfig.xml";  
XmlDataSourceForMenu.XPath = "/Items/Item";  
 
 
RadMenu1.DataSourceID = XmlDataSourceForMenu.ID;  
RadMenu1.DataNavigateUrlField = "Url";  
RadMenu1.DataTextField = "Text";  
RadMenu1.DataValueField = "Value"; 
but I get an error
"The DataSourceID of 'RadMenu1' must be the ID of a control of type IDataSource.  A control with ID 'XmlDataSourceForMenuID' could not be found. ".
How can I fix this bug?

Princy
Top achievements
Rank 2
 answered on 17 Jun 2009
2 answers
129 views
I'm having trouble getting to the RadioButtonList control that is added dynamically when the page loads.
Here's a snippet of code that creates a RadPanelItem, add a RadioButtonList control to it, and then adds that to the RadPanelBar:

Dim

 

rdiobtnList As New RadioButtonList

 

rdiobtnList.ID =

"AssignmentRadioBtnList"

 

 

For Each Assignmentsdr As DataRow In AssignmentsDataSet.Tables(0).Rows

 

RowCount += 1

 

Dim li As New ListItem

 

li.Value = Assignmentsdr.Item(

"AssignmentListID")

 

li.Text = Assignmentsdr.Item(

"Assignment")

 

li.Selected =

False

 

rdiobtnList.Items.Add(li)

 

Next

 

 

Dim AssignmentPanelItem As New RadPanelItem

 

AssignmentPanelItem.Value =

"Assignments"

 

AssignmentPanelItem.Controls.Add(rdiobtnList)

AssignmentsRadPanelBar.Items.Add(AssignmentPanelItem)

 

Here is how I have the ASPX page setup:

 

 

<telerik:RadPanelBar ID="AssignmentsRadPanelBar" Runat="server" Skin="Web20" Width="150px">

 

 

 

    <CollapseAnimation Duration="100" Type="Linear" />

 

 

 

    <ExpandAnimation Duration="100" Type="Linear" />

 

 

 

</telerik:RadPanelBar>

I've looked through the FAQ's and the Tutorials, but none of the tutorials touch on adding RADPanelItems dynamically.

Any help would be very much appreciated.

 

 

 

Christopher
Top achievements
Rank 1
 answered on 17 Jun 2009
1 answer
114 views
This does that when content is 'bigger' than the container, it just hides it instead of showing scrollbars. Happened after the last hotfix.

Any suggestions on how to solve?
Obi-Wan Kenobi
Top achievements
Rank 1
 answered on 17 Jun 2009
1 answer
91 views
I did a search on focus and found two articles, but they don't seem to apply 100%

http://www.telerik.com/community/forums/aspnet-ajax/calendar/raddatepicker-validation.aspx
and 
http://www.telerik.com/community/forums/aspnet-ajax/calendar/set-focus-after-date-selected.aspx

Both of these, it's a single DatePicker choosing a date and getting focus back.

I have about 30 dates on the page all using a hidden SharedCalendar at the top. When a user selects the date, they are sent to the top of the page.

Is there a way on the SharedCalender to send the focus back to the DatePicker that called it? Or do I need to set something on every DatePicker?

Was thinking something like..

 <telerik:RadCalendar ID="calShared" runat="server" EnableMultiSelect="false" ClientEvents-OnDateSelected="ResetFocus" />


 function ResetFocus(sender, args) {

                //sender.focus();

            } 

but that didn't work.

Veli
Telerik team
 answered on 17 Jun 2009
1 answer
97 views
hello to all expert
                    
                           good morning, i would like to ask help here coz i dont know how am i going to to put  some web control on the tabstrip, coz i tried to drag and drop the textbox inside the tab it wont allow, how can i design my tabstrip? how am i going to put my textbox, combobox, label and other control inside the radtabstrip?

sample codes is highly appreciated

thanks to all
Paul
Telerik team
 answered on 17 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?