Hi all,
I’m experiencing an problem with the radgrid on a formview insert template.
Situation:
I have a formview. The insert template contains a radgrid with paging and filtering on. Above the grid is an autopostback checkbox. Now, when I click a row, the datakey value is properly saved in the record. I can use filtering, sorting and can click the checkbox and a serverside event is raised.
The problem exists only when I click a paging item, then the formview switches back to “readonly” and inserting is gone..
Fist I thought that is was the postback, but postback from the checkbox, filtering the grid or sorting the grid does not generate this problem.
I have the application online so you can see for yourself: (testsite)
http://emo.proovit.com/servicenet/
Login with “telerik” and a password “tel1”
In menu (left) choose “unloading”
In the grid, choose a row (anyone will do)
Now, when you click “add ship” you can reproduce the problem.
Any ideas?
| Dim nodeCollection As System.Collections.Generic.IList(Of RadTreeNode) = R1.CheckedNodes |
| Dim node As RadTreeNode |
| For Each node In nodeCollection |
| Dim testCount As Integer = node.Controls.Count |
| Dim boxBanner As TextBox = node.FindControl("boxBannerID" & node.Value) |
| next node |
<
telerik:RadToolBarButton Text="combobox" Value="combobox" CssClass="toolboxitem" CausesValidation="false">
<ItemTemplate>
<div style="padding-left:30px">
<telerik:RadComboBox ID="si_display_combobox" runat="server" AutoPostBack="True" OnSelectedIndexChanged="display_combobox" CausesValidation="false" Width="190px" Height="300px"></telerik:RadComboBox>
</div>
</ItemTemplate>
</telerik:RadToolBarButton>
It is inside an toolbar.
| function ConfirmLoadHandler() |
| { |
| var oldConfirm = radconfirm; |
| //We will change the radconfirm function so it takes all the original radconfirm attributes |
| window.radconfirm = function(text, mozEvent, oWidth, oHeight, callerObj, oTitle) |
| { |
| var ev = mozEvent ? mozEvent : window.event; //Moz support requires passing the event argument manually |
| //Cancel the event |
| ev.cancelBubble = true; |
| ev.returnValue = false; |
| if (ev.stopPropagation) ev.stopPropagation(); |
| if (ev.preventDefault) ev.preventDefault(); |
| //Determine who is the caller |
| var callerObj = ev.srcElement ? ev.srcElement : ev.target; |
| //Call the original radconfirm and pass it all necessary parameters |
| if (callerObj) |
| { |
| //Show the confirm, then when it is closing, if returned value was true, automatically call the caller's click method again. |
| var callBackFn = function (arg) |
| { |
| if (arg) |
| { |
| callerObj["onclick"] = ""; |
| if (callerObj.click) callerObj.click(); //Works fine every time in IE, but does not work for links in Moz |
| else if (callerObj.tagName == "A") //We assume it is a link button! |
| { |
| try |
| { |
| eval(callerObj.href) |
| } |
| catch(e){} |
| } |
| } |
| } |
| //We will need to modify the oldconfirm as well ???????? |
| oldConfirm(text, callBackFn, oWidth, oHeight, callerObj, oTitle); |
| } |
| return false; |
| } |
| } |