Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
125 views
Dear Admin,
I am using RadGanttChart in one of my project I have large amount of filed in my Task table is there is way we can give edit button in RadGanttChart and redirect to edit task page or some how display popup to edit task other fileds?

Regards,
Shakti
Hristo Valyavicharski
Telerik team
 answered on 16 Oct 2014
8 answers
1.2K+ views
Hello, all.

I have a tricky dynamic/programmatic creation issue which is I think different from any of the other ones I've been reading about here, i.e. "how do I programmatically create a column?", "how do I programmatically create a grid?" etc. I'm familiar with all the online references regarding those and have no problems there. My scenario:

  1. I have a RadGrid that is declared statically in the ASPX page.
  2. This RadGrid contains all GridBoundColumns, except for one GridTemplateColumn.
  3. In this GridTemplateColumn, I have only an empty <ItemTemplate></ItemTemplate> declared. (I also tried declaring an empty <EditItemTemplate></EditItemTemplate>, makes no difference.)
  4. Based on a condition that is only available after the RadGrid is databound (i.e. I perform a check on the contents of a column, similar to "((TextBox)gridItem["RenderHint"].Controls[0]).Text")...
  5. ...I then dynamically create a control and add it to the GridTemplateColumn (e.g. create a TextBox tb, then do something like "gridItem["Value"].Controls.Add(tb);"). I've found that since the condition is based on the data in the item, I need to do this step in ItemDataBound.

Everything I've described so far works perfectly. So here's where the trouble begins.

When it comes time to persist data back to the DB, in my ItemCommand for the RadGrid which receives the "Save" (from e.CommandName), I have a call to GridEditableItem.ExtractValues. This call to ExtractValues finds and pulls data for every other column (which is in edit mode at any rate), except for my GridTemplateColumn! As described above, this is the column where I am dynamically instantiating and adding a control.

If I perform the instantiation and addition earlier as a test (e.g. Page_Init), then of course the control is found - but my condition which is based on data is not yet available. In other words, even though I would love to build the grid programmatically in Page_Init, I can't do so because I don't know what kind of control I need to instantiate that early!

Ideas please? Regards,

Allen

Chris
Top achievements
Rank 1
 answered on 16 Oct 2014
9 answers
135 views
Hi,

We are using ExpandDelay in combination with ClickToOpen.
When users that are in a hurry clicks around in menues, it sometimes ends up in a state where sub-items can't be opened anymore.

Sample:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="menu.aspx.vb" Inherits="TestaTredjepartWeb.menu" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="s" runat="server">
        </asp:ScriptManager>
        <div>
            <table>
                <tr>
                    <td>
                        <telerik:RadMenu ID="menu" runat="server" RenderMode="Lightweight" ClickToOpen="true" ExpandDelay="1000">
                            <Items>
                                <telerik:RadMenuItem Text="Test1" Value="item1">
                                    <Items>
                                        <telerik:RadMenuItem Text="1"></telerik:RadMenuItem>
                                        <telerik:RadMenuItem Text="2">
                                            <Items>
                                                <telerik:RadMenuItem Text="22"></telerik:RadMenuItem>
                                                <telerik:RadMenuItem Text="23"></telerik:RadMenuItem>
                                            </Items>
                                        </telerik:RadMenuItem>
                                        <telerik:RadMenuItem Text="3"></telerik:RadMenuItem>
                                    </Items>
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem Text="Test2" Value="item2">
                                    <Items>
                                        <telerik:RadMenuItem Text="1"></telerik:RadMenuItem>
                                        <telerik:RadMenuItem Text="2"></telerik:RadMenuItem>
                                        <telerik:RadMenuItem Text="3"></telerik:RadMenuItem>
                                    </Items>
                                </telerik:RadMenuItem>
                            </Items>
                        </telerik:RadMenu>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>

In this sample do the following:
  1. Click the Test2 menu item to open it
  2. Move the cursor fast to Test1 item and click it before it open by itself (within 1 second since ExpandDelay=1000)
  3. Keep the mouse over the Test1 so it opens by itself
  4. When this has happened, the sub-items below Test1 (2->) can't be opened in any way until the menu is closed by clicking beside the menu!

You might think that this doesn't happen often, but for some users it actually does.
One other thing is that I think the second click should open it directly without waiting for the expandelay...

Regards
Andreas

Boyan Dimitrov
Telerik team
 answered on 16 Oct 2014
2 answers
91 views
Hi,
I am using "UI for ASP.Net AJAX Q2 2014", Telerik.Web.UI.dll version is 2014.2.618.45 and Visual Studio 2013, developing a website. 

On one of my webpage, upon a button click, I need to open up license agreement and need to ask user to "Agree" in order to continue. If user presses Disagree, want to take some actions serverside. 
I have a RadGrid, inside ItemTemplate, I have a linkButton and I want to open up this license agreement, based on a data field value, so lets say if that datafield value is "1" it should open up license agreement, if that datafield value is "0", it do not need to open up that license agreement. But if it opens up license agreement, I should be able to get "Agree" and "Do not Agree" on serverside.
<asp:LinkButton ID="lnkAddProduct"
CausesValidation="true" ValidationGroup="ValidationGroup2"
ToolTip="Add To Cart"
runat="server" CommandArgument='<%# Eval ( "PriceListID").ToString() %>'
CommandName="addproduct"><img style="border:0px" alt="" width="22px" height="22px" src="../Images/icons/shopcartapply3.ico"/> </asp:LinkButton>

So I want to display license agreement text upon click of a button, with Agree and Do not Agree buttons, and want to code on both "Agree" and "Do not agree" click. 
For License Agreement Text, I am fine using PDF to display or can also display Text, whatever is easy.

What I want to know is, is there any way to achieve above functionality using any of the Telerik Control? 

Nirav
Top achievements
Rank 1
 answered on 16 Oct 2014
6 answers
661 views
I recently changed a regular GridBoundColumn to a GridTemplateColumn so that it may serve as a RadComboBox instead of a textbox which allows users to choose from a dropdownlist or type in their own value which can be dynamically saved to the list. I do this in the Insert/Update methods of the Radgrid which will update the tables for the dropdownlists just fine. However, the RadGrid itself no longer finds a value for the column and inserts NULL into its actual column. I will break it down

RadGridTable
Columns: ClaimantID, StartDate, EndDate, NoteStatus

RadComboBoxTable
Columns: NoteStatusID, Text, ect.

The RadGrid has an aspx sqldatasource with an Insert command into the RadGridTable. This worked perfectly fine.
I added a new OnInsertMethod through C# that will grab the value from RadComboBox and put it into the RadComboBoxTable. This now works fine but on insert and update the value NULL gets put into the RadGridTable. Every other value works just fine.

Here is my RadComboBox:




<telerik:GridTemplateColumn FilterControlAltText="Filter NoteStatus column" HeaderText="Note Status" SortExpression="NoteStatus" UniqueName="NoteStatus" Visible="true">
                                <ItemTemplate>
                                    <%#DataBinder.Eval(Container.DataItem,"NoteStatus") %>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadComboBox ID="rcbNoteStatus" runat="server" DataField="NoteStatus" Text='<%#DataBinder.Eval(Container.DataItem,"NoteStatus") %>' EnableLoadOnDemand="true" OnItemsRequested="rcbNoteStatus_ItemsRequested" DataTextField="Description" DataValueField="Status" ></telerik:RadComboBox> 
                                </EditItemTemplate>
 </telerik:GridTemplateColumn>
Viktor Tachev
Telerik team
 answered on 16 Oct 2014
1 answer
261 views
Hi guys.

I need some help to implement this scenario: OnButton1_Click I need to close radwindow, and redirect the parent page.

Thnx in advance
Marin Bratanov
Telerik team
 answered on 16 Oct 2014
2 answers
164 views
Hi,

I am trying to toggle the visibility of a searchbox on my page using a button.
but for some reason the searchbox never disappear.

<asp:ImageButton
    ImageUrl="Images/zoom-search-2-icon.png"
    AlternateText="Search"
    ToolTip="Search"
    Height="32"
    Width="32"
    runat="server"
    CssClass="iconImageStyle"
    OnClientClick="Search_Click()" />
 
<telerik:RadSearchBox
    ID="CmbBx_Search"
    runat="server"
    Width="550px"
    EmptyMessage="Search..."
    OnClientSearch="PerformSearch"
    ShowSearchButton="true">
    <DropDownSettings Height="400" Width="300" />
    <WebServiceSettings Path="Main.aspx" Method="GetResults" />
</telerik:RadSearchBox>
 
<script type='text/javascript'>
    function Search_Click() {
        toggle_visibility('CmbBx_Search');
    }
 
    function toggle_visibility(id) {
        var e = document.getElementById(id);
        if (e.style.display == 'block')
            e.style.display = 'none';
        else
            e.style.display = 'block';
    }
</script>

From the code behind if I change the Visibility, it works.
But I do not want to do this from the code behind. I need to do it from client-side javascript.
Mickael
Top achievements
Rank 1
 answered on 16 Oct 2014
1 answer
228 views
Hi,

Is there a good way of implementing a way of selecting one of the uploaded files (e.g. with radio button) that an action will be performed on?
Optimally I would like to see it in the the list of files, for example in front of the file names.

Currently I am doing this by filling a RadCombobox box with the list of file names, but the UI is somewhat cluttered and not very transparent.

Thanks,
Markús
Boyan Dimitrov
Telerik team
 answered on 16 Oct 2014
3 answers
120 views
hello,
I was trying to test your demo's Grid - Batch Editing.
But I found the problem in GridNumericColumn..

I changed UnitPrice Column's Value
15.00 -> 15.99
But the cell's focus out.
Value is back to 15.00 (originally value)

http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx

Please test that
Milena
Telerik team
 answered on 16 Oct 2014
1 answer
120 views
Hi all -

I'm new to these controls.

I have a page that is using three grid controls.  One of the three controls is dependent upon successful data selection by the user from one of the other grids; the user selects the desired parameters via checkboxes and then clicks a button to populate the third grid. While all three are initially populating successfully, that third grid can have a lengthy result set and when I attempt to move to another page the grid empties and I get the default 'no data' message that I assigned to the 'NoMasterRecordsText' property although none of the other data on the page has changed.  Do I need to do something specific in the postback perhaps to get the pagination to work correctly?

Thanks in advance!
Eyup
Telerik team
 answered on 16 Oct 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?