How can I determine if a "delete" links was clicked?
My aspx page has
<telerik:RadGrid ID="radGrid" runat="server"
.......
OnDeleteCommand="RadGrid_DeleteCommand"
>
<telerik:GridButtonColumn CommandName="Delete" Text="Delete"
UniqueName= "DeleteColumn"></telerik:GridButtonColumn>
In my codebehind I want to check to see if the delete was clicked:
Dim DeleteWasClicked as boolean
If IsPostback() then
DeleteWasClicked = ????
end if
' I ahso have the follwing to delete the record (which works fine)
Protected Sub RadGrid_DeleteCommand(ByVal source As Object, ByVal e As GridCommandEventArgs)
'Get the GridDataItem of the RadGrid
Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
'Get the primary key value using the DataKeyValue.
Dim PrmaryKeyID As String = item.OwnerTableView.DataKeyValues(item.ItemIndex)("CustomerID").ToString()
Dim deleteQuery As String = "DELETE from "....
' Run the query
End Sub
<
add assembly="Telerik.Web.UI, Version=2008.3.1504.20, Culture=neutral, PublicKeyToken=121FAE78165BA3D4"/>
<%
@ Register Assembly="Telerik.Web.UI, Version=2008.3.1504.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%
@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
... is there a way I can have the assembly register without the version? That way I can update easily in the future without having to worry about old builds
IntelligentLabelsEnabled
="True"
as well as
XAxis
AutoScale="True"
but these settings did not seem to affect the X axis labels
I started from the great example that was posted here:
http://demos.telerik.com/aspnet-ajax/tooltip/examples/clientsideapi/defaultcs.aspx
I have an application where I display an regular for within my grid for data entry. This grid is on a content page (of a masterpage) by the way.
The first field is a name. I use a RequiredFieldValidator.
When the form is in insert mode and there is a blank name and the user presses Insert, the Radtooltip comes back with the
ValidationSummary.
But, When the form is in update mode and there is a blank name and the user presses update the first time, the Radtooltip does not display. But if you press the update button a second time, the radtooltip shows.
I am using the RadAjaxManager. When I comment out the RadAjaxManager, the update works as desired the first time the user presses update. But of course I loose my RadAjaxLoadingPanel. Even targeting the RadToolTip within the RadAjaxManager does not show the tooltip until the second button press.
I tried the RadAjaxPanel, no problems, everything worked !
I have read through several post and I understand that the Validators do not work well with the RadAjaxManager.
my questions :
1) I have read many posts within and without telerik's forum and I get a little confused. Some telerik posts say there are problems with ASP.NET validators when used with RadAjaxManager, yet, some say it will be resolved, and others say there are workarounds ? Is this an issue that has been resolved in a new release ? I am at "Telerik.Web.UI.dll 2008.3.1125.35 Trial version".
2) If this has not been resolved, is there a workaround using RadAjaxManager and the validators ?
3) Can I upgrade to the latest telerik release even though I am in a trial version.
4) To keep the advantages of the RadAjaxManager, is there another, or better way to do validation and display a validation summary(client side and server side) ?
Thanks for your time.
| <%` Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> |
| <asp:TextBox runat="server" ID="FirstName" Text='<%# Bind("FirstName") %>' TabIndex="1" /> |
| <asp:TextBox runat="server" ID="LastName" Text='<%# Bind("LastName") %>' TabIndex="2" /> |
| <div style="text-align: right; clear: both;"> |
| <asp:Button ID="Button2" Text='<%# ((GridItem)Container).OwnerTableView.IsItemInserted? "Insert" : "Update" %>' |
| CommandName='<%# ((GridItem)Container).OwnerTableView.IsItemInserted? "PerformInsert" : "Update" %>' |
| runat="server" /> |
| <asp:Button ID="Button3" Text="Cancel" CommandName="Cancel" runat="server" /> |
| </div> |
| <telerik:RadInputManager ID="RadInputManager1" runat="server" Skin="Office2007"> |
| <Telerik:TextBoxSetting EmptyMessage="First Name"> |
| <TargetControls> |
| <Telerik:TargetInput ControlID="FirstName" /> |
| </TargetControls> |
| </Telerik:TextBoxSetting> |
| <Telerik:TextBoxSetting EmptyMessage="Last Name"> |
| <TargetControls> |
| <Telerik:TargetInput ControlID="LastName" /> |
| </TargetControls> |
| </Telerik:TextBoxSetting> |
| </telerik:RadInputManager> |
