Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
105 views
Hi Telerik,

I'm using RadGrid and binding my grid on client side, I have some template fields and i want to use InstantiateIn, but my question is can i use InstantiateIn on client side, if so then how?, please reply.

Thanks,
ASAD
Sebastian
Telerik team
 answered on 15 Nov 2010
1 answer
115 views
Hello Telerik Team,

I have a dynamic grid on a page, whose fields are taking from database. In order to keep its structure, I need to regenerate the grid at each post back. Like,
--------------------------------
RadGrid radGridDynamic = new RadGrid();

protected void Page_Init(object sender, EventArgs e)
{
        if (!IsPostBack)
        {
          
        }
        radGridDynamic = dynamicRadGridBLL.GenerateRadGrid("Company");
        PlaceHolder1.Controls.Add(radGridDynamic);
}

Is there any way to keep the structure alive at each post back?
Shinu
Top achievements
Rank 2
 answered on 15 Nov 2010
1 answer
36 views
Hi Guys:
Two time recently, I have been developing a feature and I have been burned by the Telerik Demo web site.  I find a demo that fits my needs and I try to get it working, and I can not get it to work all the way.  Come to find out that my current Telerik dll is the issue.  I have no idea how much time I have wasted on these two features.  Can you please add to your demos, what release this feature was added.
Phil
Maria Ilieva
Telerik team
 answered on 15 Nov 2010
4 answers
244 views
Group,
I have a radgrid using the built in add/insert/delete functionality.  However, I am using a usercontrol in my edit form.  The Insert command and cancel command work fine, but if I click to edit a record and then click the update button it delets the record instead of updating it.  I am using the following code which I found here.

<asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
    runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
</asp:Button>
<asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
    CommandName="Cancel"></asp:Button>


Any help is greatly appreciated!
Tsvetoslav
Telerik team
 answered on 15 Nov 2010
3 answers
164 views

I found an interesting issue that I think may be a bug.  I have a web page that displays a simple edit form with a textbox, a Telerik Modal popup window and a dropdown.  All three have a required field validator.  The problem I found is that when you open the modal popup window and then close it (doesn't matter whether you select an item or not) and then hit the Save button (leaving one or both of the other required fields empty) thus firing the required field validator and causing a validation error (all client-side validation) and then click the Cancel button, you get the following error:

Line: 122
Error: 'parentNode' is null or not an object

It's referring to code in the Telerik.Web.UI.ModalExtender prototype in the "hide" function:

hide:function(){
 this
 ._restoreTab();
 this
 ._attachWindowHandlers(false);
 var
 _15=this._backgroundElement;
 if
 (_15){
 _15.parentNode.removeChild(_15);
this
 ._backgroundElement=null;
 }
}

 

 

The outerHTML of the object "_15" is as follows:

"<DIV style="Z-INDEX: 10000; POSITION: absolute; FILTER: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=50); BACKGROUND-COLOR: #aaaaaa; WIDTH: 1653px; DISPLAY: none; HEIGHT: 915px; TOP: 0px; LEFT: 0px; opacity: .5; mozOpacity: .5" class=TelerikModalOverlay unselectable="on"></DIV>"

As a side note, if you open the modal popup window, and close it and then click Cancel (without firing the validation event) everything works fine.  However, it also fails (same error) if you leave a field empty, click Save causing a validation error, then fill in the all of the fields and click Save again (validation passes), but you get the same error.

Oh, and using DestroyOnClose is not an option as they may need to open the popup a second time.  This fixes the problem stated above but does not allow the use to open the popup after they close it.

Any ideas on the problem here?  Is it a bug in Telerik or am I doing something wrong? 

Thanks,
Bob

 

 

Georgi Tunev
Telerik team
 answered on 15 Nov 2010
2 answers
42 views
Dear Sir,

I want to open appointment context menu using left click.
For Example :- When i click on appointment then open context menu using left click.

U gave time slot context menu solution.
but i want Appointment Context Menu using left menu.

Following Code Works For Time Slot Context Menu But Not For Appointment Context Menu.

function OnClientTimeSlotClick(sender, args) {
            sender._showTimeSlotContextMenu(args.get_domEvent(), args.get_targetSlot());
        }

So please Help Me.


Thanks
Chandan Kumar
Chandan Kumar
Top achievements
Rank 1
 answered on 15 Nov 2010
3 answers
130 views
Hello Sir,

Can i open Appointment Context menu using Mouse Left Click.
Means When i click on left mouse button on any appointment then open my Context menu and work all menu.

Please Help Me.

Thanks
Chandan Kumnar
Shinu
Top achievements
Rank 2
 answered on 15 Nov 2010
5 answers
174 views
Hey, 

I'm trying to figure out how to make ajaxManager.ajaxRequestWIthTarget function with a RadMenu.

The issue is that there's a timed javascript function that needs to call an AJAX request with a specific item in the RadMenu. 

The below...
var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>");
ajaxManager.ajaxRequestWithTarget('<%= ReportPageMenu.FindItemByValue("MyItemValue").UniqueID %>', '');
doesn't accomplish the desired behaviour, the handler behind the ReportPageMenu is never hit in the code.

<telerik:RadMenu runat="server" ID="ReportPageMenu" OnItemClick="ReportMenuHandler"/>


What's the correct/best way to achieve a postback caused by ajaxRequestWithTarget that forces the code in the onItemClick for the RadMenu to fire off with the correct sender/args? 

Thanks

Iana Tsolova
Telerik team
 answered on 15 Nov 2010
7 answers
399 views
I guess these aren't really problems per se, but I'd find it odd if I were the only one that wanted to see these fixes implemented, so I have decided to create a thread with a fix in the hopes that someone will clean it up and make it a permanent solution, and that I can help others with a similar problem implement the missing functionality.

So starting with shift click...

<body onkeydown="setShift(event)" onkeyup="setShift(event)">
  <telerik:RadCodeBlock runat="server" ID="RadCodeBlock1">
            <script type="text/javascript">   
               //I normally put this code right in the form (first item)
               var shiftKey=false;
               var treeView;
 
                function pageLoad()
                {
                    treeView = $find ("<%= treeYourTree.ClientID %>");
                }
 
               //capture the shift key for copying
               function setShift(e)
               {
                    if (window.event)
                    {
                        shiftKey = window.event.shiftKey;
                    }
                    else
                    {
                        if (e.shiftKey)
                        {
                            shiftKey=true;
                        }
                        else
                        {
                            shiftKey=false;
                        }
                    }
               }
 
               function onNodeClicked(sender, eventArgs)
               {             
                    if (shiftKey)
                    {
                        treeView.trackChanges();
                        //We should have selected nodes if we are shift clicking
                        if (treeView.get_selectedNodes!=null)
                        {
                            //Capture the first selected node and the current selected node
                            var firstSelected = treeView.get_selectedNodes()[0];
                            var currentSelected = eventArgs.get_node();
                            //Unselect all the nodes and initialize the continue / iteration boolean
                            treeView.unselectAllNodes;
                            var cont=false;
                             
                            //Iterate through the parent's children (iterate through the same level as selected)
                            for (var i=0; i< firstSelected.get_parent().get_nodes().get_count(); i++)
                            {
                                currItNode = firstSelected.get_parent().get_nodes().getNode(i);
                                cont = (cont)? !(currItNode == firstSelected || currItNode == currentSelected)
                                               :(currItNode == firstSelected || currItNode == currentSelected);
                                 
                               if (cont && firstSelected.get_parent().get_nodes().getNode(i))
                                        firstSelected.get_parent().get_nodes().getNode(i).select();
                            }
                             
                        }
                        treeView.commitChanges();
                    }
               }
     </script>
  </telerik:RadCodeBlock>
 
<-- tree goes somewhere in here with OnClientNodeClicked="onNodeClicked" -->
</body>
Pay special attention to body onkey events in my provided code.  This has been tested in IE and FireFox.

Known limitations:
  1.  When shift selecting from a child through another parent, it gets weird.  As it stands now, this allows shift selecting under the parent of the beginning of the first shift click ONLY, and I don't have the need or the time to get into fixing that, although I suspect it's an easy fix.  It does, however, allow for shift clicking up and down the current node.
  2.  You can shift click, then ctrl-click other items, but if you do a subsequent shift click, it gets weird again.  Once again, I don't have the need to fix this at the moment.

My subsequent post will cover copying and pasting an entire tree node.  It should be noted that this script and the following script can be used in conjunction (I am actually using both on the same page).
Naisha
Top achievements
Rank 1
 answered on 15 Nov 2010
1 answer
140 views
Hi:
I have a RadGrid that worked fine until 2010.2.929 version. But when upgrade to 2010.3.1109 version is show the following error:

Sys.WebForms.PageRequestManagerServerErrorException: No default member found for type 'DynamicClass1'

When re-built the RadGrid, I found the problem when add a GridCalculatedColumn,  I removing the CalculatedColumn from RadGrid and this working fine. RadGrid is into a WebUser Control (ascx) and this is loaded from RadTabStrip

Thanks for your help.
  
Alejandro Genovesi
Top achievements
Rank 2
 answered on 15 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?