<telerik:RadComboBox ID="ddlProject" runat="server" Height="190px" Skin="Outlook" DataValueField="Project_ID" AutoPostBack="true" Width="500px" AllowCustomText="True" ShowToggleImage="True" EmptyMessage="Choose Project Name" ShowMoreResultsBox="true" EnableLoadOnDemand="True" MarkFirstMatch="True" HighlightTemplatedItems="true" OnItemsRequested="ddlProject_ItemsRequested" EnableVirtualScrolling="true"> <HeaderTemplate> <table class="style1"> <tr> <td width="50%"> Customer Name </td> <td width="30%"> Project Name </td> </tr> </table> </HeaderTemplate> <ItemTemplate> <table class="style1"> <tr> <td width="50%"> <%# DataBinder.Eval(Container.DataItem, "ModelCustomer.Customer_Name")%> </td> <td width="30%"> <%# DataBinder.Eval(Container.DataItem, "Project_Name") %> </td> </tr> </table> </ItemTemplate> </telerik:RadComboBox>protected void RadScheduler1_ResourcesPopulating(object sender, ResourcesPopulatingEventArgs e) // Description: this methods initializes the extended properties of the scheduling information. { String aux = System.Web.HttpContext.Current.Session["ClubId"].ToString(); Int16 clubId = Convert.ToInt16(aux); e.SchedulerInfo = new SchedulerInfoExt(e.SchedulerInfo, clubId, System.Web.HttpContext.Current.Session["ResourceType"].ToString()); }
My requirements are as follows:
A grid with inline add capability.
A column with delete capability.
No edit capability. In line or otherwise.
My problem is twofold. One it seems the only way to get the Insert/Cancel buttons to show up on inline add is to have an edit column defined. If this is not accurate please let me know.
The second problem is once I have a edit column the add works. But I do not want to edit. I have figured out how to hide the edit button but an empty column doesn't satisfy the customer either.
I have figured out how to direct the edit column to my delete function.... but my only problem remaining is I cannot change the edit pencil sprite to be the delete X sprite or delete Trashcan sprite.. In fact what I get is both icons overlaid on top of one another. Perhaps there is a property I am unaware of to remove the edit pencil image?
Please help with either how to get the correct image to display in my hijacked edit column or if there is a simpler approach to meet my requirements that I am unaware of.
Here is my code:
<telerik:RadGrid ID="Grid" runat="server" AutoGenerateColumns="False" CellSpacing="0" GridLines="None" Skin="Outlook" OnNeedDataSource="GetDataSource" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" OnItemCommand="GridOnCommand" OnPreRender="GridPreRender"> <MasterTableView IsFilterItemExpanded="True" CommandItemDisplay="Top" EditMode="InPlace"> <CommandItemSettings ShowAddNewRecordButton="true" AddNewRecordText="Add Record" /> <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"> </RowIndicatorColumn> <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"> </ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn FilterControlAltText="Filter Col1 column" HeaderText="Col1" UniqueName="Col1" DataField="Col1"> </telerik:GridBoundColumn> <telerik:GridBoundColumn FilterControlAltText="Filter Col2 column" HeaderText="Col2" UniqueName="Col2" DataField="Col2"> </telerik:GridBoundColumn> <telerik:GridBoundColumn FilterControlAltText="Filter Col3 column" HeaderText="Col3" UniqueName="Col3" DataField="Col3"> </telerik:GridBoundColumn> <telerik:GridBoundColumn FilterControlAltText="Filter Col4 column" HeaderText="Col4" UniqueName="Col3" DataField="Col4"> </telerik:GridBoundColumn> <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditColumn"> </telerik:GridEditCommandColumn> </Columns> </MasterTableView> </telerik:RadGrid>Code Behind:
protected void GridPreRender(object sender, EventArgs e) { foreach (GridDataItem item in Grid.MasterTableView.Items) { ImageButton btn = (ImageButton)item["EditColumn"].Controls[0]; btn.CommandName = "Delete"; btn.CssClass = "rgDel"; btn.ToolTip = "Delete"; } }<telerik:RadToolTipManager runat="server" AnimationDuration="300" ShowDelay="200"EnableShadow="true" HideDelay="0" ID="RadToolTipManager1" Width="463px" Height="220px"RelativeTo="Element" Animation="Slide" Position="BottomCenter" OnAjaxUpdate="OnAjaxUpdate"Skin="Telerik" />Protected Sub rpExercise_ItemDataBound(sender As Object, e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles rpExercise.ItemDataBound Dim lnkBtn As Label = e.Item.FindControl("lblDetails") Dim currentRow As System.Data.DataRowView = DirectCast(e.Item.DataItem, System.Data.DataRowView) Me.RadToolTipManager1.TargetControls.Add(lnkBtn.ClientID, currentRow.Row("id").ToString(), True)End SubProtected Sub OnAjaxUpdate(sender As Object, args As ToolTipUpdateEventArgs) Me.UpdateToolTip(args.Value, args.UpdatePanel)End SubPrivate Sub UpdateToolTip(elementID As String, panel As UpdatePanel) Dim lbl As New Label lbl.Text = "Hi there" panel.ContentTemplateContainer.Controls.Add(lbl)End SubHi,
I am upgrading 2008 Q3 version of telerik control to 2011 Q3 version in my project in .NET 4.0. To localize/customize the HyperLinkManager of the editor, The LinkManager.ascx file (without .cs file) of the Telerik was customized.
We do have that file under RadControls\Editor\Dialogs folder. It used to work fine until we upgraded. Now, when we click the hyperlink manager icon on the editor it throws the below exception. Is there any workaround for this?
[NullReferenceException: Object reference not set to an instance of an object.] Telerik.Web.UI.Dialogs.UserControlResources.GetLocalizationScript() +995 Telerik.Web.UI.Dialogs.UserControlResources.OnPreRender(EventArgs e) +46 System.Web.UI.Control.PreRenderRecursiveInternal() +103 System.Web.UI.Control.PreRenderRecursiveInternal() +175 System.Web.UI.Control.PreRenderRecursiveInternal() +175 System.Web.UI.Control.PreRenderRecursiveInternal() +175 System.Web.UI.Control.PreRenderRecursiveInternal() +175 System.Web.UI.Control.PreRenderRecursiveInternal() +175 System.Web.UI.Control.PreRenderRecursiveInternal() +175 System.Web.UI.Control.PreRenderRecursiveInternal() +175 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint