Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
133 views
Hi,

I'm creating dynamic docks and zones as well. While creating docks I register 2 client-side events on server side -- OnClientDockPositionChanging and OnClientDragStart. OnClientDockPositionChanging works fine but when OnClientDragStart throws javascript error.

function OnClientDockPositionChanging(sender, eventArgs) 
   alert("Stop"); 
   eventArgs.set_cancel(true); 
function OnClientDragStart(sender, eventArgs) 
   alert("Stop Drag"); 
   eventArgs.set_cancel(true); 
 

  
private RadDock CreateRadDockFromState(DockState state, int number) 
    { 
        RadDock dock = new RadDock(); 
        dock.ID = string.Format("RadDock{0}", number); 
        dock.ApplyState(state); 
        dock.Visible = !state.Closed; 
        dock.Commands.Add(new DockPinUnpinCommand()); 
        dock.OnClientDockPositionChanging = "OnClientDockPositionChanging"
        dock.OnClientDragStart = "OnClientDragStart"
        return dock; 
    } 
    private RadDock CreateRadDock(int id) 
    { 
        RadDock dock = new RadDock(); 
        dock.ID = string.Format("RadDock{0}", id); 
        dock.Title = txtTitle.Text; 
        dock.Text = txtText.Text + "<br>" + dock.ID; 
        dock.UniqueName = Guid.NewGuid().ToString(); 
        dock.Width = Unit.Pixel(300); 
        dock.Commands.Add(new DockPinUnpinCommand()); 
        dock.OnClientDockPositionChanging = "OnClientDockPositionChanging"
        dock.OnClientDragStart = "OnClientDragStart"
        return dock; 
    } 
Obi-Wan Kenobi
Top achievements
Rank 1
 answered on 01 Jul 2009
1 answer
319 views
Hey Guys;

Great start on the Captcha function.

What is the best recommendation for hooking the Captcha submission to a keyboard enter click, rather than verify code?
Pero
Telerik team
 answered on 01 Jul 2009
0 answers
126 views

 

 

<telerik:GridTemplateColumn HeaderText="Product" UniqueName="ProductInfo" ItemStyle-VerticalAlign="Middle" ItemStyle-HorizontalAlign="Left">  
                                        <ItemTemplate>  
                                            <asp:Label ID="Label2" runat="server" Text='<%# Eval("Prod_Name")%>'></asp:Label>  
                                            <asp:HiddenField ID="hidTreat_ID" runat="server" Value='<%# eval("ID")%>' />  
                                            <asp:HiddenField ID="hidSeq" runat="server" Value='<%# bind("Seq")%>' />  
                                        </ItemTemplate>  
                                        <EditItemTemplate>  
                                            <asp:Panel ID="pnlTreat_TN" runat="server">  
                                                <table cellpadding="0" cellspacing="0" border="0">  
                                                    <tr>  
                                                        <td style="padding: 0px">  
                                                            <telerik:RadComboBox ID="ComboBox_CompProdTN" runat="server" AutoPostBack="True" 
                                                                EnableLoadOnDemand="True" Height="120px" ShowMoreResultsBox="true" Skin="Web20" 
                                                                Width="200" OnSelectedIndexChanged="ComboBox_CompProdTN_SelectedIndexChanged" 
                                                                EnableVirtualScrolling="true" EmptyMessage="Select a Product"   
                                                                OnItemsRequested="ComboBox_ItemsRequested"  ValidationGroup="SelectProduct"   
                                                                ShowDropDownOnTextboxClick="False">  
                                                            </telerik:RadComboBox>  
                                                            <asp:RequiredFieldValidator ID="rfvProduct" runat="server" ErrorMessage="&larr; Select Product!" 
                                                                ControlToValidate="ComboBox_CompProdTN" Display="Dynamic" SetFocusOnError="True" 
                                                                Font-Bold="True" Font-Names="Arial" ValidationGroup="SelectProduct"></asp:RequiredFieldValidator>  
                                                        </td>                                                          
                                                        <td align="left" >  
                                                        <asp:Label ID="lblError" runat="server" ForeColor="Red" Visible="false"  ></asp:Label>  
                                                        </td>  
                                                          
                                                         
                                                        <td align="center" valign="middle">  
                                                        &nbsp;  
                                                            <asp:ImageButton ID="imgbtnAdvSearch" runat="server" ImageUrl="~/images/buttons/findIcon2.gif" 
                                                                Style="padding: 1px 0px 0px 0px;" ToolTip="Advanced Search" CommandName="FindAI" 
                                                                Visible="false"  Height="23px" OnClick="imgbtnAdvSearch_Click" ImageAlign="Middle" 
                                                                Width="22px" />  
                                                                                                                   </td>  
                                                        <td align="center" valign="middle">  
                                                        &nbsp;  
                                                            <asp:ImageButton ID="imgbtnAddNewCompProd" runat="server" ImageUrl="~/images/buttons/AddProd.png" 
                                                                Style="padding: 1px 0px 0px 0px;" ToolTip="Add New Comparative Product" CommandName="AddCompProd" 
                                                                Visible="false"  OnClick="imgbtnAddNewCompProd_Click" Height="23px" ImageAlign="Middle" />  
                                                                                                                    </td >  
                                                                                                          </tr>  
                                                </table>  
                                                <asp:HiddenField ID="hidTreat_ID" runat="server" Value='<%# bind("ID")%>' />  
                                                <asp:HiddenField ID="hidSeq" runat="server" Value='<%# bind("Seq")%>' />  
                                                <asp:HiddenField ID="hidProdTN_ID" runat="server" Value='<%# bind("Prod_ID")%>' />  
                                                <asp:HiddenField ID="hidRecType" runat="server" Value='<%# bind("Type")%>' />  
                                            </asp:Panel>  
                                            <asp:Label ID="lblSpecialType" runat="server" Text="" Visible="false" ForeColor="#663300"></asp:Label>  
                                        </EditItemTemplate>  
                                        <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle"  />  
                                    </telerik:GridTemplateColumn> 


 

Please help me out with the solution.
Thanks
Pinkey
Pinkey
Top achievements
Rank 1
 asked on 01 Jul 2009
0 answers
128 views
Hi,

I used the radupload control to upload files that will be saved on a database and it saves the file, but when the file is saved on a folder that I specified previously and I open the file (.txt, .doc, etc.) the content on that file is not like the original. I has special caracters like it binary. Does anyone knows why this happens and what can solve this problem?
Thanks
Cátia
Top achievements
Rank 1
 asked on 01 Jul 2009
1 answer
130 views
I am using a RadGrid successfully with the RadAjaxManager and a RadAjaxLoadingPanel.  When I update my grid, it disappears for a second and shows the Loading Panel.  I noticed in a Telerik demo that they had the grid lighten up and showed the loading panel right within the grid.  I can't figure out how they did that - can anybody point me in the right direction?

Here is the sample: http://demos.telerik.com/aspnet-ajax/grid/examples/performance/linq/defaultcs.aspx

Thanks!
John
Top achievements
Rank 1
 answered on 01 Jul 2009
4 answers
214 views
Hi,
I have a RadGrid with delete and edit link as one of its columns. If i edit  a record, it opens in Editform on grid.
When working on edit form of rad grid if I click on Delete link on radgrid at the back of editform, it still performs the delete operation
even though one record is in edit mode.
following is the way by which I am declaring the Delete link.

 

<telerik:GridTemplateColumn UniqueName="DeleteColumn" ItemStyle-VerticalAlign="Middle" ItemStyle-HorizontalAlign="Center">

 

<ItemTemplate>

 

 

 

          <asp:LinkButton runat="server" CausesValidation="false" OnClientClick ="if (confirm('Are You Sure You Wish To Delete This Item?'))return true; else return false;"  CommandName="Delete" Text="Delete" ID="btnDelete" ForeColor="Blue"></asp:LinkButton> </ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

Please guide me how i can avoid this?

Thanks
Pinkey
Pinkey
Top achievements
Rank 1
 answered on 01 Jul 2009
2 answers
91 views
Hi

  I have a requirement in my application where the end user will need to export the Grid content to Excel sheet.
  My Dataset will have N number of tables.
  Is it possible to create differnt worksheets for all the Datatables in same excel??? How can i achieve that functionality through RAD Grid Export to Excel???
Different worksheet here referes to different tab with in the same EXcel spread sheet.
Your Earliest reply is appreciated

Regards
Bose Thirumalai

 
Bose
Top achievements
Rank 1
 answered on 01 Jul 2009
2 answers
79 views
Hi

  We are having problem with the RAD windowmanager after updating our DLL with the recent(2009.1.527) version.
  The Rad Window Manager CSS class is not applied as per out applications theme settings.
  The RAD Window manager themes were working proerply prior to updating this new DLL. Any idea or suggestion like which class would have caused this change.

I am able to see the customized color in the innerpart of the Dailogpopup (i.e the confirmation message and the Icon are having the Background color but i can see white background color in the other portiion of Rad windowmanager)

please suggest me some possibilities to find this change or let me know what is the new class that was changed with related to the Window control.
Your earliest reply is appreciated
Regards
Bose Thirumalai
Bose
Top achievements
Rank 1
 answered on 01 Jul 2009
12 answers
480 views
Is there a way to simply have a dropdown list of links?

Item One (Links to page one)
Item Two (Links to page two)
etc ...

Basically a combobox dropdown menu.
Tommy
Top achievements
Rank 1
 answered on 01 Jul 2009
1 answer
143 views
 
I have an issue adding a user control to the RadPanelBar (ajax) Q3 2008 version.

My markup is as follows:

 <div style="margin-left: 20px;">
        <telerik:RadPanelBar ID="ParameterPanels" ExpandMode="MultipleExpandedItems" runat="server" Skin="Web20" Width="95%">
            <Items>
                <telerik:RadPanelItem runat="server">  
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelBar>
    </div>

In the code behind, I have the following code

                    foreach(ParameterControl aParameterControl in parameterControls)
                    {
                        // Load the parameter controls dynamically as long as we don't
                        // find a static value or data field parameter control
                        if(aParameterControl.ParameterControlID != 2 &&
                           aParameterControl.ParameterControlID != 29)
                        {
                                RadPanelItem panelItem = new RadPanelItem(aParameterControl.ParameterControlDescription);

                                Control c = Page.LoadControl(aParameterControl.ControlPath);

                                panelItem.Controls.Add(c);
                                ParameterPanels.Items.Add(panelItem);
                            }
                        }
                    }

and I end up with the following stacktrace

Server Error in '/' Application.

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.

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:

[NullReferenceException: Object reference not set to an instance of an object.]
Telerik.Web.UI.ControlItem.get_Index() +31
Telerik.Web.UI.RadPanelItem.get_IsFirstVisibleItem() +27
Telerik.Web.UI.RadPanelItem.DetermineCssClass() +37
Telerik.Web.UI.RadPanelItem.AddAttributesToRender(HtmlTextWriter writer) +39
System.Web.UI.WebControls.WebControl.RenderBeginTag(HtmlTextWriter writer) +36
System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +31
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +74
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +291
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49
Telerik.Web.UI.RadPanelBar.RenderItems(HtmlTextWriter writer) +142
Telerik.Web.UI.RadPanelBar.RenderContents(HtmlTextWriter writer) +140
System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +43
Telerik.Web.UI.RadDataBoundControl.Render(HtmlTextWriter writer) +29
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +74
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +291
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +234
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +53
System.Web.UI.Control.Render(HtmlTextWriter writer) +31
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +74
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +291
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +234
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +53
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +98
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +43
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +336
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +74
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +291
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49
System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +56
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +234
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +53
System.Web.UI.Control.Render(HtmlTextWriter writer) +31
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +74
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +291
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +234
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +53
System.Web.UI.Control.Render(HtmlTextWriter writer) +31
System.Web.UI.Page.Render(HtmlTextWriter writer) +39
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +74
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +291
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49
Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +596
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +129
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +53
System.Web.UI.Control.Render(HtmlTextWriter writer) +31
System.Web.UI.Page.Render(HtmlTextWriter writer) +39
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +74
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +291
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5428


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433


further info:

Interestingly, if I change my markup to look like this, I don't get the error (I removed the first radPanelItem in the radPanelBar items collection)

 <div style="margin-left: 20px;">
        <telerik:RadPanelBar ID="ParameterPanels" ExpandMode="MultipleExpandedItems" runat="server" Skin="Web20" Width="95%">
        </telerik:RadPanelBar>
</div>

I would have thought that the control wouldn't be sensitive to an empty RadPanelItem but it obviously is. I would suggest that a null check is placed in the source for the next release around if that is the root of the issue.

Telerik.Web.UI.ControlItem.get_Index() +31
Telerik.Web.UI.RadPanelItem.get_IsFirstVisibleItem() +27

Thanks,

Sabry




Genady Sergeev
Telerik team
 answered on 01 Jul 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?