| <telerik:RadContextMenu ID="RadGrid1ContextMenu" runat="server" |
| OnClientItemClicked="RadGrid1ContextMenu_ClientItemClicked"> |
| <Targets> |
| <telerik:ContextMenuControlTarget ControlID="RadGrid1" /> |
| </Targets> |
| <Items> |
| <telerik:RadMenuItem Text="Status" Value="Status" |
| ImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box-uncheck.png" |
| SelectedImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box.png" Selected="true" /> |
| <telerik:RadMenuItem Text="Username" Value="UserName" |
| ImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box-uncheck.png" |
| SelectedImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box.png" Selected="true" /> |
| <telerik:RadMenuItem Text="Firstname" Value="FirstName" |
| ImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box-uncheck.png" |
| SelectedImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box.png" /> |
| <telerik:RadMenuItem Text="Lastname" Value="LastName" |
| ImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box-uncheck.png" |
| SelectedImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box.png" /> |
| </Items> |
| </telerik:RadContextMenu> |
Hi,
I am Using RADScheduler, I would like tocustomize the in-line edit and create window. How to close the Edit or Create window in server side event (RadScheduler1_AppointmentCommand)
Thanks
Sabarish
<FilterTemplate>
<telerik:RadDatePicker ID="PickupDatePicker" runat="server" Width="90px" ClientEvents-OnDateSelected="PickupDateSelected"
DbSelectedDate='<%# SetPickupDate(Container) %>' />
<telerik:RadScriptBlock ID="RadScriptPickupDate" runat="server">
<script type="text/javascript">
function PickupDateSelected(sender, args) {
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
var date = FormatPickupSelectedDate(sender);
tableView.filter("Pickup_Dt", date, "EqualTo");
}
function FormatPickupSelectedDate(picker) {
var date = picker.get_selectedDate();
var dateInput = picker.get_dateInput();
var formattedDate = dateInput.get_dateFormatInfo().FormatDate(date, dateInput.get_displayDateFormat());
return formattedDate;
}
</script>
</telerik:RadScriptBlock>
</FilterTemplate>
-------------------------------------
protected DateTime? SetPickupDate(Telerik.Web.UI.GridItem item)
{
if (item.OwnerTableView.GetColumn("Pickup_Dt").CurrentFilterValue == string.Empty)
{
return new DateTime?();
}
else
{
return DateTime.Parse(item.OwnerTableView.GetColumn("Pickup_Dt").CurrentFilterValue);
}
}
protected void uxRGrid_ItemCreated(object sender, GridItemEventArgs e)
{
if (e.Item is GridFilteringItem)
{
Telerik.Web.UI.RadDatePicker dtpickerPickupDate = (Telerik.Web.UI.RadDatePicker)(e.Item as Telerik.Web.UI.GridFilteringItem)["Pickup_Dt"].Controls[1];
dtpickerPickupDate.Culture = Thread.CurrentThread.CurrentUICulture;
}
}
-------------------------------------
| <telerik:GridTemplateColumn UniqueName="CheckListChecked" HeaderText="<%$ Resources:resources,Label_Finished %>"> |
| <ItemTemplate> |
| <asp:CheckBox ID="checkBoxCheckListChecked" Enabled="false" runat="server" Checked='<%# (Container is GridEditFormInsertItem) ? false : Eval("IsChecked") %>' /> |
| </ItemTemplate> |
| <EditItemTemplate> |
| <asp:CheckBox ID="checkBoxCheckListChecked" runat="server" Checked='<%# (Container is GridEditFormInsertItem) ? false : Eval("IsChecked") %>' /> |
| </EditItemTemplate> |
| </telerik:GridTemplateColumn> |
Hi dear telerikers!
I was just playing around with the new Prometheus Controls and would really like to inherit from RadGrid to extend it a little (for example i would rather open up the Editform as a RadWindow instead of using the built in custom editform)
I built a Server Control Library, added a reference to Telerik.Web.UI and also to System.Web.Extensions.
The custom control is defined as follows:
using
System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Softwaretailor.Web.UI.WebControls
{
public class CustomGrid : Telerik.Web.UI.RadGrid
{
}
}
Afterwards I added a Web Application and referenced the Server Control Project.
I modified the web.config file:
<
pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/>
<add tagPrefix="swt" namespace="Softwaretailor.Web.UI.WebControls" assembly="Softwaretailor.Web.UI"/>
</controls>
</pages>
When I add
<
telerik:RadGrid ID="RadGrid1" runat="server"></telerik:RadGrid>
everything works as expected....
trying to use my custom control like
<
swt:CustomGrid ID="CustomGrid1" runat="server"></swt:CustomGrid>
I get a Visual Studio (2008) warning:
Warning 1 Generation of designer file failed: Unable to create type 'swt:CustomGrid'. Could not load file or assembly 'Telerik.Web.UI, Version=2007.3.1218.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The system cannot find the file specified. D:\My Documents\Visual Studio 2008\Projects\RMA Management\WebPlayground\Default.aspx 18 0 WebPlayground
The project compiles, but neither is the designer-file modified correctly, nor do i get intellisense support in the .aspx file....
I'm literally tearing my hair the last hour... can't figure out what I'm doing wrong...
Any help greatly appreciated!!
Kind regards,
Wolfgang
I have a gridview with 3 levels and wants to use CommandItemTemplate in all 3.
I am using the command items depending of the mode the user is entering data (insert/update/delete)
F.eks the "Insert" button
asp:LinkButton ID="btninsert" runat="server" CommandName="PerformInsert" Visible='<%# RadGrid1.MasterTableView.IsItemInserted%>'>
<img style="border:0px" alt="" src="<%= this.TemplateSourceDirectory %>/Images/Insert.gif" />Insert Message
</asp:LinkButton>
and the delete button
<asp:LinkButton ID="LinkButton1" runat="server" Visible='<%#RadGrid1.EditIndexes.Count == 0 && !RadGrid1.MasterTableView.IsItemInserted%>'
OnClientClick="javascript:return confirm('Delete this Message?')" CommandName="DeleteSelected"><img style="border:0px" alt=""
src="<%= this.TemplateSourceDirectory %>/Images/Delete.gif" /> Delete Message
</asp:LinkButton>
The problem is the visible code asking if MasterTableView is in insert mode. I need the the possibility to ask if the child is in insert mode.
any suggestion ?
thx Torben