<
telerik:GridAttachmentColumn
FileName
=
"NuevoLogoFN"
FilterControlAltText
=
"Filter Nuevo Logo column"
HeaderText
=
"Nuevo Logotipo"
Text
=
"Nuevo Logotipo"
UniqueName
=
"NuevoLogo"
>
</
telerik:GridAttachmentColumn
>
if
(e.CommandName == RadGrid.UpdateCommandName)
{
//GridDataItem item = (GridDataItem)e.Item;
GridEditFormItem item = (GridEditFormItem)e.Item;
Hashtable newValues =
new
Hashtable();
item.ExtractValues(newValues);
//I need the code here
string
id = item.OwnerTableView.DataKeyValues[e.Item.ItemIndex][
"ID_Reg"
].ToString();
<
telerik:RadAutoCompleteBox runat="server" ID="radtxtKeywordSearch" InputType="Token"
AllowCustomToken="true" Height="200px" Width="500px" DropDownWidth="500px" DropDownHeight="200px"
BorderColor="Gray" BorderWidth="1px" BorderStyle="Solid" CssClass="radsearch"
BackColor="#F0F8FF">
</telerik:RadAutoCompleteBox>
<telerik:RadScheduler runat="server" ID="RadScheduler1" Skin="Office2007" |
Height="551px" ShowFooter="false" ReadOnly="false" Localization-AdvancedCalendarToday="I dag" Localization-AdvancedCalendarCancel="Avbryt" |
Localization-AdvancedDescription="Beskrivelse" Localization-AdvancedDone="Fullfør" Localization-AdvancedSubject="Emne" |
TimeZoneOffset="00:00:00" WeekView-HeaderDateFormat="dd.MM.yyyy" |
DayStartTime="07:00:00" DayEndTime="21:00:00" Culture="nb-NO" |
FirstDayOfWeek="Monday" LastDayOfWeek="Friday" |
EnableDescriptionField="true" Localization-Show24Hours="Vi 24 timer" Localization-ShowBusinessHours="Vis arbeidstid" HoursPanelTimeFormat="HH.mm" |
DataSourceID="sqlAppointments" DataRecurrenceField="RecurrenceRule" DataDescriptionField="Description" |
DataEndField="EndTime" DataKeyField="ID" DataRecurrenceParentKeyField="RecurrenceParentID" DataStartField="StartTime" |
DataSubjectField="Subject" OnFormCreated="RadScheduler1_FormCreated" OnClientFormCreated="schedulerFormCreated" |
OnNavigationComplete="RadScheduler1_NavigationComplete" |
OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" |
OnAppointmentDelete="RadScheduler1_AppointmentDelete" |
OnAppointmentUpdate="RadScheduler1_AppointmentUpdate" |
OnAppointmentInsert="RadScheduler1_AppointmentInsert"> |
<AdvancedForm Modal="true" /> |
<TimelineView UserSelectable="false" /> |
<AdvancedForm Modal="true" /> |
<AppointmentTemplate> |
<div class="rsAptSubject"> |
<%# Eval("Subject") %> |
</div> |
<%# Eval("Description") %> |
</AppointmentTemplate> |
<AdvancedEditTemplate> |
<scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit" |
Subject='<%# Bind("Subject") %>' |
Description='<%# Bind("Description") %>' |
EventID='<%# Bind("ID") %>' |
Start='<%# Bind("Start") %>' |
End='<%# Bind("End") %>' |
RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' |
UserID='<%# getUserID() %>' |
PartnerID='<%# getPartnerID() %>' /> |
</AdvancedEditTemplate> |
<AdvancedInsertTemplate> |
<scheduler:AdvancedForm runat="server" ID="AdvancedInsertForm1" Mode="Insert" |
Subject='<%# Bind("Subject") %>' |
Start='<%# Bind("Start") %>' |
End='<%# Bind("End") %>' |
Description='<%# Bind("Description") %>' |
RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' |
UserID='<%# getUserID() %>' |
PartnerID='<%# getPartnerID() %>' /> |
</AdvancedInsertTemplate> |
<TimeSlotContextMenuSettings EnableDefault="true" /> |
<AppointmentContextMenuSettings EnableDefault="true" /> |
</telerik:RadScheduler> |
<asp:SqlDataSource ID="sqlAppointments" runat="server" ConnectionString='<%$ ConnectionStrings:ConnectionString %>' |
SelectCommand="SELECT * FROM Appointments WHERE UserID = (SELECT TOP 1 UserID FROM User WHERE UserID_guid = @UserID) AND StartTime < EndTime" |
InsertCommand="INSERT INTO [Appointments] ([Subject], [Start], [End], [UserID], [RecurrenceRule], [RecurrenceParentID], [Description]) VALUES (@Subject, @Start, @End, @UserID, @RecurrenceRule, @RecurrenceParentID, @Description)" |
> |
<SelectParameters> |
<asp:Parameter Name="UserID" /> |
</SelectParameters> |
<InsertParameters> |
<asp:Parameter Name="Subject" Type="String" /> |
<asp:Parameter Name="Start" Type="DateTime" /> |
<asp:Parameter Name="End" Type="DateTime" /> |
<asp:Parameter Name="UserID" Type="Int32" /> |
<asp:Parameter Name="RecurrenceRule" Type="String" /> |
<asp:Parameter Name="RecurrenceParentID" Type="Int32" /> |
<asp:Parameter Name="Description" Type="String" /> |
</InsertParameters> |
</asp:SqlDataSource> |
protected void Page_Load(object sender, System.EventArgs e)
{
string[] sImagePath = new string[] {"/_Global/" + ModuleProperties.SiteID + "/img/content"};
radEdtContent.ImageManager.ViewPaths = sImagePath;
radEdtContent.ImageManager.UploadPaths = sImagePath;
radEdtContent.ImageManager.ContentProviderTypeName = typeof(myprovider).AssemblyQualifiedName;
}
public class myprovider : Telerik.Web.UI.Widgets.FileSystemContentProvider
{
public myprovider(HttpContext context, string[] searchPatterns, string[] viewPaths, string[] uploadPaths, string[] deletePaths, string selectedUrl, string selectedItemTag)
: base(context, searchPatterns, viewPaths, uploadPaths, deletePaths, selectedUrl, selectedItemTag)
{
}
public override string StoreFile(UploadedFile file, string path, string name, params string[] arguments)
{
//StoreFile method handles renaming of files if exists.
string fileExtention = name.Substring(name.LastIndexOf("."));
string fileNameWithoutExtension = name.Substring(0, name.IndexOf("."));
string newFileName = fileNameWithoutExtension + DateTime.UtcNow.Ticks + fileExtention;
string result = base.StoreFile(file, path, newFileName, arguments);
return result;
}
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. |
|
RadScheduler
There are 4000 patients. The DropDown does not allow text based searches. Users must scroll through thousands of patients to find the one they are looking for.
Is there a control, such as autocompletefield
, which better fits my needs?
http://www.telerik.com/community/forums/aspnet-ajax/grid/set-cancel-in-onrowclick-event.aspx
When trying to cancel the click, I had EnablePostBackOnRowClick="true"
And when trying to activate the click, I had: EnablePostBackOnRowClick="False"
I am using this for my grid click event:
grdGrid.ClientSettings.ClientEvents.OnRowClick = "GetDirtyGridRowClickReviewer" |
So I tried several other things from other posts and none work:
<script language="JavaScript" type="text/javascript"> |
<!-- |
function GetDirtyGridRowClickReviewer(sender, eventArgs) |
{ |
var sContinue; |
if (isDirty == 1) { |
sContinue = window.confirm("You have unsaved changes. Please select CANCEL if you would like to return to the form to save your changes. Please select OK if you wish to proceed and lose your changes."); |
if (sContinue != true) { |
//4/13/2010 |
//http://www.telerik.com/community/forums/aspnet-ajax/grid/deselecting-event-set-cancel-true-does-not-preserve-selectcolumn-status.aspx |
// below does nothing, continues to selected row... |
// var grid = $find("<%= grdReviewer.ClientID %>"); |
// var masterTableView = grid.get_masterTableView(); |
// row = masterTableView.get_dataItems()[0]; |
// setTimeout('row.set_selected(true);', 10); |
// below errors...4/12/2010 |
// says isn't supported as of 2009 |
// http://www.telerik.com/community/forums/aspnet-ajax/grid/set-cancel-in-onrowclick-event.aspx |
// eventArgs.set_cancel(true); |
// 4/9/2010 |
// below cancels everything, all buttons on page, everything. |
//$find("<%=grdReviewer.MasterTableView.ClientID %>").cancelAll(); |
return false; // cancel so they can save |
} |
} |
isDirty = 0; // reset if continue |
//http://www.telerik.com/community/forums/aspnet-ajax/grid/cancel-rowclick-event.aspx |
// 4/13/2010 set EnablePostBackOnRowClick="False" |
// below errors |
// doPostBack('<%=grdReviewer.ClientID %>'); |
// 4/13/2010 |
//http://www.telerik.com/community/forums/aspnet-ajax/grid/row-double-click-edit-and-row-click-edit-update-on-grid.aspx |
// doPostBack("<%= grdReviewer.UniqueID %>", "RowClicked:" + sender.get_masterTableView().get_dataItems()[editedRow]._itemIndexHierarchical); |
//http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/editondblclick/defaultcs.aspx |
// below errors object expected... |
var editedRow; |
editedRow = eventArgs.get_itemIndexHierarchical(); |
doPostBack("<%= grdReviewer.UniqueID %>", "RowClicked:" + sender.get_masterTableView().get_dataItems()[editedRow]._itemIndexHierarchical); |
return true; |
} |
// --> |
</script> |
Below are the links to the things I've tried.
http://www.telerik.com/community/forums/aspnet-ajax/grid/deselecting-event-set-cancel-true-does-not-preserve-selectcolumn-status.aspx
http://www.telerik.com/community/forums/aspnet-ajax/grid/set-cancel-in-onrowclick-event.aspx
http://www.telerik.com/community/forums/aspnet-ajax/grid/cancel-rowclick-event.aspx
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/editondblclick/defaultcs.aspx
Can someone please provide a working example of canceling or activating row click client side after asking if you wish to proceed?
Thanks!
I have two standard USB panels when I press the button I need to process fields on panel one, then hide panel one and display panel two. However when I press the button, the loading panel displays and the code behind fires... but once it is complete and the loading panel is hidden again the next panel is not shown. I have stripped the code down in another temporary file to remove all style sheets, external scripts etc etc and the problem still remains...
I simply can't see where I'm being stupid, please help :)
Partial Class matt_test
Inherits System.Web.UI.Page
Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
Panel1.Visible = False
pnl_test.Visible = True
System.Threading.Thread.Sleep(2000)
End Sub
End Class
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="matt-test.aspx.vb" Inherits="matt_test" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
asp:ScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
SupportsPartialRendering
=
"True"
/>
<
telerik:RadCodeBlock
ID
=
"RadCodeBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
var currentLoadingPanel = null;
var currentUpdatedControl = null;
function RequestStart(sender, args) {
currentLoadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID%>");
if (args.get_eventTarget() == "<%= Button1.UniqueID %>") {
currentUpdatedControl = "<%= Panel1.ClientID %>";
currentLoadingPanel.show(currentUpdatedControl);
}
}
function ResponseEnd() {
if (currentLoadingPanel != null) {
currentLoadingPanel.hide(currentUpdatedControl);
}
currentUpdatedControl = null;
currentLoadingPanel = null;
}
</
script
>
</
telerik:RadCodeBlock
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"Button1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"Panel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
<
ClientEvents
OnRequestStart
=
"RequestStart"
OnResponseEnd
=
"ResponseEnd"
/>
</
telerik:RadAjaxManager
>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
Skin
=
"Default"
BackgroundPosition
=
"Center"
EnableSkinTransparency
=
"true"
Visible
=
"true"
/>
<
div
id
=
"frame_mobilecontent"
>
<
asp:Panel
ID
=
"Panel1"
runat
=
"server"
class
=
"RegInputWrapper"
>
This<
br
/>
Is<
br
/>
A<
br
/>
Test<
br
/>
Panel<
br
/>
</
asp:Panel
>
<
asp:Panel
runat
=
"server"
ID
=
"pnl_test"
style
=
"background-color:Red;width:300px;height:600px;"
visible
=
"false"
>
This<
br
/>
Is<
br
/>
A<
br
/>
Test<
br
/>
Panel 2<
br
/>
</
asp:Panel
>
<
asp:Button
ID
=
"Button1"
runat
=
"server"
Text
=
"Button"
/>
</
div
>
</
form
>
</
body
>
</
html
>