Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
95 views
Hi,

I have never posted before, I hope this is the correct place. My markup is below. When I click the edit button on a row and make a change in the Edit form, no update events are raised on the datasource . I have copied the sample several times from the website but I still cannot get my events wired up properly. I am using WCSF and am quite familiar with this framework. The datasource seems to work fine if I use an asp.net GridView. Any help would be appreciated.
Thanks

    <pp:ObjectContainerDataSource ID="ds1" runat="server" 
        DataObjectTypeName="Foo.Infrastructure.Interface.Object" 
        ondeleted="ds1_Deleted" UsingServerPaging="True" UsingServerSorting="True" 
        oninserted="ds1_Inserted" onselecting="ds1_Selecting" onupdated="ds1_Updated" />
    <telerik:RadGrid 
        ID="grid" runat="server" GridLines="None" AutoGenerateColumns="False"
        AllowAutomaticInserts="True"
        AllowAutomaticUpdates="True"
         PageSize="100" AllowPaging="True" AllowSorting="True"
        Width="100%" 
        AutoGenerateEditColumn="True" CellSpacing="0" DataSourceID="ds1">
        <MasterTableView CommandItemDisplay="Top" EditMode="EditForms" HorizontalAlign="NotSet"
            AllowAutomaticInserts="false" AllowAutomaticUpdates="true" InsertItemDisplay="Top"
            runat="server" DataSourceID="ds1">
            <Columns>
                <telerik:GridBoundColumn DataField="Id" HeaderText="Id" DataType="System.Int32" />
                <telerik:GridBoundColumn DataField="Name" HeaderText="Name" DataType="System.String" />
                <telerik:GridBoundColumn DataField="ApplicationDomain" HeaderText="Domain" DataType="System.String" />
                <telerik:GridBoundColumn DataField="DefaultTheme" HeaderText="Theme" DataType="System.String" />
                <telerik:GridBoundColumn DataField="DateCreated" HeaderText="Created" DataType="System.DateTime" DataFormatString="{0:MMM dd yyyy}" />
                <telerik:GridBoundColumn DataField="DateOnline" HeaderText="Online" DataType="System.DateTime" DataFormatString="{0:MMM dd yyyy}" />
                <telerik:GridBoundColumn DataField="DateOffline" HeaderText="Offline" DataType="System.DateTime" DataFormatString="{0:MMM dd yyyy}" />
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
Ian
Top achievements
Rank 1
 answered on 29 Mar 2011
2 answers
103 views
I have a RadGrid with a GridButtonColumn that has CommandName="Delete".  When I click this button, the events for ItemCommand and DeleteCommand both fire.  In the ItemCommandEvent I run some code to delete the record from the database.

The record gets deleted from the DB, but the row still exists on the UI.  I've tried calling the Rebind() and DataBind() methods on my radgrid, but that makes no difference.

I've also tried using a GridClientDeleteColumn instead of the GridButtonColumn.  This causes the row to disappear from the UI, but no server-side events fire, so I cannot actually delete the data from the DB.
Jayd
Top achievements
Rank 1
 answered on 29 Mar 2011
5 answers
77 views
Hello,

Im trying to use modernizr.js in my application. It attaches classes to the <html> tag. When the page loads Telerik wipes out those classes and adds its own.

How do i prevent this? is there an option to append the classes without overwriting the ones im setting?

please advise.

Thank you
Niko
Telerik team
 answered on 29 Mar 2011
1 answer
34 views
For some unknown reason, my RadUpload 2009.1.527.35 (ASPNET AJAX Q1 2009) has malfanctioned both in my production and development servers on an application that has been online for years (with regular updates but nothing file related recently)

I have re-downloaded and installed the .MSI on my local machine and the live Upload samples are not working correctly either. The files (2MB - 99MB) upload fine, but there is no progress indicators.

If anyone else is recently having this problem, speak up so I know I am not crazy.

Local Machine: Win7, Asp.net 3.5, VS 2008 Web Server
Production: Win Server 2003 , Asp.net 2.0, IIS 6
Genady Sergeev
Telerik team
 answered on 29 Mar 2011
3 answers
204 views
Hello,

If I set the text of a RadTextBox to something like the following:
"\r\n\r\n\r\nSome text\r\n\r\n\r\nSome more text"

I believe there should be three empty lines and then on the fourth, "Some text".  This is how the standard asp.net textbox works when in multiline mode.

If I modify the text to:
"a\r\n\r\n\r\nSome text\r\n\r\n\r\nSome more text"
Then both textboxes behave the same.

The problem I have is that after a postback, if I intended there to be three empty lines before the text, only two are displayed on the page.  Thus, only two are returned in the Viewstate.  Upon a second postback, only one line exists in the Viewstate and so forth until non-space characters are all that is left at the beginning.

I have mocked up a simple page showing this issue.  After each click of the 'Postback' button another line is removed.  The Asp.Net textbox works just fine.  Is there a simple way to fix this?

<body>
    <form id="form1" runat="server">
    <div>  
        <telerik:RadScriptManager ID="ScriptManager1" runat="server"></telerik:RadScriptManager>
        <telerik:RadTextBox ID="txtMessage" runat="server" TextMode="MultiLine" Rows="10" Columns="200"/>
        <asp:TextBox ID="txtASPMessage" runat="server" TextMode="MultiLine" Rows="10" Columns="200"></asp:TextBox>
        <br />
        <asp:Button ID="btnPost" runat="server" onclick="btnPost_Click" Text="PostBack" />
    </div>
    </form>
</body>

    protected void Page_Init(object sender, EventArgs e)
    {
        txtMessage.Text = "\r\n\r\n\r\nSome text\r\n\r\n\r\nSome more text";
        txtASPMessage.Text = "\r\n\r\n\r\nSome text\r\n\r\n\r\nSome more text";
    }

    protected void btnPost_Click(object sender, EventArgs e)
    {
    }


Thank you in advance!

Chris
Maria Ilieva
Telerik team
 answered on 29 Mar 2011
4 answers
186 views
Hi there,

I have a radsplitter on 100% height. Everything seems to be working fine until I attach a AjaxUpdatedControl to the radsplitter.

Once I attach the AjaxUpdatedControl, the height of the radsplitter seems to be fixed at a particular height. You can refer to the 2 files to see the difference.

Below are my code

Btw, this only happens in Chrome. It works fine in IE8 and Opera. Haven't tested on FF.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="page_defaultmainpage.aspx.cs" Inherits="TravelBooking.page_defaultmainpage" %>
<%@ 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">
 
<head id="Head1" runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <title>ONLINE SYSTEM</title>
    <style type="text/css">
        html, body, form
        {
            margin: 0px;
            padding: 0px;
            height: 100%;
            width: 100%;
            overflow: hidden;
        }
    </style>
</head>
<body style="height: 100%; margin: 0px; overflow: hidden;">
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="ExRadScriptManager" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="ExRadAjaxManager" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="LeftPane">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="MainSplitter" LoadingPanelID="LoadingPanelAnimated" UpdatePanelRenderMode="Inline">
                    </telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="LoadingPanelAnimated" runat="server" BackColor="White"
        Transparency="38" MinDisplayTime="3000" Height="800px">
        <table cellpadding="0" cellspacing="0" style="width: 100%; height: 100%;">
            <tr>
                <td align="center" valign="middle" style="padding-bottom: 100px">
                    <img alt="Loading..." src='images/ajax-loader.gif' style="border: 0;" />
                </td>
            </tr>
        </table>
    </telerik:RadAjaxLoadingPanel>
    <table style="border-style: solid; border-width: 0px 0px 2px 0px; border-color: #808080;
        width: 100%;">
        <tr>
            <td width="480">
                <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl=""
                    PostBackUrl="~/management.aspx" Height="110px" />
            </td>
            <td>
                <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Names="Verdana" Font-Size="13pt"
                    Text="MAIN MANAGEMENT"></asp:Label>
            </td>
        </tr>
    </table>
    <div runat="server" id="super" style="width: 100%; height: 100%; background-color: #FF0000;">
    <telerik:RadSplitter ID="MainSplitter" runat="server" Skin="Black" Width="100%" Height="100%" HeightOffset="148" VisibleDuringInit="false">
        <telerik:RadPane ID="LeftPane" runat="server" Width="200px" BackColor="Black" BorderStyle="Solid">
            <div style="margin-top: 10px; margin-left: 8px; background-color: #000000;">
                <telerik:RadTreeView ID="ExLeftNavigator" runat="server" Skin="Black" Font-Bold="True"
                    Font-Names="Tahoma" Font-Size="8pt" >
                    <Nodes>
                        <telerik:RadTreeNode runat="server" Text="Management" Expanded="True">
                            <Nodes>
                                <telerik:RadTreeNode runat="server" Text="Option One">
                                </telerik:RadTreeNode>
                                <telerik:RadTreeNode runat="server" Text="Option Two">
                                </telerik:RadTreeNode>
                            </Nodes>
                        </telerik:RadTreeNode>
                        <telerik:RadTreeNode runat="server" Text="Booking Schedule" Expanded="True">
                            <Nodes>
                                <telerik:RadTreeNode runat="server" Text="Option Three">
                                </telerik:RadTreeNode>
                            </Nodes>
                        </telerik:RadTreeNode>
                        <telerik:RadTreeNode runat="server" Text="Others">
                        </telerik:RadTreeNode>
                    </Nodes>
                </telerik:RadTreeView>
            </div>
        </telerik:RadPane>
        <telerik:RadSplitBar ID="RadSplitBar1" runat="server" />
        <telerik:RadPane ID="ContentPane" runat="server" BackColor="White">
        </telerik:RadPane>
    </telerik:RadSplitter>
 
    <table style="border: 1px solid #808080; width: 100%; background-color: #000000;
        height: 30px;">
        <tr>
            <td width="480">
                  
                <asp:Label ID="Label3" runat="server" Text="Current Page:" Font-Bold="True" Font-Names="Tahoma"
                    Font-Size="9pt" ForeColor="White"></asp:Label>
                 <asp:Label ID="lbCurrentPage" runat="server" Font-Bold="True" Font-Names="Tahoma"
                    Font-Size="9pt" ForeColor="White"></asp:Label>
            </td>
            <td>
            </td>
        </tr>
    </table>
        </div>
    </form>
</body>
</html>
Niko
Telerik team
 answered on 29 Mar 2011
1 answer
473 views
Hi Sir,
i am binding my RadGrid with ORM like this

oadsSource.ObjectContextProvider = "RadControlApplication.EntitiesModel, RadControlApplication";
        oadsSource.TypeName = "RadControlApplication.TblCustomer";
        oadsSource.EnableDelete = false;
        oadsSource.EnableUpdate = false;
        oadsSource.EnableInsert = false;
        oadsSource.StoreOriginalValuesInViewState = false;
        rdGridCustomer.DataSourceID = "oadsSource";


here oadsSource is the object of my OpenAccessDataSource control, that i put in my aspx page.
and RadGrid is bound properly.


i am setting the properties of my radGrid for Excel Exporting as
        rdGridCustomer.ExportSettings.FileName = "MyDataFile";
        rdGridCustomer.ExportSettings.ExportOnlyData = true;
        rdGridCustomer.ExportSettings.IgnorePaging = false;
        rdGridCustomer.ExportSettings.OpenInNewWindow = true;
        rdGridCustomer.ExportSettings.Excel.FileExtension = "xls";
        rdGridCustomer.ExportSettings.Excel.Format = Telerik.Web.UI.GridExcelExportFormat.ExcelML;

  now on button click event i am writing this code

  this.rdGridCustomer.MasterTableView.ExportToExcel();
but i am facing the error
Key cannot be null. Parameter name: key
But if i bind my RadGrid with other data source like SQLDATASOURCE then its work fine.no error occurs.
and if i use other datasource like datatable then also its work fine for export in ExcelML format.
But i have to use ORM actuly.
I need solution please.
Thanks very much
Damyan Bogoev
Telerik team
 answered on 29 Mar 2011
1 answer
129 views
Good morning,

We have a page from which users can upload big files. We are using asyncUpload control to achieve this. 

In development enviroment, progress bar moves in a fluent way but, when in production, progress bar only makes 3 steps (not always the same, but very strange, because first step always starts over the 30%).

May we configure something to make this progress indicator more fluid?

Thank you very much
Genady Sergeev
Telerik team
 answered on 29 Mar 2011
1 answer
99 views
I was using the Telerik suite for a project and then upgraded to the most recent version when items in our RadWindows would go blank and FireBug would report a "Telerik is not defined" error. I swept the forums for a solution and everything pointed to the fact that we had to review our web.config or our caching.

Neither was an issue.

However, we solved the problem by removing the CdnSettings variable "TelerikCdn = 'Enabled'" and changed it to "Disabled". It appears that Telerik may not have updated their code in the cloud.

The following is our .NET block and the bold line is what was incorrect.

<telerik:RadScriptManager ID="RadScriptManager1" runat="server"
        EnablePartialRendering="true" EnableScriptCombine="True"
        EnableViewState="false"   ScriptMode="Release"
        LoadScriptsBeforeUI="false" CompositeScript-ScriptMode="Release">
        <CdnSettings TelerikCdn="Enabled" BaseUrl="~/js" />
</telerik:RadScriptManager>



Hope it helps.
Simon
Telerik team
 answered on 29 Mar 2011
1 answer
81 views
Hi Telerik Team,

i just upgraded my telerik version from Q3 2009 to Q3 2010.
now when i am opening a normal window (not rad window) from javascript, it open the window and automatically minimising .
it need to reopen agin from windows task bar.
if it is Rad Window , there is no problem.
it is happening when replaced the telerik dll to Q3 2010. if i replace the dll to Q3 2009, it is working ok.
please let me know what the updation i need to do in Q3 2010 version.

below the code i used.
function Popup_normal(url, title, width, height) {
  
            var l = (screen.width - width) / 2;
            var t = (screen.height - height) / 2;
            var feature = "width=" + width + ",height=" + height + ",left=" + l + ",top=" + t + ",scrollbars=1,resizable=1";
     
            mywindow = window.open(url, "title", feature);
            return false;
        }
Marin Bratanov
Telerik team
 answered on 29 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?