Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
94 views
Why do the demos use the asp:ScriptManager instead of telerik:RadScriptManager?

Is it preferred to use asp's.. in some cases?


Iana Tsolova
Telerik team
 answered on 25 May 2009
1 answer
114 views
Hei!

Is there any possibility to hide rows that do not contain appointments. For example, my fitness club is working from 8 to 12 and from 15 to 24. I dont want to show on the scheduler hours from 12 to 15. Is it possible?

best regards,
radek
Peter
Telerik team
 answered on 25 May 2009
5 answers
158 views
Operations with MS DropDownList in EditItemTemplate of GridTemplateColumn
After clicking edit, the data in the label does not show on RadGrid.
I must Comment
        //else if (e.Item is GridDataItem && !e.Item.IsInEditMode && Page.IsPostBack)
       //{
         //  GridDataItem item = e.Item
as GridDataItem;
         //  Label label = item.FindControl(
"Label1") as Label;
           
// update the label value
         // 
label.Text = Session["updatedValue"];
     //  }

Run Ok,
But SelectValue DropDownList not good. :(
I have two rows and two Droplist value. When I Select Value 1 is not always the default Select Value is the value 2 in Session.
Pls
Shinu
Top achievements
Rank 2
 answered on 25 May 2009
1 answer
167 views
Hi,

I have adapted some code previously posted on this forum to display a RadAjaxLoadinPanel when an image is being retrieved from the server and displayed to the user. 

    <form id="form1" runat="server">  
        <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
        <div> 
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" > 
                <AjaxSettings> 
                    <telerik:AjaxSetting AjaxControlID="ImageButton1">  
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="ImageButton1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                        </UpdatedControls> 
                    </telerik:AjaxSetting> 
                </AjaxSettings> 
            </telerik:RadAjaxManager> 
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" 
                Width="300px" IsSticky="false" EnableSkinTransparency="true" > 
                <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
                    style="border: 0px;" /> 
            </telerik:RadAjaxLoadingPanel> 
        </div> 
    <asp:ImageButton ID="ImageButton1" runat="server" Height="300px"   
            ImageUrl="~/hiresC6RNCassette.jpg" Width="300px" /> 
    </form> 

 

However, I would like to be able to view the LoadingPanel when the page is first loaded (Page_Load event) as well as when a ajax postback occurs.

Also, the image in the RadAjaxLoadingPanel sits at the top of my image that caused the post back.  Is there any way to get the loading image to be situated in the center (horizontally and vertically) of my ImageButton?

Does anyone have any ideas how I might be able to get this code to behave how I would like it to?

 

Many thanks,

 

Jason.

Pavlina
Telerik team
 answered on 25 May 2009
1 answer
172 views
Hi

I have set the enableHistory  Property of RadAjaxPanel to True.Even Asynchronous post backs are not saved in Broser history.
When i click the Browser back button all the controls are empty.
 browser is IE 7
Framework 2.0
AjaxExtension 1.0
Telerik.web.ui 2008.1.415.20

 <telerik:RadAjaxPanel ID="radAjaxPanel" runat="server"
        LoadingPanelID="RadAjaxLoadingPanel" EnableAJAX="true" EnableHistory="True">

What i needs to do ?

Regards
Vairam
Iana Tsolova
Telerik team
 answered on 25 May 2009
1 answer
161 views
Hi, I'm trying to implement a grid that is programmatically populated from a DataTable by following the instructions here: http://www.telerik.com/help/aspnet-ajax/grdprogrammaticcreation.html.

Here's the markup for the page:

<html xmlns="http://www.w3.org/1999/xhtml"
<head id="Head1" runat="server"
    <title>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server"
    <div> 
        <telerik:RadCodeBlock runat="server" ID="radCodeBlockCommitmentPull"
 
            <script type="text/javascript">   
                window.onload="history.go(1);"   
                 
                var rowClicked = -1;                                                    
                 
                function RowClicked(sender, eventArgs) 
                { 
                    rowClicked = eventArgs.get_itemIndexHierarchical(); 
   
                    EditRow(rowClicked); 
                }                           
                 
                function EditRow(val)  
                { 
                    var masterTable = $find("<%= commitmentPullGrid.ClientID %>").get_masterTableView(); 
                     
                    masterTable.editItem(masterTable.get_dataItems()[rowClicked].get_element()); 
                }                
            </script> 
 
        </telerik:RadCodeBlock> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="commitmentPullGrid"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="commitmentPullGrid" LoadingPanelID="LoadingPanel" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <telerik:RadScriptManager ID="RadScriptManagerCommitmentPull" runat="server"
        </telerik:RadScriptManager> 
        <telerik:RadAjaxLoadingPanel ID="LoadingPanel" runat="server" HorizontalAlign="Center" 
            Style="left: 50%; top: 50%" Transparency="10"
            &nbsp;<img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading6.gif") %>' 
                style="border: 0px; vertical-align: middle;" /> 
        </telerik:RadAjaxLoadingPanel> 
        <asp:Literal ID="noResultsControl" runat="server"
        </asp:Literal> 
        <telerik:RadGrid ID="commitmentPullGrid" runat="server" AutoGenerateColumns="True" 
            GridLines="Both" Height="300px" Width="97%" Skin="Telerik" AllowSorting="True" 
            BorderWidth="0" PageSize="50" OnEditCommand="commitmentPullGrid_EditCommand"
            <FooterStyle Wrap="False" /> 
            <ItemStyle Wrap="False" /> 
            <EditItemStyle Wrap="False" /> 
            <CommandItemStyle Wrap="False" /> 
            <FilterItemStyle Wrap="False" /> 
            <HeaderStyle Wrap="False" /> 
            <MasterTableView EditMode="InPlace"
            </MasterTableView> 
            <ClientSettings EnablePostBackOnRowClick="false" EnableRowHoverStyle="True"
                <ClientEvents OnRowClick="RowClicked" /> 
                <Scrolling AllowScroll="True" UseStaticHeaders="true" /> 
            </ClientSettings> 
            <PagerStyle NextPageText="Next" PrevPageText="Prev" Mode="NextPrevAndNumeric"></PagerStyle> 
        </telerik:RadGrid> 
    </div> 
    </form> 
</body> 
</html> 

The code-behind looks like so:

    public partial class CommitmentPull : System.Web.UI.Page 
    { 
        #region page methods 
        protected void Page_Load(object sender, EventArgs e) 
        { 
            LoadCommitments(); 
        } 
        #endregion 
        #region private methods 
        private void LoadCommitments() 
        { 
            PopulateGridWithLookupData(); 
        } 
 
        private void PopulateGridWithLookupData() 
        { 
            DataTable table; 
            DataRow dataRow; 
            string[] itemArray; 
            string[] dataKeyNames; 
            GridBoundColumn boundColumn; 
 
            table = new DataTable(); 
 
            for (int i = 0; i < 8; i++) 
            { 
                table.Columns.Add("Col" + i); 
                boundColumn = new GridBoundColumn(); 
                boundColumn.DataField = "Col" + i; 
                boundColumn.HeaderText = "Col" + i; 
                commitmentPullGrid.Columns.Add(boundColumn); 
            } 
 
            for (int i = 0; i < 5; i++) 
            { 
                dataRow = table.NewRow(); 
                itemArray = new string[8]; 
 
                for (int j = 0; j < 8; j++) 
                { 
                    itemArray[j] = (i + j) + ""
                } 
 
                dataRow.ItemArray = itemArray; 
                table.Rows.Add(dataRow); 
            } 
 
            dataKeyNames = new string[commitmentPullGrid.Columns.Count]; 
 
            for (int i = 0; i < commitmentPullGrid.Columns.Count; i++) 
            { 
                dataKeyNames[i] = commitmentPullGrid.Columns[i].UniqueName; 
            } 
 
            commitmentPullGrid.AutoGenerateColumns = false
            commitmentPullGrid.DataSource = table; 
        } 
 
        protected void commitmentPullGrid_EditCommand(object source, GridCommandEventArgs e) 
        { 
 
        } 
        #endregion 
    } 

Now, as you can probably tell when I click a row in the grid I want to perform an Edit on that grid row. This appears to begin to work, as I am able to step into the commitmentPullGrid_EditCommand() event handler, but then I get this page error:

Specified argument was out of the range of valid values.
Parameter name: index
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: index

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:


[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: index]
   System.Web.UI.ControlCollection.get_Item(Int32 index) +8668910
   Telerik.Web.UI.GridTextBoxColumnEditor.LoadControlsFromContainer() +67
   Telerik.Web.UI.GridColumnEditorBase.InitializeFromControl(Control containerControl) +50
   Telerik.Web.UI.GridDataItem.InitializeEditorInCell(IGridEditableColumn column) +157
   Telerik.Web.UI.GridEditManager.GetColumnEditor(IGridEditableColumn column) +175
   Telerik.Web.UI.GridBoundColumn.FillValues(IDictionary newValues, GridEditableItem editableItem) +82
   Telerik.Web.UI.GridEditableItem.ExtractValues(IDictionary newValues) +175
   Telerik.Web.UI.GridTableView.ExtractValuesFromItem(IDictionary newValues, GridEditableItem editedItem) +116
   Telerik.Web.UI.GridItemBuilder.CreateItems(GridGroupingContext group) +1211
   Telerik.Web.UI.GridTableView.CreateItems(IEnumerator enumerator, GridColumn[] columns, ControlCollection controls) +187
   Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +1075
   Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +786
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +57
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +114
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
   Telerik.Web.UI.GridTableView.PerformSelect() +28
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
   Telerik.Web.UI.GridTableView.DataBind() +368
   Telerik.Web.UI.GridTableView.Rebind() +98
   Telerik.Web.UI.GridCommandEventArgs.ExecuteCommand(Object source) +395
   Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e) +191
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +165
   Telerik.Web.UI.GridItem.FireCommandEvent(String commandName, Object commandArgument) +80
   Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument) +3838
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565


I cannot figure out why the edit function does not work. It works fine if I have AutoGenerateColumns set to true and bind directly to the DataTable, but once I add GridBoundColumns instead the error shows up. Any ideas as to what I might be doing wrong?

Thanks.

 





Iana Tsolova
Telerik team
 answered on 25 May 2009
1 answer
61 views
I need to create a tooltip to pop up a confirmation number. I have it working great off the submit button.. I have it set to Modal = true and sticky = true... so that they have to click on a link in the tooltip to bring them back to the form again. I tried to have them click the manual close button but I ran into the same problem... What is happening is once they close the tooltip via manually and go back to the form to enter another, there is a button in the beginning that needs to update some data the Same Tooltip comes back... If I remove the maual close and have them click the link in the tooltip it will work ok.. but if the user clicks on the page instead of the link the tooltip disappears and then when they start entering a form and click that button it comes back again...  Is there a way to close the tooltip so that it will not come back until they click the submit button for a new confirmation number?

 <telerik:RadToolTip ID="rdtConfNumb"
                        runat="server"
                        CssClass="LblName"
                        ShowEvent="FromCode"
                        Width="250px"
                        Position="Center"
                        Height="50px"
                        RelativeTo="Element"
                        Animation="None"
                        Modal="true"
                        Sticky="true"
                        Skin="Office2007">
        
        <div style="padding:20px">
        <table>
            <tr>
            <td>
            <asp:Label ID="Label1" runat="server" CssClass="LblName" Text="Confirmation Number:&nbsp;&nbsp; "></asp:Label>
            </td>
                <td>
                    <asp:Label ID="lblConfNumb" CssClass="LblName" runat="server" Text=""></asp:Label>
                </td>
            </tr>
            <tr>
            <td colspan=2>
            <br />
                <asp:HyperLink ID="hlNewTrack" runat="server" NavigateUrl="~/Tools/Workforce/AttendanceHotlineForm.aspx">Add Another Hotline Tracker</asp:HyperLink>
            </td>
            </tr>
             <tr>
            <td colspan=2>
                <asp:HyperLink ID="hlHome" runat="server" NavigateUrl="~/File/Home.aspx">Home</asp:HyperLink>
            </td>
            </tr>
            
        </table>
    </div>
    </telerik:RadToolTip>

here is how i open the tooltip... which this method is called in the submit button...
  public void ShowConfirmNumber()
    {        
        lblConfNumb.Text = _ConfirmNumber.ToString();
        rdtConfNumb.Show();
    }

here is the javascript i have on the page
  function OnClientBeforeHide_Completed(sender, args) {
                args.set_cancel(true);
            }




Svetlina Anati
Telerik team
 answered on 25 May 2009
1 answer
126 views
Hi,

I have a gridview that is dynamically contructed and I'm having problems with the LoadingPanel.  As a workaround the loading panel I used the PageRequestManager way to turn the visibility of the loading panel on and off, the problem now is that the selected row looses it seleced state onde the process ends:

Screencast url: http://is.gd/BFbu

What I want is a way to in the BeginRequest get the selected row (maybe from the sender?) and on the EndRequest say to the grid that there is a selected row assigning it the index.

As you see by the screencast I have a lot of grids, and this is all done dynamically, I do not know the grids name, I then really need to use the sender object to grab the current grid name that fired the request, and use this to get the selected Row, but I'm not abble to accomplish this... :(

Any help will be greatly apreciated.

Thank you.
Iana Tsolova
Telerik team
 answered on 25 May 2009
4 answers
308 views
hi, i had placing the ajax manager in the master page and the ajax manager proxy in the user control page. Since ajax manager proxy doesn't have ajax request function, i have done the coding by using telerik help as reference. I had successfully calling the ajax manager to the user control page but there is some error for javascript. Can anyone help me on this?
Pavlina
Telerik team
 answered on 25 May 2009
5 answers
281 views
Hi,

I'm dynamically adding a RAD dock layout to my page inside Me.form adding all the controls within the form to the RAD dock, then adding DockZones dynamically into Panels within the original page and docks dyanically to these zones....

This all works fine and I can move my docks around on the page between zones, retrieve thier new dock positions on postback etc, but when I want to change the dock positions on the server side I can't seem to make this happen....

How do you change the positions of docks on the serverside?
Petio Petkov
Telerik team
 answered on 25 May 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?