PharmacyLocationCollection pharmcol =new Select().From(Tables.PharmacyLocation).OrderAsc(PharmacyLocation.Columns.Location).ExecuteAsCollection<PharmacyLocationCollection>(); //ddlLocation.Items.Insert(0, new RadComboBoxItem("--select a location--", "0")); if (pharmcol.Count > 0) { int i = 0; foreach (PharmacyLocation p in pharmcol) { string loc = p.Location.ToString(); loc = loc.Replace("-", "\n"); ddlLocation.Items.Insert(i, new RadComboBoxItem(loc, p.RXPharmacyID.ToString())); i++; } ddlLocation.Enabled = true; }I have a radgrid with 2 Column of GridCheckBoxColumn View and Edit my whole project is ready only i want is that to add select all checkbox on header of radgrid. And I can not change GridCheckBoxColumn with GridTemplateColumn if I change then will face major problem.
My code is:
.aspx code
<telerik:RadGrid ID="RadGrid1" runat="server" AllowMultiRowSelection="true" GridLines="Vertical" OnBatchEditCommand="RadGrid1_BatchEditCommand" OnItemCreated="RadGrid1_ItemCreated" AutoGenerateColumns="False" OnNeedDataSource="RadGrid1_NeedDataSource" OnItemDataBound="RadGrid1_ItemDataBound" OnPreRender="RadGrid1_PreRender" EnableEmbeddedSkins="false" Skin="Custom1"> <GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings> <MasterTableView CommandItemDisplay="TopAndBottom" EditMode="Batch" DataKeyNames="FeatureID" CommandItemSettings-ShowSaveChangesButton="true" CommandItemStyle-CssClass="RadGrid_Custom1" ForeColor="#000066"> <RowIndicatorColumn Visible="False" > </RowIndicatorColumn> <ExpandCollapseColumn Created="True"> </ExpandCollapseColumn> <BatchEditingSettings Edittype="Cell" /> <CommandItemSettings ShowAddNewRecordButton="False" ShowSaveChangesButton="true"></CommandItemSettings> <Columns> <telerik:GridBoundColumn DataField="FeatureDesc" FilterControlAltText="Filter FeatureDesc column" ReadOnly="true" HeaderText="Feature" UniqueName="FeatureDesc" ItemStyle-HorizontalAlign="Left"> <ColumnValidationSettings> <ModelErrorMessage Text="" /> </ColumnValidationSettings> <HeaderStyle HorizontalAlign="Center" Width="200px" /> <ItemStyle HorizontalAlign="Left" Width="200px"></ItemStyle> </telerik:GridBoundColumn> </Columns> <EditFormSettings> <EditColumn InsertImageUrl="Update.gif" UpdateImageUrl="Update.gif" CancelImageUrl="Cancel.gif"></EditColumn> </EditFormSettings> <BatchEditingSettings OpenEditingEvent="MouseOver"></BatchEditingSettings> </MasterTableView> </telerik:RadGrid>Please help me as soon as possible with better solution.


I am trying to achieve this:
1. I have a master page (this has an AjaxManager)
2. I have a content page (this has an AjaxManager Proxy)
3. I have a RadGrid (GrdEnquiries) on the content page with a button labelled "Add Viewing" (BtnAddViewing). This grid contains details of people enquiring about leasing real estate properties.
4. The Add Viewing Button has a command argument matching the row ID of the grid (GrdEnquiries)
I want to be able to click the Add Viewing button and load a scheduler with an Advanced Form open in Insert Mode. The form is populated using a look up from the database to get the ID of the record passed from the command argument. When the INSERT button on the form is clicked I want the viewing to be added to the Appointments Table in the database, the window to close, and code executed in the grid to refresh the grid so that I can hide btnAddViewing and replace it with another button allowing me to display the appointment details in a Popup.
I have tried several examples both the demos for RadGrid and RadScheduler but I cannot work out how to do it. I have the code for:
1. Adding the command argument.
2. Opening a rad window and displaying the command argument.
3. Adding my scheduler form.
I cannot find an event that fires when the INSERT button is clicked so I am stuck. Can anyone provide me with the bit I am missing please?
This is my code for opening the page inside the window:
<telerik:RadCodeBlock ID="RadCodeBlock3" runat="server"> <script type="text/javascript"> function ShowInsertForm(id, rowIndex) { var grid = $find("<%=grdRightmove.ClientID%>"); var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element(); grid.get_masterTableView().selectItem(rowControl, true); window.radopen("viewing_arrange_popout.aspx?id=" + id, "UserListDialog2"); return false; } function refreshGrid(arg) { if (!arg) { find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("RebindRightMove"); } else { find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("RebindAndNavigateRightMove"); } } </script></telerik:RadCodeBlock>
This is the Window Manager on the content page (I use UserListDialog2):
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Bootstrap"> <Windows> <telerik:RadWindow RenderMode="Classic" ID="UserListDialog" runat="server" Title="Interactions" Width="1000" height="800" ReloadOnShow="true" ShowContentDuringLoad="false" Modal="true" VisibleStatusbar="False" Skin="Bootstrap" Animation="FlyIn" AutoSize="True" Behaviors="Close" AnimationDuration="600" AutoSizeBehaviors="Height"> </telerik:RadWindow> <telerik:RadWindow ID="UserListDialog2" runat="server" Title="Viewing" Height="800px" Width="800px" ReloadOnShow="true" ShowContentDuringLoad="false" Modal="true" VisibleStatusbar="False"> </telerik:RadWindow> </Windows></telerik:RadWindowManager>
My grid markup (I've removed some columns for clarity):
<telerik:RadGrid ID="grdRightmove" runat="server" AllowPaging="True" AllowSorting="True" Skin="Bootstrap" AutoGenerateColumns="False" Culture="en-GB" ShowFooter="True" MasterTableView-AllowMultiColumnSorting="True" PageSize="50" AllowFilteringByColumn="True" DataSourceID="SqlDataSourceEnquiries" EnableViewState="False" Width="100%" GroupingEnabled="False"> <ClientSettings> <Selecting AllowRowSelect="True"></Selecting> <Scrolling AllowScroll="False" UseStaticHeaders="True"/> <Resizing ResizeGridOnColumnResize="true" AllowResizeToFit="true" AllowColumnResize="True" AllowRowResize="True" EnableRealTimeResize="True"></Resizing> <ClientEvents OnRowDblClick="RowDblClick"></ClientEvents> </ClientSettings> <MasterTableView DataKeyNames="Id, ApplicationID, ViewingBooked" CommandItemDisplay="Top" AllowMultiColumnSorting="True" AllowFilteringByColumn="True" AllowSorting="True" > <PagerStyle AlwaysVisible="True"/> <Columns> <telerik:GridBoundColumn DataField="Id" DataType="System.Int32" HeaderText="Id" ReadOnly="True" SortExpression="Id" UniqueName="Id" Visible="False" AllowFiltering="False" AllowSorting="False"/> <telerik:GridTemplateColumn DataField="Id" HeaderText="Viewing<br>Booked" SortExpression="Id" UniqueName="ViewingBooked" Groupable="False" AllowFiltering="False" AllowSorting="False"> <ItemTemplate> <asp:Label ID="lblViewingBooked" runat="server"></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="Id" HeaderText="Actions" SortExpression="Id" UniqueName="ResendInvite" Groupable="False" AllowFiltering="False" AllowSorting="False"> <ItemTemplate> <telerik:RadButton ID="btnAddViewing" runat="server" Text="Add Viewing"/> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> </MasterTableView> </telerik:RadGrid>
Item Created looks like this:
If TypeOf e.Item Is GridDataItem Then dim theID as Integer=CType(e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("Id"), Integer) dim theViewingBooked as Boolean=CType(e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("viewingBooked"), Boolean) Dim lblViewingBooked As Label = DirectCast(e.Item.FindControl("lblViewingBooked"), Label) if theViewingBooked=true then lblViewingBooked.Text="<i class='fas fa-check-circle 2x'></i>" else lblViewingBooked.Text="<i class='far fa-times-circle 2x'></i>" End If Dim thisDataItem as griddataitem=ctype(e.Item,griddataitem) dim theApplicationId as Integer=CType(thisDataItem.GetDataKeyValue("ApplicationID"), Integer) Dim btnAddViewing As Radbutton = DirectCast(e.Item.FindControl("btnAddViewing"), RadButton) btnAddViewing.Attributes("href") = "javascript:void(0);" btnAddViewing.Attributes("onclick") = [String].Format("return ShowInsertForm('{0}','{1}');", theApplicationId, e.Item.ItemIndex) End If
The page I am putting into the Radwindow is this:
<script type="text/javascript"> function CloseAndRebind(args) { GetRadWindow().BrowserWindow.refreshGrid(args); GetRadWindow().close(); } function GetRadWindow() { var oWindow = null; if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well) return oWindow; } function CancelEdit() { GetRadWindow().close(); } </script> <asp:Label ID="lblApplicationID" runat="server" Text=""></asp:Label> <telerik:RadScheduler runat="server" ID="RadScheduler1" SelectedDate="2012-04-16" Height="1000px" Width="1500px" DataSourceID="DADDataSource" DataKeyField="ID" DataSubjectField="Subject" DataStartField="Start" DataEndField="End" OverflowBehavior="Auto" ShowAllDayRow="True" Skin="Bootstrap" StartInsertingInAdvancedForm="True" DayEndTime="21:00:00" DayView-DayEndTime="21:00:00" DayView-WorkDayEndTime="21:00:00" DayStartTime="07:00:00" DayView-DayStartTime="07:00" DayView-WorkDayStartTime="07:00" MultiDayView-DayEndTime="21:00" MultiDayView-DayStartTime="07:00" MultiDayView-WorkDayEndTime="21:00" MultiDayView-WorkDayStartTime="07:00" WeekView-DayEndTime="21:00" WeekView-DayStartTime="07:00" WeekView-WorkDayEndTime="21:00" WeekView-WorkDayStartTime="07:00" WorkDayEndTime="21:00:00" WorkDayStartTime="07:00:00" Culture="en-GB" TimelineView-StartTime="07:00" MinutesPerRow="15" HoursPanelTimeFormat="HH:mm tt" DataDescriptionField="Description" DataReminderField="Reminder" RowHeight="30px" EnableDescriptionField="True" RenderMode="Classic" ViewStateMode="Enabled" AdvancedForm-Modal="True" Reminders-Enabled="True" ExportSettings-FileName="TasksExport" Localization-AdvancedNewAppointment="New Task" Localization-AdvancedEditAppointment="Edit Task" Localization-AdvancedSubjectRequired="Please provide task subject" Localization-ConfirmDeleteText="Are you sure you want to delete this task?" EnableRecurrenceSupport="False" GroupBy="Date, Staff" GroupingDirection="Horizontal" TimelineView-UserSelectable="False" MultiDayView-UserSelectable="False"> <ExportSettings FileName="TasksExport" OpenInNewWindow="True" Pdf-PaperSize="A4" Pdf-AllowPrinting="True" Pdf-FontType="Embed"/> <AdvancedForm Modal="true"></AdvancedForm> <Reminders Enabled="true"></Reminders> <AgendaView UserSelectable="true" ResourceMarkerType="Block"/> <WeekView UserSelectable="true"/> <DayView UserSelectable="true"/> <MultiDayView UserSelectable="false"/> <Localization AdvancedEditAppointment="Edit Task" AdvancedNewAppointment="New Task" AdvancedSubjectRequired="Please provide task subject" ConfirmDeleteText="Are you sure you want to delete this task?"/> <TimelineView UserSelectable="false"/> <MonthView UserSelectable="true"/> <ResourceTypes> <telerik:ResourceType KeyField="ID" Name="Staff" TextField="Name" ForeignKeyField="UserID" DataSourceID="UsersDataSource"></telerik:ResourceType> <telerik:ResourceType KeyField="ID" Name="AssignedByID" TextField="Name" ForeignKeyField="AssignedByID" DataSourceID="AssignedByDataSource"></telerik:ResourceType> </ResourceTypes> <TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings> <AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings> </telerik:RadScheduler> <asp:SqlDataSource ID="DADDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:INTERPROPConnectionString %>" SelectCommand="SELECT * FROM [UserTasks]" InsertCommand="INSERT INTO [UserTasks] ([Subject], [Description], [Start], [End], [AssignedByID], [UserID], [Reminder], [Annotations]) VALUES (@Subject, @Description, @Start, @End, @AssignedByID, @UserID, @Reminder, @Annotations)" UpdateCommand="UPDATE [UserTasks] SET [Subject] = @Subject, [Description] = @Description, [Start] = @Start, [End] = @End, [AssignedByID] = @AssignedByID, [UserID] = @UserID, [Reminder] = @Reminder, [Annotations] = @Annotations WHERE [ID] = @ID" DeleteCommand="DELETE FROM [UserTasks] WHERE [ID] = @ID"> <DeleteParameters> <asp:Parameter Name="ID" Type="Int32"></asp:Parameter> </DeleteParameters> <UpdateParameters> <asp:Parameter Name="Subject" Type="String"></asp:Parameter> <asp:Parameter Name="Description" Type="String"></asp:Parameter> <asp:Parameter Name="Start" Type="DateTime"></asp:Parameter> <asp:Parameter Name="End" Type="DateTime"></asp:Parameter> <asp:Parameter Name="AssignedByID" Type="Int32"></asp:Parameter> <asp:Parameter Name="UserID" Type="Int32"></asp:Parameter> <asp:Parameter Name="Reminder" Type="String"/> <asp:Parameter Name="Annotations" Type="String"/> <asp:Parameter Name="ID" Type="Int32"/> </UpdateParameters> <InsertParameters> <asp:Parameter Name="Subject" Type="String"></asp:Parameter> <asp:Parameter Name="Description" Type="String"></asp:Parameter> <asp:Parameter Name="Start" Type="DateTime"></asp:Parameter> <asp:Parameter Name="End" Type="DateTime"></asp:Parameter> <asp:Parameter Name="AssignedByID" Type="Int32"></asp:Parameter> <asp:Parameter Name="UserID" Type="Int32"/> <asp:Parameter Name="Reminder" Type="String"/> <asp:Parameter Name="Annotations" Type="String"/> </InsertParameters> </asp:SqlDataSource> <asp:SqlDataSource ID="UsersDataSource" runat="server" ProviderName="System.Data.SqlClient" ConnectionString="<%$ ConnectionStrings:INTERPROPConnectionString %>" SelectCommand="SELECT * FROM [Users] WHERE Active=1 AND UseDad=1 ORDER BY Name"> </asp:SqlDataSource> <asp:SqlDataSource ID="AssignedByDataSource" runat="server" ProviderName="System.Data.SqlClient" ConnectionString="<%$ ConnectionStrings:INTERPROPConnectionString %>" SelectCommand="SELECT * FROM [Users] WHERE Active=1 AND UseDad=1 ORDER BY Name"> </asp:SqlDataSource> <asp:Button ID="btnSubmit" runat="server" Text="Submit" />
Code behind for pop up:
Private Sub ArrangeViewingPopoutWindowLoadEvent(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then ' Sanity check to make sure the ID is being passed through lblApplicationID.Text=request.QueryString("id") RadScheduler1.ShowAdvancedInsertForm(DateTime.Now) End If End Sub Private Sub RadScheduler1_FormCreated(sender As Object, e As SchedulerFormCreatedEventArgs) Handles RadScheduler1.FormCreated If e.Container.Mode = SchedulerFormMode.AdvancedInsert Then ' This will read information from the enquiry record and populate the controls with (for example) name/address/phone number in description End If End Sub
The button code (which I don't really want as I want the insertion of the appointment to trigger a close/grid rebind) is:
Private Sub btnSubmit_Click(sender As Object, e As EventArgs) Handles btnSubmit.Click ' THIS BIT SHOULD CLOSE THE WINDOW AND REBIND THE ENQUIRIES GRID ' IDEALLY I WANT THIS TO HAPPEN AFTER THE INSERT (WHICH DOESN'T HAPPEN) SO THEY DON'T HAVE TO PRESS ANOTHER BUTTON! ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CloseAndRebind(Rebind);", True) End SubI feel like this is ALMOST there but I am missing something obvious and I am now going bald pulling my hair out and my forehead is getting flatter from banging it on my desk.
Can anyone please help?
Screenshots to show flow if it helps are attached:
Thank you ...
Nick
Hi Team,
Drag & drop works in FileExplorer for files but not for directory,
So am using kendo for directory drag & drop.
But is there a way to merge kendo drag & drop in fileexplorer or make fileexplorer to accept directory drag & drop


Hello all.
This works when used .aspx side
<telerik:GridBoundColumn DataField="BookingRef" DataFormatString="<a href='my url link here' target='_blank'>Booking</a>" FilterControlAltText="Filter BookingRef column" HeaderText="BookingRef" SortExpression="BookingRef" UniqueName="BookingRef"> </telerik:GridBoundColumn>
but I'm trying to get it working programmatically but no data will show in the column. It's just blank.
This is in the page_init subroutine.
Dim BoundColumn3 As GridBoundColumn = New GridBoundColumn With {
.HeaderText = "Setup",
.DataField = "Tcode",
.UniqueName = "Tcode",
.DataFormatString = "<a href='my url link here' target='_blank'>Setup</a>"
}
Has anyone any tips or advice. I don't really have time to do this as described here.
https://docs.telerik.com/devtools/aspnet-ajax/controls/grid/defining-structure/creating-a-radgrid-programmatically
Colin.
