Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
171 views

Hello,

I am using:

  • RadControls for ASP.NET v. 2013.2.717.40
  • .NET Framework 4.0
  • Windows 7 Enterprise 64-bit
  • Visual Studio 10
  • IE 9 and Firefox 24

I am creating an application based on the Window - RadWindow and MDI demo.  I have this working so far.  The main difference with my application and your demo is that I am using a RadToolBar at the top of the page instead of a RadMenu at the bottom left of the page to open new MDI RadWindows.  This is working fine as well.

I would like to create a ContextMenu for each tab that gets added to the tabstrip.  For example, when a new RadWindow is opened, I want to add a ContextMenu with the following menu items:  Minimize, Maximize, Restore, Arrange Horizontal, Arrange Vertical, Cascade, etc. In addition, depending on the specific RadWindow, I may want to add other menu items.

I initially started looking at how to do this from Javascript, but from what I read on the forums, the ContextMenu being a server control, must be created on the server.  So I would think I could create the ContextMenu in the RadToolBar button click event where I create the new RadWindow.  This seems easy enough but I don't know how to associate the newly created ContextMenu (from my server code) with the newly created Tab (from the Javascript code).

What is the best way to do this?

Thanks,
Randall Price
Senior Developer
Virginia Tech
Kate
Telerik team
 answered on 11 Oct 2013
6 answers
144 views
The new RadScheduler Q1 2013 will be full compatible with touch events like drag and grop appontements and long click for rad menu in IE10 Metro.

Now these events work only with iPad.

Thanks.  
Ivan Zhekov
Telerik team
 answered on 11 Oct 2013
2 answers
200 views

<

 

 

telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateEditColumn="True" CellSpacing="0" DataSourceID="objGetHaulsByTripcode" GridLines="Horizontal" AutoGenerateColumns="False">

 

 

 

 

 

 

 

<MasterTableView DataSourceID="objGetHaulsByTripcode">

 

 

 

 

 

 

 

<Columns>

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="TripCode" FilterControlAltText="Filter TripCode column" HeaderText="TripCode" SortExpression="TripCode" UniqueName="TripCode"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="VessReg" FilterControlAltText="Filter VessReg column" HeaderText="VessReg" SortExpression="VessReg" UniqueName="VessReg"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

<telerik:GridDropDownColumn DataField="TechniqueName" DataSourceID="getTechniques"

 

 

 

HeaderText="Technique" ListTextField="TechniqueFullName"

 

 

 

ListValueField="TechniqueCode" UniqueName="TechniqueName"

 

 

 

ColumnEditorID="TechniqueName" Reorderable="False"

 

 

 

Resizable="False"></telerik:GridDropDownColumn>

 

 

 

 

 

 

 

</Columns>

 

 

 

 

 

 

 

</MasterTableView>

 

 

 

 

 

 

 

</telerik:RadGrid>

 

 

 

 

 

 

 

 

<asp:SqlDataSource ID="objGetHaulsByTripcode" runat="server" ConnectionString="<%$ ConnectionStrings:FisheriesConnectionString %>"

 

 

 

SelectCommand="SELECT [TripCode], [VessReg], [TechniqueName] FROM [vwDisHaulsDetailsAll] WHERE ([TripCode] = @TripCode) ORDER BY [TripCode], [VessReg]">

 

 

 

 

 

 

 

<SelectParameters>

 

 

 

 

 

 

 

<asp:ControlParameter ControlID="ddlTripCode" Name="TripCode" PropertyName="SelectedValue" Type="String" />

 

 

 

 

 

 

 

</SelectParameters>

 

 

 

 

 

 

 

</asp:SqlDataSource>

 

 

 

 

 

 

 

 

<asp:SqlDataSource ID="getTechniques" runat="server" ConnectionString="<%$ ConnectionStrings:FisheriesConnectionString %>"

 

 

 

ProviderName="System.Data.SqlClient" SelectCommand="SELECT DisTechnique.Code AS [TechniqueCode], DisTechnique.Name AS [TechniqueFullName] FROM DisTechnique INNER JOIN DisGearTechniqueAllowed ON DisTechnique.Code = DisGearTechniqueAllowed.Code INNER JOIN DisTrips ON DisGearTechniqueAllowed.METHOD_CODE = DisTrips.GearCode WHERE ([TripCode] = @TripCode)">

 

 

 

 

 

 

 

<SelectParameters>

 

 

 

 

 

 

 

<asp:ControlParameter ControlID="ddlTripCode" Name="TripCode" PropertyName="SelectedValue" Type="String" />

 

 

 

 

 

 

 

</SelectParameters>

 

 

 

 

 

 

 

</asp:SqlDataSource>



Hi,

For my GridDropDownColumn DataField="TechniqueName" how can I show the [TechniqueName] FROM [vwDisHaulsDetailsAll] WHERE ([TripCode] = @TripCode) in the grid?

In select mode, the dropdown does not show anything in the row(s). I wish it to show what it stored in the database table, based on a TripCode.

Now, in Edit mode, it lists the 4 options ok. But I wish the selected value to be what has been already stored in the database for a row, based on a Trip Code.

Any advice please? Hope this question makes sense!

Thanks, Ida

 

Ida
Top achievements
Rank 1
 answered on 11 Oct 2013
3 answers
336 views

Hi,

How to populate a radcombobox in edit mode from code behind. I tried hard its not populating.

Thanks,
Dawson.
Princy
Top achievements
Rank 2
 answered on 11 Oct 2013
1 answer
222 views
I want to disable another button on my page when the user chooses a file for upload.  It looks like this has to be client side, which is fine, but when I wire up the OnClientAdding function it gets called when the page loads, and the ClientID of the RadUpload control evaluates to null.

How can I achieve what I want?

Thanks.
Shinu
Top achievements
Rank 2
 answered on 11 Oct 2013
1 answer
83 views
I have RadGrid with a quit extended NestedView where I show the details if the Item in a Html table. The Html is styled and there is photos in the table.

Now I would like to export only this NestedViewTemplate from this one Grid Item when the user click on a button inside the NestedViewTemplate.

Is this possible?

I have tried modify this sample:

http://www.telerik.com/community/forums/aspnet-ajax/grid/grid-export-to-excel-biff-format-hierarchy-and-selected-items.aspx#2816333 

By adding a NestedViewTemplate an expand those in the Prerender event. But first of I can't it to print the NestedViewTemplate and the export contains the headers.

Could some one point me in the right direction?  Thanks :-)

bool isExport = false;
protected void Button1_Click(object sender, EventArgs e)
{
    Session["SelectedItems"] = RadGrid1.SelectedItems;
    isExport = true;
 
    RadGrid1.ExportSettings.IgnorePaging = true;
    RadGrid1.ExportSettings.UseItemStyles = true;
    RadGrid1.ExportSettings.ExportOnlyData = true;
 
    RadGrid1.MasterTableView.ExportToExcel();
}
 
protected void RadGrid1_PreRender(object sender, EventArgs e)
{
    if (isExport)
    {
        foreach (GridDataItem item in RadGrid1.MasterTableView.Items)
        {
            item.Expanded = true;
        }
    }
}

Anders Pedersen

Kostadin
Telerik team
 answered on 11 Oct 2013
6 answers
549 views
Is there a quick an easy way to make sure that first item is selected?  After data-binding, the control doesn't have a selection (and the default message would show if set).  I was looking for a property to make sure the first item is selected instead of no selection.  I can easily set it in code-behind, but thought I might be missing something.

Thanks,
Chris
Bozhidar
Telerik team
 answered on 11 Oct 2013
1 answer
112 views
Guys i need your help. I recently work on C# .NEt and now i am looking for some good stuff that helps me in learning Asp.Net from scratch. Is there any one who can help me??
Shinu
Top achievements
Rank 2
 answered on 11 Oct 2013
3 answers
252 views
Hi. I added a telerik radgrid to my aspx page. Then I add values dynamically to it. I create a Datatable , and I add datas to it. After that, I set radgrid's datasource to datatable. It works good. Now I need to show export to excel, pdf buttons on this grid,, and export this datas to excel, word. How can I add export buttons and run thme  in dynamically created grid. Thanks in advance.
Shinu
Top achievements
Rank 2
 answered on 11 Oct 2013
2 answers
86 views
I would like to know if its possible to work out which item, by its initial Position, is being removed.
My preference is to do this in the Code Behind, but the only Event that is vaguely right is the autoCompleteRecipients_EntryRemoved event, but i believe this event fires too late for what i need.

in Javascript, the event seems to be OnClientEntryRemoving.

basically, when the Token is clicked to be removed - lets say its the 5th Token out of 10 - i want to store the fact that it is the 5th Token.
I will then use this number else-where in my code.

EDIT: it is possible for my AutoCompleteBox to have two different Tokens (entities) with the same text although they are not the same entity from the database.
e.g: my AutoCompleteBox would have a Token called 'David' which refers to the 'Manager' Entity, and another Token called 'David' which refers to the 'Director' Entity, so i cant find the position simply by the Text showing on the Token.

thanks for any help you can give.
David
Top achievements
Rank 1
 answered on 10 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?