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

This is a test project with a problem in Telerik components

In the "default.aspx", a button and a modal window, clicking on the button shows the modal window “popup.aspx”; that has a date picker

Clicking on the view calendar button of the date picker doesn’t show the calendar! Instead it shows the layer under the modal window

This problem with IE only (at least IE7 I’m using), working perfectly with Firefox, Safari, and Chrome
I'm using Telerik 2009 Q1

Default.aspx:

 

<%

@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<

html xmlns="http://www.w3.org/1999/xhtml">

 

<

head runat="server">

 

 

<title>Test</title>

 

 

<script language="javascript" type="text/javascript">

 

 

function windowOpen() {

 

 

var oWnd = radopen("Popup.aspx", "windowModal");

 

 

oWnd.center();

 

}

 

</script>

 

</

head>

 

<

body bgcolor="yellow">

 

 

<form id="form1" runat="server">

 

 

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

 

 

<div>

 

 

<input type="button" value="open" runat="server" id="btnOpen" onclick="javascript:windowOpen();" />

 

 

<telerik:RadWindowManager ID="windowManagerModal" runat="server" Skin="Black">

 

 

<Windows>

 

 

<telerik:RadWindow ID="windowModal" runat="server" ShowContentDuringLoad="true" Behaviors="Close" VisibleStatusbar="false"

 

 

Animation="FlyIn" Width="700px" Height="700px" Modal="true" Title="Popup">

 

 

</telerik:RadWindow>

 

 

</Windows>

 

 

</telerik:RadWindowManager>

 

 

</div>

 

 

</form>

 

</

body>

 

</

html>


Popup.aspx:

 

<%

@ Page Language="C#" AutoEventWireup="true" CodeFile="Popup.aspx.cs" Inherits="Popup" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

 

 

<!

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<

html xmlns="http://www.w3.org/1999/xhtml">

 

<

head runat="server">

 

 

 

 

<title>Popup</title>

 

</

head>

 

<

body>

 

 

 

 

<form id="form1" runat="server">

 

 

 

 

<div>

 

 

 

 

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

 

 

 

 

<telerik:RadDatePicker ID="RadDatePicker1" runat="server" Skin="Black">

 

 

 

 

<Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False"

 

 

ViewSelectorText="x" Skin="Black" runat="server"></Calendar>

 

 

 

 

<DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>

 

 

 

 

</telerik:RadDatePicker>

 

 

 

 

</div>

 

 

 

 

</form>

 

</

body>

 

</

html>

Any Help?

 

Sebastian
Telerik team
 answered on 24 Mar 2009
3 answers
246 views
Hi,

We are trying to do something like Telerik online purchase check out list where user could update the quality by using combobox and also delete product as they wish.

We only manage to bind the session to the Grid, but, we are not able to bind the delete command and also the edit to the Grid item. The RadGrid1_ItemDeleted will never been fired.

Please advice.

Dim objDT As System.Data.DataTable 
Dim objDR As System.Data.DataRow 
 
Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource 
objDT = Session("Cart") 
RadGrid1.DataSource = objDT 
End Sub 
 
Protected Sub RadGrid1_ItemDeleted(ByVal source As Object, ByVal e As Telerik.Web.UI.GridDeletedEventArgs) Handles RadGrid1.ItemDeleted 
' Some code to delete 
End Sub 
 
Private Sub makeCart() 
If IsNothing(Session("Cart"))Then 
objDT = New System.Data.DataTable("Cart") 
objDT.Columns.Add("ID", GetType(Integer)) 
objDT.Columns("ID").AutoIncrement = True 
objDT.Columns("ID").AutoIncrementSeed = 1 
objDT.Columns("ID").Unique = True 
objDT.Columns.Add("Quantity", GetType(Integer)) 
objDT.Columns.Add("ProductName", GetType(String)) 
objDT.Columns.Add("ProductID", GetType(Integer)) 
objDT.Columns.Add("Cost", GetType(Decimal)) 
Session("Cart") = objDT 
End Sub 

            <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" GridLines="None" ShowFooter="True" AllowPaging="True" AllowAutomaticDeletes="True" PageSize="20" AllowAutomaticUpdates="True" OnNeedDataSource="RadGrid1_NeedDataSource"> 
                <PagerStyle Mode="NextPrevAndNumeric" /> 
                <MasterTableView DataKeyNames="ID" HorizontalAlign="NotSet" AutoGenerateColumns="False"> 
                <Columns> 
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"> 
                        <ItemStyle CssClass="MyImageButton" /> 
                    </telerik:GridEditCommandColumn>                 
                    <telerik:GridBoundColumn Aggregate="Count" DataField="ID" HeaderText="Product ID" 
                        FooterText="Total products: " UniqueName="ID"> 
                    </telerik:GridBoundColumn>     
                    <telerik:GridBoundColumn DataField="ProductName" HeaderText="Product name" SortExpression="ProductName" 
                        UniqueName="ProductName"> 
                    </telerik:GridBoundColumn>      
                    <telerik:GridBoundColumn Aggregate="Sum" DataField="Cost" HeaderText="Unit price" 
                        FooterText="Total unit price: " UniqueName="Cost"> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn Aggregate="Sum" DataField="Quantity" HeaderText="Qty" 
                        FooterText="All units in stock: " UniqueName="Quantity"> 
                    </telerik:GridBoundColumn>  
                    <telerik:GridCalculatedColumn HeaderText="Total Price" UniqueName="TotalPrice" DataType="System.Double" 
                        DataFields="Quantity, Cost" Expression="{0}*{1}" FooterText="Total Price: " 
                        Aggregate="Sum" />                                                              
                    <telerik:GridButtonColumn ConfirmText="Delete this product?" ButtonType="ImageButton" CommandName="Delete" Text="Delete" 
                        UniqueName="DeleteColumn"> 
                        <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> 
                    </telerik:GridButtonColumn>                      
                </Columns> 
                </MasterTableView> 
                 
            </telerik:RadGrid> 



Sebastian
Telerik team
 answered on 24 Mar 2009
1 answer
115 views
Hello!

I think I've found small bug. When I convert my web application to Telerik Web Application in web.config there is added:
<authentication mode="Windows" /> 
even if I have already
    <authentication mode="Forms"> 
      <forms name="login" loginUrl="~/admin/login.aspx" /> 
    </authentication> 
Regards
Andrey
Telerik team
 answered on 24 Mar 2009
3 answers
505 views
I am in the process of upgrading my application from ASP.NET Classic controls to the ASP.NET AJAX controls.

I have multiple places where I use a RadGrid inside an MS UpdatePanel - Using a Linkbutton (or a GridButtonColumn) on each row. The LinkButton fires the ItemCommand event back on the server, which in turn prepares some information in another UpdatePanel on the page and calls a ModalPopupExtender to show the second UpdatePanel as a modal box. Here is some psuedo code on how its set up...

... Aspx Page Structure ...

<UpdatePanel id=UpdatePanel1>
    <RadGrid id=RadGrid1 OnItemCommand="RadGrid1_ItemCommand" >
        Grid Markup
    </RadGrid>
</UpdatePanel>

<UpdatePanel id=UpdatePanel2>
    <ModalPopupExtender id=ModalPopupExtender1>        
    Page Markup
</UpdatePanel>

...code behind...

RadGrid1_ItemCommand(sender, args)
{    
    ...format controls in UpdatePanel2 ...
    
    UpdatePanel2.Update()
    ModalPopupExtender1.Show()
}

This has been working great with the Classic RadGrid - but now with the AJAX RadGrid the ModalPopupExtender1.Show() will not display the modal box. The ItemCommand is firing just fine and the code executes as before. It just wont "Show" the popup extender. I have other modal popup extenders on the page that are displayed using the codebehind .Show() method of the extender, but are just not called from within the grid and they are working fine also.

What is different about the AJAX version of RadGrid that would make this happen? Any clues on how to resolve the issue?

Thanks... Russ
    
    
Sebastian
Telerik team
 answered on 24 Mar 2009
2 answers
155 views
Hi,

Is it possible to hide only top border of plot area? Its common in business charts.

Best regards
possible
Top achievements
Rank 1
 answered on 24 Mar 2009
1 answer
131 views
Hi telerik team,

i have a doubt relative to resize of image inside editformsettings.
 in one of my radgrid  save and cancel  images available, if i use those images inside editformsettings half of the text is getting crop (For ex: save in which v , cancel c is not getting visible ) i m unable to give width or height of image .but same images if i give in templatecolumn looking fine. the code which i followed is below
<EditFormSettings>                                                                    
                                        <EditColumn ButtonType="ImageButton" UpdateImageUrl="~/App_Themes/images/save2.gif" 
                                            EditImageUrl="~/App_Themes/images/Edit.gif" InsertImageUrl="~/App_Themes/images/save2.gif" 
                                            CancelImageUrl="../App_Themes/images/cancel1.gif" Resizable="true" InsertText="Insert Document" 
                                            UpdateText="Update Document" UniqueName="EditCommandColumn1" CancelText="Cancel "> 
                                        </EditColumn> 
                                        <FormTableButtonRowStyle Width="100%" HorizontalAlign="Right"></FormTableButtonRowStyle>                                         
                                    </EditFormSettings>
Yavor
Telerik team
 answered on 24 Mar 2009
1 answer
210 views
I am trying to retrieve data from a stored procedure. Our SP's are written to be generic so while they can have up to 24 parameters they only need one parameter (or many) to run. I have built a grid that puts a default value into one of 8 parameters for this SP. If I run a Test Query I get the data I expect back. When I try running the web page I get nothing (actually a thin gray bar across the top of the web page). I know the connection and page are setup correctly because if I run another SP that has no parameters I get data back. Any ideas on why this is occurring (or not)? Does this have something to do with binding?

TIA,

Joe B
Shinu
Top achievements
Rank 2
 answered on 24 Mar 2009
1 answer
86 views
Hi
   I am using Rad grid in my application. I have to display some message on RequestStart and RequestEnd events when a link is clicked. It works correctly for certain links and not works for a particular link.
For some links it calls RadGridNamespace.AsyncRequest() javascript function and it works coorectly. For a particular link it calls the javascript function RadGridNamespace.AsyncRequestWithRequest()  and it doesnt fire the RequestEnd event.

Please help me out in this issue.

Thanks in advance.

Gayatri
Yavor
Telerik team
 answered on 24 Mar 2009
1 answer
164 views
Hi,
I am using older version of telerik controls. RadGrid is not rendering its skin (any which i set) and also its giving javascript error "RadGridNameSpace is undefined". I am only getting this error on my one site. while it is working perfect on my other sites.
I have already put radcontrols folder on root of site. also rad dlls in bin folder. Its very strange to me why it is happening with me.please help me to resolve this issue.

  <radg:RadGrid  ID="gridReport" runat="server" AllowPaging="True" AllowSorting="True"
                                            AutoGenerateColumns="True" EnableAJAX="True" EnableAJAXLoadingTemplate="True"
                                            EnableOutsideScripts="True" 
                                            PagerStyle-Mode="NumericPages" PagerStyle-Position="TopAndBottom" PageSize="20"
                                            Skin="GrayGrid" Width="100%" OnNeedDataSource="gridReport_NeedDataSource" OnItemDataBound="gridReport_ItemDataBound" OnSortCommand="gridReport_SortCommand" OnColumnCreated="gridReport_ColumnCreated">
                                            <ClientSettings>
                                                <ClientEvents OnRequestStart="RequestStart" />
                                                <Selecting AllowRowSelect="True" />
                                            </ClientSettings>
                                            <MasterTableView CommandItemDisplay="Top">
                                                <CommandItemTemplate>
                                                    <table class="TGridComTemplate">
                                                        <tr>
                                                            <td id="tdButtonExport">
                                                                <asp:LinkButton ID="lbtExcel" runat="server" CssClass="LabelStyle" OnClick="lbtExcel_Click"
                                                                    OnClientClick="return ExportReport()"><img style="border:0px" alt="" src="../../Images/excel.gif" /> Export to Excel</asp:LinkButton></td>
                                                            <td id="tdPrint">
                                                            &nbsp;<asp:LinkButton ID="lbtPrint" runat="server" CssClass="LabelStyle"
                                                                    OnClientClick="return PrintReport()" OnClick="lbtPrint_Click"><img style="border:0px" alt="" src="../../Images/print.gif" /> Print</asp:LinkButton>
                                                           </td>
                                                        </tr>
                                                    </table>
                                                </CommandItemTemplate>
                                                <Columns>                                                                                              
                                                </Columns>
                                                <ExpandCollapseColumn Visible="False">
                                                    <HeaderStyle Width="19px" />
                                                </ExpandCollapseColumn>
                                                <RowIndicatorColumn Visible="False">
                                                    <HeaderStyle Width="20px" />
                                                </RowIndicatorColumn>
                                            </MasterTableView>
                                            <CommandItemStyle HorizontalAlign="Left" />
                                            <HeaderStyle HorizontalAlign="Center" />
                                            <ItemStyle HorizontalAlign="Center" />
                                            <AlternatingItemStyle HorizontalAlign="Center" />
                                            <PagerStyle Mode="NumericPages" Position="TopAndBottom" />
                                        </radg:RadGrid>
Georgi Krustev
Telerik team
 answered on 24 Mar 2009
9 answers
655 views
How do I get the data vaues in the insert command?

And after I save the data, how do I close the input window?

Here's what I've tried:

    Protected Sub RadGrid_InsertCommand(ByVal source As Object, ByVal e As GridCommandEventArgs)
        'Get the GridEditFormInsertItem of the RadGrid       
        Dim insertedItem As GridEditFormInsertItem = TryCast(e.Item, GridEditFormInsertItem)
        ' Get an error on the next line
        Dim ProductName As String = (TryCast(insertedItem("ProductName").Controls(0), TextBox)).Text
        Dim UnitPrice As String = (TryCast(insertedItem("UnitPrice").Controls(0), TextBox)).Text
        Dim UnitsOnOrder As String = (TryCast(insertedItem("UnitsOnOrder").Controls(0), TextBox)).Text
        Dim insertQuery As String
        insertQuery = "insert into Products set "
        insertQuery = insertQuery & " ProductName='" & ProductName & "'"
        insertQuery = insertQuery & " ,UnitPrice=" & UnitPrice
        insertQuery = insertQuery & " ,UnitsOnOrder=" & UnitsOnOrder
        ' Execute the query
        GridDataBind()  ' Now that the data has been changed

    End Sub

Bruce
Top achievements
Rank 1
 answered on 24 Mar 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?