Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
212 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
152 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
344 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
515 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
219 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
3 answers
323 views
Hi All,

I want to know the maximum no of records a rad dropdown can populate or volume of data it can handle.

In my application there are lakhs of records which are being populated at the page load event in the dropdown. because of which application hangs up .

Please suggest any solution & better way to populate laks of records in the dropdown.


Thanks in Advance
Rahul
Simon
Telerik team
 answered on 03 Nov 2009
1 answer
100 views
Hello,

I was wondering if you have tried out your controls with ASP.NET AJAX preview 6, and if so, what is your experience with it?  What scripts (since they broke the scripts out) has your controls needed (outside of minimum MicrosoftAjaxCore and MicrosoftAjaxComponentModel)?  I am trying to refrain from using MicrosoftAjax due to the size...

Thanks.
T. Tsonev
Telerik team
 answered on 03 Nov 2009
1 answer
105 views
Hi,

I have a problem with my ComboBox if i put it in a container with a scorlbar, and when i click on a combobox to make appear their items. I try then to scroll the main container, the items of the combo box became fixed on the page even if i try to scroll the main container.

I have also a problem with  a DateTimePicker, when i choose a Date it automaticly change to an other date with march as month!!!

Thanks you.
Simon
Telerik team
 answered on 03 Nov 2009
1 answer
122 views
I need to navigate to advanced edit template for a specified appointment (ID) from a page/user control that does not have access to RadScheduler.

Is there is a way to navigate (using f.i URL) to AdvancedEditTemplate for for known Appointment ID?

Thank you in advance.
Genady Sergeev
Telerik team
 answered on 03 Nov 2009
1 answer
227 views
Hello,

I have a RadAjaxManager that updates 5 RadGrids on one page.  When I call a Rebind ajaxRequest it rebinds each of the 5 RadGrids.  The problem I'm having is determining when all 5 grid's have finished rebinding and refreshing on the screen before my javascript code continues.

The RadAjaxManager's onResponseEnd gets called several times, I believe once for each RadGrid that has a change when it's rebound.

How can I call ajaxRequest and have it run synchronously so that my javascript code will not continue until each RadGrid has been refreshed?

Thanks,

Chris
Iana Tsolova
Telerik team
 answered on 03 Nov 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?