Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
128 views
I have a TemplateColumn inside a Radgrid as follows. I populate the grid using NeedDataSource.
 
               <telerik:GridTemplateColumn UniqueName="name1" SortExpression="Id" HeaderText="Product#" DataField="Number" >
                        <ItemTemplate>
                                <asp:Literal runat="server" ID="ltId" Text='<%# Eval("Product.Id") %>'></asp:Literal>
                        </ItemTemplate>
                        <EditItemTemplate>                        
                            <telerik:RadTextBox runat="server" ID="txtProductNumber" Text='<%# Eval("Product.Id") %>'
                                Width="120px" OnTextChanged="ProductNumber_TextChanged" AutoPostBack="true" >
                            </telerik:RadTextBox>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>

When  I enter text in the textbox and hit enter,  it is calling the default button on the page. How can I make it call the  "OnTextChanged" event for the textxbox Instead?

Thanks for the Help in advance!!
Sri
Sravanthi
Top achievements
Rank 1
 asked on 25 May 2012
1 answer
113 views
Hello,

I have one issue which is related to displaying pdf report in aspx page. In our company we couldn't use Adobe PDF Reader, that's why we can't use standard telerik ReportViewer. Instead of this I have to embed pdf object into aspx page and then from server side inject into this object generated report.

<object><embed width="100%" type="application/pdf" id="pdfObject" runat="Server"></embed></object>

My issue appears, when user clicks on border of opened radwindow. After that, radwindow is reopen second time and generated report is regenerated , too. Strange thing is, that this issue appears only on PC with Windows7 OS and IE 8 browser. On Win XP with IE8 or Windows 7 with IE 9 this issue didn't appear. 

So I need to prevent reopening radwindow by cancelling mouse click on border on radwindow. Please could somebody point me, how can I trap mouse event when user clicks on radwindow border ?

Here is my page code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Report_skladove_polozky_z_objednavky.aspx.cs"
    Inherits="_Default" Async="false" %>
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register Assembly="Telerik.ReportViewer.WebForms" Namespace="Telerik.ReportViewer.WebForms"
    TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<head id="Head1" runat="server">
    <%--<link href="~/Scripts/CSS/EditFormStyles.css" rel="stylesheet" type="text/css" />--%>
    <title>Tlačová zostava</title>
    <style type="text/css">       
        #AllPanel
        {
            width:100%;
            height:100%;
            margin:0px;
            padding:0px;
            font-family: Arial, Helvetica;
            font-size: 14px;
        }
         
        #AllPanel a
        {
            color: black;
            text-decoration: none;
        }
    </style>
 
    <script language="JavaScript" type="text/javascript">
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow)
                oWindow = window.radWindow;
            else if (window.frameElement.radWindow)
                oWindow = window.frameElement.radWindow;
            return oWindow;
        }
 
        function content_onkeydown(e) {      
            //alert("clicked in content page content");
            try {
                if (!e) e = window.event;
                if (e.keyCode == 27) {
           FocusOnRadWindow();
                   var oWindow = GetRadWindow();  //Obtaining a reference to the current window 
           oWindow.Close(); 
                }
            }
            catch (err) { }       
        }       
 
        function FocusOnRadWindow() {
            GetRadWindow().GetContentFrame().contentWindow.focus();           
        }
 
        function secondFn() {
            window.setTimeout(function () {
                var senderElementStyle = GetRadWindow().get_popupElement().style;
                //alert(senderElementStyle.width + "   " + senderElementStyle.height);
                document.getElementById("pdfObject").style.height = parseInt(senderElementStyle.height) - 63 + "px";              
            }, 0)
            window.setTimeout(function () {               
                GetRadWindow().GetContentFrame().contentWindow.focus();
            }, 1000)
        }
 
        document.onkeydown = content_onkeydown;
</script>
 
</head>
<body">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager2" runat="server">
    </asp:ScriptManager>
    <telerik:RadSkinManager ID="RadSkinManager2" runat="server" ShowChooser="false" Skin="Hay">
    </telerik:RadSkinManager
 
   <object><embed width="100%" type="application/pdf" id="pdfObject" runat="Server"></embed></object>
  
    </form>
</body>
</html>


Thank you for your ideas.

Best regards

Vasssek 
Vasssek
Top achievements
Rank 1
 answered on 25 May 2012
1 answer
150 views
i have a radgrid bound to an entitydatasource. the data has two primary keys which i want to hide. unfortunately attempting to do so creates innumerable nasty side effects. is it possible to hide two columns without losing the ability to set and get values?

i tried first to hide the column but visible=false only hides the column for display. the column bursts forth in all its glory on the insert and update forms of the grid. i don't want users supplying key values.

i set display= false but that didn't hide the column

i set the column to readonly=true but then i could not set the key values. (the grid represents a child of a parent grid - so i am reading the key values of the selected parent row to propagate to the child row. subsequently the insert failed because it had no key values.

when i tried turning the column into a template, (insertedItem["ItemID"].Controls[0] as TextBox) failed to find the column.

is there no way to hide a column and still get and set its values? the real need is to set 2 primary key values (which are foreign keys) before the insert occurs. i thought i could do this in the insertcommand event but events are showing otherwise.

Richard
Top achievements
Rank 1
 answered on 25 May 2012
0 answers
33 views
Hello,

I'm currently working with a user of mine on an issue that they're having with the drag-to-select functionality acting slow/choppy. Often there is a second of lag between when the rows are highlighted and when they are finally selected. Due to requirements from the aforementioned user, paging (which I realize would most likely remedy the problem) isn't an option and I'm working with very large result sets.

Is there any way to optimize the drag-to-select functionality?

Thank you

Anthony
Top achievements
Rank 1
 asked on 25 May 2012
2 answers
95 views
How can I determine which level of the hierachy a selected row is a part of in the SelectedIndexChanged event?  Like for instance in the ItemCommand Event, I can check the e.CommandName to determine which level was clicked.

Example

Main level - row 1
    Detail level 1 - row 1
            Detail level 2 - row 1
            Detail level 2 - row 2

I want to know when Detail level 2 - row 1 is selected vs when the Main level being selected.

Thanks!


Julia Helton
Top achievements
Rank 1
 answered on 25 May 2012
2 answers
148 views
Hi,

I have a method that dynamically (programmatically) creates standard HTML input checkboxes. This is on a page that uses a MasterPage in which the page I am working on is inside a "RadAjaxPanel".

The problem is that I cannot assign the ".CssClass" property to my checkboxes because the value is overwritten with a "rfdRealInput" class. I need to assign these checkboxes a class so I can reference them using JavaScript (in particular, jQuery).

How do I stop this overwriting of the ".CssClass" property so I can give these input checkboxes my own class?

Thank you,

Adam T. Carlson
Adam
Top achievements
Rank 1
 answered on 25 May 2012
1 answer
78 views
Hi,
I have requirement to collapse groups and see them listed together. I have found from previous threads in this forum that it cannot be done. I am checking if this has been taken care of with recent version of Telerik Grid?

I am able to pull grid column to Grouping area and collapse groups, however all groups are not listed one after on the same page. Depeding upon the records in groups, some times I have only one group on page and next group would be on other page.
This is issue because I have grid with huge data and we have to go though many pages.
Pavlina
Telerik team
 answered on 25 May 2012
0 answers
80 views
Hi.

I have two users controls in MasterPage. (UserControl1.ascx and UserControl2.ascx)

How can i refresh the UserControl2.ascx from UserControl1.ascx?

Thank you!

Jan
Top achievements
Rank 1
 asked on 25 May 2012
3 answers
139 views
I can't seem to find a simple approach to this.

I need to completly disable the timeSlotContextMenus for all TimeSlots in the monthly view. Client side or server side, wither will work.
Thanks
Joe
Ivana
Telerik team
 answered on 25 May 2012
1 answer
135 views
Hey guys,

We are working with the Grid and struggling to get it to do what we need. Our requirements are as follows:

1. The underlying table will have millions of records, so custom paging of data is critical.

2. Several columns will require multi-select capability. For example, their is a manufacturer column. We need to be able to show all unique values in a combobox, allowing the user to select which ones to filter on. They would check one or more entries and only records with those values would be shown.

3. Date columns require various filter conditions, including "Between" which would show To and From fields in the filter row/header.

Can this be done? We do not want to use RadFilter, and performance is critical. 

Thanks for the help, guys.

 Rob
Eyup
Telerik team
 answered on 25 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?