Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
283 views
Its not immediatley obvious how to program the web service for a radcombobox autocomplete feature.  The example;

C:\Program Files\telerik\RadControls 'Prometheus' for ASPNET Q3 2007\Live Demos\ComboBox\Examples\Programming\WebServiceShowMoreResults

... is missing the web service countries.cs - is it possible to get this so we can see what the web service looks like?

Thanks,
JB

JC
Top achievements
Rank 1
 answered on 03 Nov 2009
3 answers
164 views
Hello - I have seen numerous posts on this, but they all vary in technique and date. What is the current best approach to expand/collapse all items in a grouped grid? I would like to do this client side, using the expanded property if possible rather than having the client side script "click" the icons in the first column. Please provide an up-to-date example if possible.

Thanks ahead of time for the help.
Bryan Strader
Top achievements
Rank 2
 answered on 03 Nov 2009
2 answers
90 views
I'd appreciate some help with this:

I have a working Rad Editor in which I have three custom tools.  All three tools work correctly, and the images that display on the three buttons show up properly on page_load.  However, when there is a post back, I lose the three images.  The click of any of the three buttons still has the desired result, though.

Here is the code:

<telerik:EditorToolGroup> 
     <telerik:EditorTool Name="Arrow" ShortCut="Shift+Alt+r"/> 
     <telerik:EditorTool Name="Yen"/>
     <telerik:EditorTool Name="Euro"/>
</telerik:EditorToolGroup>

<style type="text/css"
    .Arrow 
        { 
        background-image: url("../img/rt_icon2.gif")!important; 
        } 
    .Yen 
        { 
        background-image: url("../img/yen2.jpg")!important; 
        } 
    .Euro 
        { 
        background-image: url("../img/euro.jpg")!important; 
        } 
</style> 

<script type="text/javascript"
 
 
    Telerik.Web.UI.Editor.CommandList["Arrow"] = function(commandName, editor, args)  
    { 
        editor.pasteHtml("<font style='FONT-SIZE: 11pt; FONT-STYLE: normal; FONT-FAMILY: wingdings'>è</font>"); 
    }; 
    Telerik.Web.UI.Editor.CommandList["Yen"] = function(commandName, editor, args)  
    { 
        editor.pasteHtml("<font style='FONT-SIZE: 11pt; FONT-STYLE: normal; FONT-FAMILY: arial'>Â¥</font>"); 
    }; 
    Telerik.Web.UI.Editor.CommandList["Euro"] = function(commandName, editor, args)  
    { 
        editor.pasteHtml("<font style='FONT-SIZE: 11pt; FONT-STYLE: normal; FONT-FAMILY: arial'>€</font>"); 
    }; 
 
</script> 

Thanks in advance for your help in determining how to avoid losing my images!

Michael
Michael
Top achievements
Rank 1
 answered on 03 Nov 2009
1 answer
84 views
Hi,

I have radgrid. Inside radgrid i using tabstrip. Each tab in tabstrip i can update data. For update i popup new window. After updating popup window close. when popup windows close data is rebinding. after that my current tab is changing and its going to first tab. I want keep my current tab after rebinding. Hos can i do that?. You can see application from following link

http://195.89.170.82/mdrdbtest/document.aspx

krds
lakmal




Schlurk
Top achievements
Rank 2
 answered on 03 Nov 2009
2 answers
96 views
Is it possible and if so, Is there any documentation available for doing something like this?
Delicious!
Top achievements
Rank 1
 answered on 03 Nov 2009
2 answers
204 views
I represent a directory structure with folders and documents that reside with a database;. The treeview is bound to a DataTable. I want to include additional properties that I can use in the On Node Data Bound event. With a GridView, I can add hidden fields to the Grid. I want to do the equivalent on the Treeview and include information such as the file type, its' creator, etc as additional non-visible fields within the TreeView when I bind it to the DataTable. All of the fields I want are columns in the table. I can't find any examples of how to do this. Help appreciated.

Thanks
Bob Jones
Top achievements
Rank 1
 answered on 03 Nov 2009
1 answer
144 views
I do have a radgrid and a panel which has bunch of controls in it, one of which is a dropdown control.
when I select a record from the grid the panel controls are pre-populated with corresponding data.

when the dropdown list value is "other" i would like to execute javacript function.

I ajaxified the grid and the panel like this:

 

<telerik:RadAjaxManagerProxy ID="mpPatientPolicy" runat="server">

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="rgStudents">

 

 

    <UpdatedControls>

 

 

        <telerik:AjaxUpdatedControl ControlID="rgstudents" LoadingPanelID="AjaxLoadingPanel" />

 

 

        <telerik:AjaxUpdatedControl ControlID="pnlstudents" LoadingPanelID="AjaxLoadingPanel" />

 

 

     </UpdatedControls>

 

 

</telerik:AjaxSetting>
</ajaxsettings>
</telerik:radajaxmanagerproxy>

and I execute the javascript function like this.

 

Page.ClientScript.RegisterStartupScript(Page.GetType(), "key", "<script>hideElement();</script>"). the javascript is not getting fired.

Should I be using 

 

scriptManager.RegisterStartupScript to fire the javascript on async postback and what is the correct syntax?

Pavlina
Telerik team
 answered on 03 Nov 2009
4 answers
335 views
Hello,

I'm having issues with exporting to Excel or PDF when the user clicks on a linkbutton in the commanditemtemplate of RadGrid1. The RadGrid appears to refresh, and then is completely loaded without paging enabled. The commanditemdisplay is not displaying anymore either (I display the commanditems based on access levels). I can fix this issue by removing RadGrid1 from the UpdateControls part of RadAjaxManager1; however, I need RadGrid1 to be updated when there is an ajaxRequest initiated by closing a Radwindow. Here is my code related to this issue. Please let me know how I can achieve exporting to Excel and PDF while keeping RadGrid1 in the RadAjaxManager1 updated controls section. I put a breakpoint on RadAjaxManager1_AjaxRequest, but it was never hit.

Thanks,
Casey

RadAjaxManager1:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" 
                                OnAjaxRequest="RadAjaxManager1_AjaxRequest">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="DateTime" /> 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid2" /> 
                        <telerik:AjaxUpdatedControl ControlID="lblNote" /> 
                        <telerik:AjaxUpdatedControl ControlID="Note" /> 
                        <telerik:AjaxUpdatedControl ControlID="RequiredFieldValidator1" /> 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="RadGrid2">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="lblNote" /> 
                        <telerik:AjaxUpdatedControl ControlID="Note" /> 
                        <telerik:AjaxUpdatedControl ControlID="RequiredFieldValidator1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 

Javascript to initiate ajaxRequest:
function refreshGrid() {  
            $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");  
        } 

Code-Behind executed onAjaxRequest:
protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)  
    {  
        if (e.Argument.ToString() == "Rebind")  
        {  
            foreach (GridDataItem i in RadGrid2.Items)  
            {  
                if (i.Selected)  
                {  
                    SqlDataSource3.Insert();  
                    i.Selected = false;  
                }  
            }  
            RequiredFieldValidator1.Enabled = false;  
            RadGrid1.Rebind();  
        }  
    } 

RadGrid1:
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"   
                 GridLines="None" Skin="Office2007" ItemStyle-Wrap="true"   
                 DataSourceID="SqlDataSource1" oninit="RadGrid1_Init" 
                 AllowSorting="True" onitemcreated="RadGrid1_ItemCreated"   
                 AllowFilteringByColumn="True" AllowPaging="True" Width="100%"   
                 OnItemDataBound="RadGrid1_ItemDataBound">  
<ItemStyle Wrap="True"></ItemStyle> 
 
<MasterTableView CellSpacing="-1" DataSourceID="SqlDataSource1"   
                 AllowSorting="true" 
                 CommandItemDisplay="None" ItemStyle-Wrap="true">  
 
<ItemStyle Wrap="True"></ItemStyle> 
    <CommandItemTemplate> 
    <table width="100%">  
    <tr> 
    <td align="right">  
        <asp:LinkButton ID="Excel" runat="server" Font-Bold="True"   
                        CausesValidation="False" Height="10px" 
                        OnClick="Excel_Click">Export to Excel</asp:LinkButton> 
                        &nbsp;&nbsp;&nbsp;  
        <asp:LinkButton ID="PDF" runat="server" Font-Bold="True" 
                        CausesValidation="False" Height="10px" 
                        OnClick="PDF_Click">Export to PDF</asp:LinkButton> 
    </td> 
    </tr> 
    </table> 
    </CommandItemTemplate> 
<Columns> 
...  
</Columns> 
</MasterTableView> 
</telerik:RadGrid> 

LinkButton CodeBehind:
    protected void Excel_Click(object sender, EventArgs e)  
    {  
        ConfigureExport();  
        RadGrid1.MasterTableView.ExportToExcel();  
    }  
    protected void PDF_Click(object sender, EventArgs e)  
    {  
        ConfigureExport();  
        RadGrid1.ExportSettings.Pdf.PageWidth = Unit.Pixel(1500);  
        RadGrid1.MasterTableView.ExportToPdf();  
    }  
    public void ConfigureExport()  
    {  
        RadGrid1.ExportSettings.ExportOnlyData = true;  
        RadGrid1.ExportSettings.IgnorePaging = true;  
        RadGrid1.ExportSettings.OpenInNewWindow = true;  
    } 
Pavlina
Telerik team
 answered on 03 Nov 2009
37 answers
503 views
Hello,

I have to start with the general kudos on this version again.  I've got an awesome system going here where I'm creating dynamic docks and loading them with user controls for a really cool portal interface.  Almost everything works perfectly; I'm only stumbling on the nit picky stuff now.

I'm successfully loading the user's page with all of their gadgets (docks loaded with custom user controls), and I have a "Save Layout" button on the page.  When they click that, the DockState of each of the docks is stored in the database with the user's configuration.  Awesome new change:  I can read the DockState to determine just what is in there.  Thank you for that!

Now, when the page loads, I read all of the gadget configuration data from the database and build the docks with their user controls in a somewhat arbitrary order (the order in which they were initially added to the page.)  As they are created, they are added to the page's DockLayout, but not to any specific DockZone.   AFTER they're all loaded, I run through the configuration data again, applying the DockStates stored in the database.  When I do this, they are all placed in the appropriate DockZone, but within each zone, they are displayed in the order in which they were created - not in the order in which they were saved when the DockStates were saved.  I can view the DockStates in the database.  What I see is that the DockZoneID is correctly set as are the values for Index (starting with 0, they are numbered in order - 0, 1, 2).  However, since 2 (for example) was created first, it still shows at the top of the indicated DockZone, and not at the bottom as it should.

Side Note:  Originally I applied the DockStates as the docks were created, but I thought I might fix this by having all of the docks loaded then going back and applying their states.  It didn't work.  A side question would be - Should I need to apply the DockStates only after all of the docks are loaded?

Any help on this?

I could save the individual settings of the DockState in the database and then load them on the page in order, but if you're supposed to be handling this for me, I'd rather take advantage of it.

Note that, as I would expect, when you click the "Save Layout" button, the page loads with the gadgets in the correct order, but only because it's loading the page from a PostBack.

Thank you.
Rob Linxweiler
Top achievements
Rank 2
 answered on 03 Nov 2009
1 answer
209 views
Is there a way to populate a RadListBox via a web service?  I don't see an obvious way like there is with the RadMenu.

Thanks,
--nick
Simon
Telerik team
 answered on 03 Nov 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
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
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?