Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
182 views
I am attempting to use the new ContextMenuID feature with no success.  Here is a simplified version of what I'm doing.

<tel:RadScheduler ID="RadScheduler1" runat="server"
    <TimeSlotContextMenus> 
        <tel:RadSchedulerContextMenu ID="TimeSlotMenu" runat="server" > 
            <Items> 
                <tel:RadMenuItem Text="Menu Item 1" Value="1" /> 
            </Items> 
        </tel:RadSchedulerContextMenu> 
    </TimeSlotContextMenus> 
    <AppointmentContextMenus> 
        <tel:RadSchedulerContextMenu ID="AppointmentMenu1" runat="server" > 
            <Items> 
                <tel:RadMenuItem Text="Menu Item 2" Value="2" /> 
            </Items> 
        </tel:RadSchedulerContextMenu>    
        <tel:RadSchedulerContextMenu ID="AppointmentMenu2" runat="server" > 
            <Items> 
                <tel:RadMenuItem Text="Menu Item 3" Value="3" /> 
            </Items> 
        </tel:RadSchedulerContextMenu>    
    </AppointmentContextMenus> 
</tel:RadScheduler> 
 
public class TestApt { 
    public int ID { getset; } 
    public string Description { getset; } 
    public DateTime StartTime { getset; } 
    public DateTime EndTime { getset; } 
 
protected void Page_Init(object sender, EventArgs e) { 
    RadScheduler1.DataKeyField = "ID"
    RadScheduler1.DataSubjectField = "Description"
    RadScheduler1.DataStartField = "StartTime"
    RadScheduler1.DataEndField = "EndTime"
    RadScheduler1.AppointmentDataBound += new AppointmentDataBoundEventHandler(RadScheduler1_AppointmentDataBound); 
 
void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e) { 
    if ((int)e.Appointment.ID == 1) { 
        e.Appointment.ContextMenuID = "AppointmentMenu1"
    } else if ((int)e.Appointment.ID == 2) { 
        e.Appointment.ContextMenuID = "AppointmentMenu2"
    } else { 
        e.Appointment.ContextMenuID = ""
    } 
 
protected void Page_Load(object sender, EventArgs e) { 
    if (!Page.IsPostBack) { 
        List<TestApt> apts = new List<TestApt>(); 
        apts.Add(new TestApt { ID = 1, Description = "Test1", StartTime = new DateTime(2009, 11, 9, 10, 0, 0), EndTime = new DateTime(2009, 11, 9, 11, 0, 0) }); 
        apts.Add(new TestApt { ID = 2, Description = "Test2", StartTime = new DateTime(2009, 11, 9, 11, 0, 0), EndTime = new DateTime(2009, 11, 9, 12, 0, 0) }); 
        apts.Add(new TestApt { ID = 3, Description = "Test3", StartTime = new DateTime(2009, 11, 9, 12, 0, 0), EndTime = new DateTime(2009, 11, 9, 13, 0, 0) }); 
 
        RadScheduler1.DataSource = apts; 
        RadScheduler1.DataBind(); 
    } 

There are a couple of things that don't work here.
#1 All appointments are using "AppointmentMenu1" as their context menu.
#2 By setting the ContextMenuID equal to empty string, I am still getting a context menu on appointment 3.  (if this is by design, how can I accomplish this?)

Thanks,

Sean
Olivier
Top achievements
Rank 2
 answered on 21 Oct 2015
1 answer
763 views

I worked in radgrid itemdatabound for hiding cells, but how can i do it in radgridprerender event?

 

Viktor Tachev
Telerik team
 answered on 21 Oct 2015
5 answers
2.1K+ views
Hi All,

I'm getting the following not found. Are there any tips on how to solve this? I'm using .NET 4.0 framework in Visual Web Developer 2010 Express. I have been looking at this for hours now and can't get it to work. 

The call stems from this:

<telerik:RadScriptManager ID="ScriptManager1" runat="server" />

And gives a console error of the missing resource:

http://localhost:51383/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=navTop_ScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3ac9cbdec3-c810-4e87-846c-fb25a7c08002%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2011.2.712.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a326e32e2-cd52-462c-ba2c-db5128e4371b%3a16e4e7cd%3af7645509%3a24ee1bba%3a874f8ea2%3adc7e0bd%3a1569bb5f%3a63b115ed%3a30f1f089%3af46195d3%3a19620875%3a490a9d4e 

Not Found (404)

I've tried adding that location fix to my web config, removed references to runtimeversion2.0 etc. Scoured the web but nothing is helping, and leads anyone can give me would be super appreciated. I'm simply trying to get the HTML editor to function...
Plamen
Telerik team
 answered on 21 Oct 2015
1 answer
262 views

Hi Team,

Drag and Drop control is not working it is throwing error message because of e.DestDataItem is null in the RowDrop event. The radgrid is inside the user control and the user control is added dynamically to the page.

 Please provide the possible solution.

Thank You

Main Page :

-----------------

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackColor="white" CssClass="radLoadingPanel" Transparency="25">
<h1>Proof Generation in Process...</h1>
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
<asp:Panel ID="pnlVariables" runat="server">
</asp:Panel>
<div class="clear">
</div>
<div class="clear">
<asp:Label ID="lblNoOptions" runat="server" CssClass="errorMessage" Visible="False"></asp:Label><br />
<asp:Label ID="lblErrorMessage" runat="server" CssClass="errorMessage" Visible="False"></asp:Label>
</div>
<asp:Panel ID="pnlButton" runat="server">
<label id="lblProcessTimeWarning" runat="server" style="display: block; margin-bottom: 10px;" visible="false">
</label>
<asp:Button ID="btnCreateProofs" runat="server" Text="Save" />
</asp:Panel>
</telerik:RadAjaxPanel>

Main Page code Behind

-------------------------------

  Dim tuc As Modules_Controls_BookBuilderControl = CType(LoadControl("~/Modules/Controls/BookBuilderControl.ascx"), Modules_Controls_BookBuilderControl)
tuc.ID = oRow("FriendlyName").ToString()
tuc.CartID = CType(oRow("CartID"), Long)
pnlVariables.Controls.Add(tuc)

 

Usercontrol.ascx

----------------------

<telerik:RadGrid ID="Parts" runat="server" ClientIDMode="AutoID" AllowPaging="True" AllowSorting="True" ClientSettings-AllowAutoScrollOnDragDrop="true"
AutoGenerateColumns="False" GridLines="None" ShowStatusBar="True" CssClass="Parts" ClientSettings-AllowDragToGroup="true" ClientSettings-AllowRowsDragDrop="true">
<ClientSettings AllowRowsDragDrop="True" AllowColumnsReorder="true" ReorderColumnsOnClient="true">
<Selecting AllowRowSelect="True" EnableDragToSelectRows="false"></Selecting>
<ClientEvents OnBatchEditOpening="batchEditOpening"></ClientEvents>
<Scrolling AllowScroll="true" UseStaticHeaders="true"></Scrolling>
</ClientSettings>
<MasterTableView Name="PartsTableView" ClientIDMode="AutoID" DataKeyNames="InventoryID" AllowSorting="True" NoDetailRecordsText="No Items" HierarchyLoadMode="ServerBind"
NoMasterRecordsText="No Items Added" CommandItemDisplay="Bottom" EditMode="Batch">
<CommandItemSettings ShowAddNewRecordButton="false" ShowCancelChangesButton="false" ShowRefreshButton="false"/>
<BatchEditingSettings EditType="Cell" />
<DetailTables>
<telerik:GridTableView Name="ComponentDetails" Caption="Component Details" DataKeyNames="InventoryID"
runat="server">
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="ParentID" MasterKeyField="InventoryID" />
</ParentTableRelation>
<Columns>
<telerik:GridTemplateColumn UniqueName="ThumbNail">
<ItemTemplate>
<asp:Image ID="imgThumbNail" runat="server" ImageUrl='<%#Eval("Thumbnail")%>' />
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="ParentID" Display="false" UniqueName="ParentID" />
<telerik:GridBoundColumn DataField="InventoryID" Display="false" UniqueName="InventoryID" />
<telerik:GridBoundColumn DataField="FormNumber" HeaderText="Product Code" UniqueName="FormNumber" />
<telerik:GridBoundColumn DataField="Description" HeaderText="Title" ReadOnly="true"
UniqueName="Description" Display="True" />
</Columns>
</telerik:GridTableView>
</DetailTables>
<Columns>
<telerik:GridTemplateColumn UniqueName="ThumbNail">
<ItemTemplate>
<asp:Image ID="imgThumbNail" runat="server" ImageUrl='<%#Eval("ImageUrl")%>' />
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="InventoryID" UniqueName="FormNumber" Display="false" />
<telerik:GridBoundColumn DataField="Text" ItemStyle-Width="150px" HeaderText="Product Code" />
<telerik:GridBoundColumn DataField="Description" HeaderText="Title" Display="true" />
<telerik:GridBoundColumn DataField="Type" Display="false" />
<telerik:GridButtonColumn ButtonType="LinkButton"
CommandName="DeleteInventory" Text="Remove" UniqueName="Delete">
<ItemStyle HorizontalAlign="Center" CssClass="buttonContainer"></ItemStyle>
<HeaderStyle ></HeaderStyle>
</telerik:GridButtonColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
<asp:XmlDataSource ID="XMLBookBuilderSource" runat="server" EnableCaching="false">
</asp:XmlDataSource>

 

 UserControl Code Behind

--------------------------------------

 

Protected Sub Parts_RowDrop(sender As Object, e As GridDragDropEventArgs) Handles Parts.RowDrop
Try
Dim element As XElement
Dim root As New XElement("BookBuilder")
element = XMLDoc.Root.Elements("Node")(e.DraggedItems(0).ItemIndex)
XMLDoc.Root.Elements("Node")(e.DraggedItems(0).ItemIndex).Remove()
If (XMLDoc.Root.Elements("Node").Count = e.DestDataItem.ItemIndex) Then
XMLDoc.Root.Elements("Node")(e.DestDataItem.ItemIndex - 1).AddBeforeSelf(element)
Else
XMLDoc.Root.Elements("Node")(e.DestDataItem.ItemIndex).AddBeforeSelf(element)
End If
Session("XMLDoc") = XMLDoc
Parts.Rebind()
Catch ex As Exception
WriteLog4Net("Unable to Drag and Drop:: ", ex)
End Try
End Sub

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Pavlina
Telerik team
 answered on 20 Oct 2015
3 answers
190 views

Hello, 

I i have a Rad​ListBox with checkboxes named "myCkList".
Im my case, i check some boxes and i observe CheckedItems in server side after clicking button. I'm suprised because myCkList.CheckedItems.Count = 0 ...

 In fact, it's because i added property Enabled=false to myCkList in ​aspx page (of course i enable it client side before clicking checkboxes) !

Is it a normal behavior in asp.net ?

I can work with Enabled=true and set_enabled(false) from pageLoad..., no problem.

Ivan Danchev
Telerik team
 answered on 20 Oct 2015
1 answer
126 views

I am trying to use rad menu for the top navigation in sharepoint custom master page. I noticed that it shows the home tab and every thing under that as a dropdown (2nd level) menu. Is there a way to display it from the second level, so that i see the second levels as the top level.

 Is there is a solution for this issue through Telerik Controls or not ?

Nencho
Telerik team
 answered on 20 Oct 2015
1 answer
111 views

How could i get the search context menu to render on the right hand side of the search box, verses the left side as it does by default.?

 Thanks

Ivan Danchev
Telerik team
 answered on 20 Oct 2015
1 answer
103 views

This component shows a lot of potential use for our company. Before I would begin any planning, it would be helpful to understand what is already on your docket for development. Are any or these items planned?

- Validation of fields, even very basic such as text only or numeric only?

- Cell data binding to provide lookup fields for specific cells?

- Cell tooltips?

- Splitter functionality?

- Scripting functionality where code could respond to values input in cells?

Any insight would be appreciated.

Rumen
Telerik team
 answered on 20 Oct 2015
1 answer
135 views
​​How to add autocomplete in kendo ui spreadsheet in html
Viktor Tachev
Telerik team
 answered on 20 Oct 2015
0 answers
157 views

Hello Telerik Team,

          I have one big problem not display GridTemplateColumn Item Template Item If No Record found in detail table view.

I take Checkbox in GridTemplateColumn ItemTemplate at Detailtableview. See the below code.

   <DetailTables>​

          <telerik:GridTableView runat="server" cssClass="​class1" DataKeyNames="​test" Name="​testchild" ShowFooter="true" AllowSorting="true"             EnableLinqExpressions="false" AllowCustomPaging="false" AllowFilteringByColumn="False" AllowMultiRowSelection="false" AutoGenerateColumns="false" >
                                <NoRecordsTemplate>
                                      <div> no child record display</div>
                                    </NoRecordsTemplate>
                                <ParentTableRelation>
                                    <telerik:GridRelationFields DetailKeyField="​test" MasterKeyField="​test" />
                                </ParentTableRelation>
                                <Columns>​

                          <telerik:GridTemplateColumn UniqueName="Checkout" Visible="true" HeaderStyle-Width="25px">
                                        <HeaderTemplate>
                                            Checkout<br />
                                            <asp:CheckBox ID="chkCheckOutAll" runat="server" AutoPostBack="false" />
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkCheckOut" runat="server" TypeId="1" AutoPostBack="false" />
                                        </ItemTemplate>
                                        <FooterTemplate>
                                            Count: <asp:Label runat="server" ID="lblcount"></asp:Label>
                                        </FooterTemplate>
                                    </telerik:GridTemplateColumn>

                     </telerik:GridTableView>
            </DetailTables>

In the above code If No record found  at detailtableview then checkbox in Item Template GridTemplateColumn not display it. see the attached screenshot of childList.png. I do too much RND related to NoRecordTemplate display Item values. But I dont get any proper solution related to template column.

So I request to can you tell me the such type above possibility are available in telerik radgrid control ?. If yes then please give me proper solution about that because its urgent for me to do like that.

 Hope I get my solution from your Team,

Thanks & Regards

 Kishan Prajapati

Kishan
Top achievements
Rank 1
 asked on 20 Oct 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?