Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
183 views
I am exploring building forms dynamically.
I have gotten pretty far but I am of course battling an issue that could kill the whole concept.

I am creating the radcombo from text in a database, using the .net reflection class

ex.

Dim

thisAssembly As [Assembly] = [Assembly].GetExecutingAssembly()

 

 

Dim RefAssembly As AssemblyName

 

 

For Each RefAssembly In thisAssembly.GetReferencedAssemblies()

 

 

Dim refAssembly2 As Assembly = [Assembly].Load(RefAssembly.FullName.ToString())

 

 

Dim ct2 As Type = refAssembly2.GetType("Telerik.Web.UI.RadComboBox")

 

 

Dim c2 As Object = Activator.CreateInstance(ct2)

 

 

....

I am able to set most properties from information in the database like so:

Dim prop As PropertyInfo = t2.GetProperty("EnableLoadOnDemand")

 

 

Dim propval2 As Object = Convert.ChangeType("True", Type.[GetType]("System.Boolean"))

 

prop.SetValue(c2, propval2,

Nothing)

 

 

However,
There is a property I would like to set that I am having trouble with.
The WebServiceSettings property is a class that does not contain a setvalue method.

I've tried creating an instance of the webservicesettings class, setting its properties and using that object to set the
webservicesettings property of the  radcombobox, but to no avail.

I considered the approach of maybe using custom attributes to hold the path and method values and setting the corresponding properties client side but I didn't see that this was possible in the documentation and figured I had spent enough time on this to warrant posting and trying to get some direction.

Thanks in advance for your help.



Atanas Korchev
Telerik team
 answered on 17 Jun 2009
3 answers
172 views

Hi All,

Im new for telerik control.Im using two radpane.In between one splitterbar is placed.if i resize the left radpane and collapse and expand the splitter i want to set the 200px to left pane and remaining space right pane will fill.

    In my case i set the left pane width as 200px but right pane i can't fill to remaining space. some white-space will be shown in right-side window.

How to resolve this issue.

Advance thanks.

Tsvetie
Telerik team
 answered on 17 Jun 2009
2 answers
132 views
I have a website that I am creating that is constructed dynamically.  The setup is fairly basic:

        <div id="container"
            <div id="top"></div> 
            <div id="leftnav"
                <Telerik:RadPanelBar ID="RadPanelBar1" Runat="server" DataFieldID="menu_Title"  
                    DataFieldParentID="menu_parent" DataNavigateUrlField="menu_NavURL"  
                    DataSourceID="SqlDataSource1" DataTextField="menu_Text"  
                    DataValueField="menu_Title" Height="100%" Skin="Panel" Width="100%"  
                    DataMember="DefaultView" ExpandMode="SingleExpandedItem" EnableEmbeddedSkins="False"  
                    OnClientItemClicked="CollapseAllItems"
                    <CollapseAnimation Type="None" Duration="100"></CollapseAnimation> 
                    <ExpandAnimation Type="None" Duration="100"></ExpandAnimation> 
                </Telerik:RadPanelBar> 
                <telerik:RadRotator ID="RadRotator1" runat="server"  
                    DataSourceID="XmlDataSource1" Width="100%" FrameDuration="6000"  
                    ScrollDirection="Left" ScrollDuration="800" Height="300px"  
                    PauseOnMouseOver="False" ItemWidth="200px"
                    <ItemTemplate> 
                        <div class="tickdetail"
                            <div class="clogo"><img src="<%# XPath("LogoFile") %>" alt=""/></div> 
                            <div class="tickdesc" style="text-align:center"
                                <telerik:RadTicker ID="Ticker1" runat="server" TickSpeed="50"
                                    <Items> 
                                        <telerik:RadTickerItem Text='<%# XPath("Description") %>' /> 
                                    </Items> 
                                </telerik:RadTicker> 
                            </div> 
                        </div> 
                    </ItemTemplate> 
                    <SlideShowAnimation Duration="1000" Type="Fade" /> 
                </telerik:RadRotator> 
                <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/Ticker.xml"
                </asp:XmlDataSource> 
            </div> 
            <div id="content" runat="server"></div> 
            <div id="SubmitDiv" runat="server"></div> 
            <div id="footer"
                <p>© Copyright 2009</p> 
            </div> 
        </div> 

The important parts are the radPanelBar and the content div.  When you select an item on the rad panel it dynamically formats the HTML into a StringBuilder  then injects that HTML into the InnerHTML of the content div.  I have the prototype for this working perfectly and now I would like to Ajaxify my application and went for the simple, AjaxManager on page with RadPanelBar1 as the control that initiates the request and the content div as the control that gets updated.

Well, it doesn't seem to work like ajax magic, so I figure I will have to do it the hard way.  Problem is I am not sure exactly what the hard way is.  Any guidance how I can achieve ajax for this?


Sebastian
Telerik team
 answered on 17 Jun 2009
30 answers
1.0K+ views
It's really confusing to see the official documentation for the Prometheus editor unchanged from the "old" editor.  The "new" documentation tells me that all of the old client-side methods are available (and don't follow ASP.NET AJAX naming conventions); but during debugging I can clearly see that none are available.  This is bad.  I really really need to fire up the Image Manager from outside the editor and in another thread (in the Futures forum) it was stated that this could be possible.  Here's hoping there's a way (now that I've changed my projects to use the new editor) to do this with the version released yesterday.
Dane
Top achievements
Rank 1
 answered on 17 Jun 2009
7 answers
168 views
I have looked for an answer to my problem, but cannot figure it out. Here is a copy of my code. When I execute it, it errors in the _FormCreated as the subjectBox is Nothing.

<telerik:RadScheduler runat="server" ID="calEvents" Width="925" ShowViewTabs="false" StartEditingInAdvancedForm="false" Skin="Office2007"
                                OnAppointmentCommand="RadScheduler1_AppointmentCommand" OnFormCreated="calEvents_FormCreated" OnFormCreating="calEvents_FormCreating">
                                    <InlineInsertTemplate>
                                    <div id="InlineInsertTemplate"> 
                                        <table cellpadding="0" class="0" runat="server">
                                            <tr>
                                                <td colspan="6">
                                                    <asp:TextBox ID="TitleTextBox" runat="server" Width="90%" TextMode="MultiLine" Height="20px"/></td></tr>
                                                   
                                            <tr>
                                                <td width="3%">
                                                    <asp:LinkButton ID="InsertButton" runat="server" CommandName="Insert">
                                                        <asp:Image runat="server" ID="insertImage" ImageUrl="~/Images/tick.png" AlternateText="insert" /></asp:LinkButton></td>
                                                <td width="7%">
                                                    <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel">
                                                        <asp:Image runat="server" ID="Image2" ImageUrl="~/Images/cancel.png" AlternateText="cancel" />
                                                    </asp:LinkButton></td>
                                                <td width="18%">
                                                    <asp:Label ID="Label7" CssClass="Normal11" runat="server" Text="Background Color" /></td>
                                                <td width="37%" valign="middle">
                                                    <asp:RadioButtonList runat="server" ID="AppointmentTypeRadioButtonList" RepeatDirection=Horizontal>
                                                        <asp:ListItem Text="Yellow" Value="Yellow"></asp:ListItem>
                                                        <asp:ListItem Text="Light Blue" Value="Light Blue"></asp:ListItem>
                                                        <asp:ListItem Text="Tan" Value="Tan"></asp:ListItem>
                                                    </asp:RadioButtonList></td>
                                                <td width="35%">
                                                    <asp:LinkButton ID="InsertMoreButton" runat="server" CommandName="AdvancedInsertOptions" CssClass="rsAdvancedEditLink">Advanced</asp:LinkButton></td>
                                            </tr>
                                        </table>
                                    </div>
                                    </InlineInsertTemplate>
                                   
                                   
                                    <AdvancedInsertTemplate>
                                    <div id="AdvancedInsertTemplate"> 

                                        <table id="Table2" cellpadding="0" class="0" runat="server">
                                            <tr>
                                                <td>
                                                    <asp:Label ID="Label8" AssociatedControlID="TitleTextBox" runat="server" CssClass="inline-label">Description</asp:Label></td></tr>

                                            <tr>
                                                <td>
                                                    <asp:TextBox ID="TitleTextBox" Rows="5" Columns="20" runat="server" Width="97%" TextMode="MultiLine"></asp:TextBox></td></tr>
                                                       
                                            <tr>
                                                <td width="3%">
                                                    <asp:Label ID="Label5" AssociatedControlID="StartInput" runat="server" CssClass="inline-label">Start time:</asp:Label></td>
                                                <td width="7%">
                                                    <telerik:RadDateInput ID="StartInput" runat="server"/></td></tr>
                                                   
                                            <tr>
                                                <td width="18%">
                                                    <asp:Label ID="Label6" AssociatedControlID="EndInput" runat="server" CssClass="inline-label">End time:</asp:Label></td>
                                                <td>
                                                    <telerik:RadDateInput ID="EndInput" runat="server"/></td></tr>
                                                   
                                            <tr>
                                                <td width="37%" valign="middle">
                                                    <asp:RadioButtonList runat="server" ID="AppointmentTypeRadioButtonListAdvanced" RepeatDirection=Horizontal>
                                                        <asp:ListItem Text="Yellow" Value="Yellow"></asp:ListItem>
                                                        <asp:ListItem Text="Light Blue" Value="Light Blue"></asp:ListItem>
                                                        <asp:ListItem Text="Tan" Value="Tan"></asp:ListItem>
                                                    </asp:RadioButtonList></td></tr>
                                                   
                                            <tr>
                                                <td width="35%">
                                                    <asp:LinkButton ID="InsertButton" runat="server" CommandName="Insert"/></td>
                                                <td width="3%">
                                                    <asp:LinkButton ID="UpdateButtonAdvanced" runat="server" CommandName="Insert">
                                                        <asp:Image runat="server" ID="updateImage" ImageUrl="~/Images/tick.png" AlternateText="update" /></asp:LinkButton></td>
                                                <td width="7%">
                                                    <asp:LinkButton ID="CancelButtonAdvanced" runat="server" CausesValidation="False" CommandName="Cancel">
                                                        <asp:Image runat="server" ID="Image2" ImageUrl="~/Images/cancel.png" AlternateText="cancel" />
                                                    </asp:LinkButton></td>
                                                   
                                                   
                                            </tr>
                                        </table>
                                    </div>
                                    </AdvancedInsertTemplate>
                            </telerik:RadScheduler>


  Protected Sub calEvents_FormCreated(ByVal sender As Object, ByVal e As SchedulerFormCreatedEventArgs)

    Dim scheduler As RadScheduler = DirectCast(sender, RadScheduler)

    If e.Container.Mode = SchedulerFormMode.AdvancedInsert OrElse e.Container.Mode = SchedulerFormMode.AdvancedEdit Then

      Dim subjectBox As TextBox = DirectCast(e.Container.FindControl("TitleTextBox"), TextBox)
      subjectBox.Text = e.Appointment.Subject

    End If

  End Sub

Thanks so much,
Susan


Peter
Telerik team
 answered on 17 Jun 2009
7 answers
221 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
78 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
178 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
224 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?