<
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!