Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
132 views

Hi..
I have an ajax panel with the following code - I want to show a radwindow - but it doesn't work any ideas?
when I remove the ajax panel it works.. thanks

 

 

this.RadAjaxManager.ResponseScripts.Add(@"Sys.Application.add_load(function(){radalert('Zipcode Not Found', 250, 100);})");

 

 

Maria Ilieva
Telerik team
 answered on 18 Nov 2008
2 answers
107 views
Hi,

I have a RadGrid which is bound to a datasource. In one column it might happen that
the item's name is an empty string. In this case I want to display "No name" instead of
nothing.
I tried to do this using the OnItemDataBound handler but I don't know how to access
the Item's text. How can I do this?

Best regards,
Robert
Daniel
Telerik team
 answered on 18 Nov 2008
3 answers
146 views
Hi

I'm having a strange issue with the PanelBar set FullExpandedItem and 100% height. My panelbar is placed in a div which gets the height 
set by javascript the same time the Splitter next to it (OnClientLoaded / OnClientResized), so far everything works fine. 

PanelBar Markup:
 <UI:PanelBar ID="Navigation" runat="server" Height="100%" Width="175px" ExpandMode="FullExpandedItem" style="position: static; border: 0px;"

On Page Load it looks like this: On load

But after the first klick on a PanelItem the last Item is pushed beneath my footer: After klick

Another problem is if i resize the page (making it higher, smaller works!) the OnClientResized event of the Splitter fires, the height of the 
div gets changed but the PanelBar doesn't use the new free space...
Unfortunately PanelBar doesn't have a set_height() method like other controls, this would be the best approach imho.

Anyone having / had the same problems? Thanks...



Alex Gyoshev
Telerik team
 answered on 18 Nov 2008
1 answer
112 views
Hi
   I have two pages that use the RADUpload control.
   Page 1 has been working perfectly for 1 year, I have created a new Page 2 and now once you specify the file to upload and press submit, the progress bar doesnt appear.

  I have noticed that if I try to upload a file the 2nd time the progress bar does appear.

 Both pages use:

 

<asp:ScriptManager ID="MainScriptManager" runat="server" EnablePartialRendering="true" />

 

and both pages have the following:

<

 

tr>

 

 

   <td width="110" height="20" class="Fieldtitle">Upload File</td>

 

 

   <td><radU:RadUpload ID="ctlRadUpload" runat="server" MaxFileInputsCount="1" Width="300px" ControlObjectsVisibility="ClearButtons"/></td>

 

 

</tr>

 

 

<tr><td colspan="2">

 

 

   <p><radU:RadProgressManager ID="ctlRadProgressManager" runat="server" Width="300px" /></p>

 

 

   <radU:RadProgressArea ID="ctlRadProgressArea" runat="server" DisplayCancelButton="true" /></td>

 

 

</tr>

 


and the upload button:

<

 

asp:ImageButton runat="server" ID="btnUploadNew" ImageUrl="UploadBtn.gif" CommandName="New" OnCommand="handleVideoUpload" />

 



Jason
Blaize
Top achievements
Rank 1
 answered on 18 Nov 2008
2 answers
158 views
Hi guys, I am quite new to the telerik controls so hopefully you can be a little patient with my first question. ;)

I have a RadGrid with a DataTable as its DataSource. I want to use extended filtering functions which I developed myself and just reset the DataSource to a completely new DataTable which I create with my custom filtering methods.
I bind the DataTable with the recommendation in one of the examples:
protected void PriceGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e) 
    { 
        DataTable dataSource = getGridData(); 
        Session["priceGridDataSource"] = dataSource; 
        PriceGrid.DataSource = dataSource
    } 

The Function getGridData returns a DataTable which it gets using a generated SQL Command to retrieve the data from a SQL server.

But calling .Rebind() after my DataSource has changed doesn't fire the NeedDataSource event and so the DataGrid doesn't get the updated DataTable as its source.
The Rebind-Call is from an ASP.NEt AJAX request using a button_click event which sets the custom filter and changes the SQL command.

Thank you very much for your help, yours Rene



Rene
Top achievements
Rank 1
 answered on 18 Nov 2008
4 answers
190 views
Hi.

We are trying to develope a webpage with the following elements:

            <radA:RadAjaxManager ID="ajaxMngr" runat="server" DefaultLoadingPanelID="ajaxMngrLP" OnResolveUpdatedControls="ajaxMngr_ResolveUpdatedControls"
                <AjaxSettings> 
                    <radA:AjaxSetting AjaxControlID="listGrid"
                        <UpdatedControls> 
                            <radA:AjaxUpdatedControl ControlID="details" /> 
                            <radA:AjaxUpdatedControl ControlID="listGrid" /> 
                        </UpdatedControls> 
                    </radA:AjaxSetting> 
                </AjaxSettings> 
            </radA:RadAjaxManager> 
            <radA:AjaxLoadingPanel ID="ajaxMngrLP" runat="server" Transparency="50"
                <img src="RadControls/Ajax/Skins/Default/LoadingProgressBar.gif" alt="Loading..." 
                    style="border: 0;" /> 
            </radA:AjaxLoadingPanel> 
            <asp:Panel ID="details" runat="server"
            </asp:Panel> 
            <br /> 
            <radG:RadGrid ID="listGrid" runat="server" EnableAJAX="true" EnableAJAXLoadingTemplate="true" 
                LoadingTemplateTransparency="55" PageSize="10" Skin="Green" OnNeedDataSource="listGrid_NeedDataSource" 
                OnItemCreated="listGrid_ItemCreated" OnSelectedIndexChanged="listGrid_changeSelected" 
                AllowPaging="True"
                <MasterTableView Width="100%" DataKeyNames="ID" CommandItemDisplay="Top" Style="white-space: normal" 
                    GridLines="Vertical"
                </MasterTableView> 
                <ClientSettings EnablePostBackOnRowClick="true"
                    <Selecting AllowRowSelect="True" /> 
                </ClientSettings> 
                <PagerStyle Mode="NextPrevAndNumeric" ShowPagerText="False"></PagerStyle> 
            </radG:RadGrid> 




The details panel contains a WebUserControl that we are loading like this:

    public void LoadUserControl(string controlName) 
    { 
        UserControl userControl = (UserControl)this.LoadControl(controlName); 
        userControl.ID = GetUserControlID(controlName); 
        this.details.Controls.Add(userControl); 
    } 
 

This WebUserControl has the particularity its fields (RadTextBoxes, RadNumericTextBoxes,...) are retrieved from database, depending of the information we want to show. Our objective is when we change the selected row of the RadGrid, the WebUserControl data changes, but this AJAX reload of the control never arrives.

We followed some feeds we found in the Telerik forums and Telerik examples, but we haven't success.

Any help or suggestion?

Thanks in advance.

f_alonso
Top achievements
Rank 1
 answered on 18 Nov 2008
1 answer
167 views
I have only a progress bar on a page, no upload file control (I dont need it). i need the progress bar to show a long running database process. (Please see attached sample).
I have followed every step given in the samples however, the progress bar is not visible. I have re-created the problem, please have a look, thanks Don Almeida.

PS-->I dont see a way to upload a sample project on this forum, what is the best way to do this?
Erjan Gavalji
Telerik team
 answered on 18 Nov 2008
1 answer
85 views
We've developed an open-source shopping cart. And we want to use your ASP.NET Ajax components into our solution. What license should we buy? Do you have free version of ASP.NET Ajax components?
Daniel
Telerik team
 answered on 18 Nov 2008
9 answers
357 views
I got some problems with using template columns. Rad Version - 2008.3.1016.35
The question is: why DataBinding template event doesn't fires after postback and can it be fixed?
To illustrate it I done the test described below.
using System; 
using System.Data; 
using System.Data.SqlClient; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using Telerik.Web.UI; 
 
namespace Test.WebApplication 
    public partial class postbacktest : System.Web.UI.Page 
    { 
        protected RadGrid dataGrid; 
 
        private string keyColumnName; 
 
        protected void Page_Init(object sender, EventArgs e) 
        { 
            dataGrid = RadGrid1; 
 
            dataGrid.Skin = "Office2007"
            dataGrid.Width = 800; 
 
            dataGrid.AllowAutomaticDeletes = false
            dataGrid.AllowAutomaticInserts = false
            dataGrid.AllowAutomaticUpdates = false
            dataGrid.AutoGenerateColumns = false
            dataGrid.AutoGenerateEditColumn = false
            dataGrid.AutoGenerateDeleteColumn = false
 
            dataGrid.MasterTableView.EditMode = GridEditMode.InPlace; 
            dataGrid.MasterTableView.ShowFooter = true
 
 
            dataGrid.EnableAjaxSkinRendering = true
 
 
            BindGridToDataTable(); 
 
 
            //AddEditColumn(); 
            AddTextColumn("first""ProductName"); 
            AddTextColumn("id""ProductID"); 
            AddNumericColumn("second""Number", NumericType.Currency); 
            AddColumn("test""ComboID"); 
            AddDeleteColumn(); 
        } 
         
        public void AddColumn(string headerText, string dataField) 
        { 
            GridTemplateColumn templateColumn = new GridTemplateColumn(); 
            BPTemplate temp = new BPTemplate(dataField, keyColumnName); 
            templateColumn.ItemTemplate = temp; 
            templateColumn.EditItemTemplate = temp; 
            templateColumn.HeaderText = headerText; 
            templateColumn.UniqueName = dataField; 
            dataGrid.MasterTableView.Columns.Add(templateColumn); 
        } 
 
        public void AddTextColumn(string headerText, string dataField) 
        { 
            GridBoundColumn boundColumn = new GridBoundColumn(); 
            boundColumn.HeaderText = headerText; 
            boundColumn.DataField = dataField; 
            boundColumn.UniqueName = dataField; 
            dataGrid.MasterTableView.Columns.Add(boundColumn); 
        } 
 
        public void AddNumericColumn(string headerText, string dataField, NumericType type) 
        { 
            GridNumericColumn numericColumn = new GridNumericColumn(); 
            numericColumn.HeaderText = headerText; 
            numericColumn.DataField = dataField; 
            numericColumn.UniqueName = dataField; 
            numericColumn.NumericType = type; 
            dataGrid.MasterTableView.Columns.Add(numericColumn); 
        } 
 
        public void AddDeleteColumn() 
        { 
            GridButtonColumn buttonColumn = new GridButtonColumn(); 
            buttonColumn.ButtonType = GridButtonColumnType.ImageButton; 
            buttonColumn.UniqueName = "DeleteCol"
            buttonColumn.CommandName = "Delete"
            buttonColumn.Text = "Delete"
            buttonColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center; 
            buttonColumn.ItemStyle.CssClass = "MyImageButton"
            dataGrid.MasterTableView.Columns.Add(buttonColumn); 
        } 
 
        public void AddEditColumn() 
        { 
            GridEditCommandColumn editCommandColumn = new GridEditCommandColumn(); 
            editCommandColumn.UniqueName = "EditCol"
            editCommandColumn.ButtonType = GridButtonColumnType.ImageButton; 
            editCommandColumn.ItemStyle.CssClass = "MyImageButton"
            dataGrid.MasterTableView.Columns.Add(editCommandColumn); 
        } 
 
        private void BindGridToDataTable() 
        { 
 
            SqlConnection con = new SqlConnection("Data Source=;Initial Catalog=Northwind;Integrated Security=True"); 
 
            SqlDataAdapter adapter = new SqlDataAdapter("SELECT TOP 5 [ProductID], cast([ProductID] as numeric) as Number,[ProductName],[ProductID] as ComboID   FROM [Products]", con); 
            DataTable links = new DataTable(); 
 
            adapter.Fill(links); 
 
            DataBindGrid("ProductID", links); 
        } 
 
        public void DataBindGrid(string keyColName, DataTable data) 
        { 
            dataGrid.DataSource = data.DefaultView; 
            keyColumnName = keyColName; 
            dataGrid.MasterTableView.DataKeyNames = new string[] { keyColumnName }; 
        } 
 
    } 
 
 
    public class BPTemplate : ITemplate 
    { 
        protected LiteralControl lControl; 
 
        private string colname; 
        private DataTable controlData; 
        private string keyColName; 
 
 
        public BPTemplate(string columnName, string keyColumnName) 
        { 
            colname = columnName; 
            keyColName = keyColumnName; 
 
        } 
 
        public void InstantiateIn(Control container) 
        { 
            lControl = new LiteralControl(); 
            lControl.ID = "lControl"
            lControl.DataBinding += lControl_DataBinding; 
 
            container.Controls.Add(lControl); 
 
        } 
 
        public void lControl_DataBinding(object sender, EventArgs e) 
        { 
            LiteralControl l = (LiteralControl)sender; 
            GridDataItem container = (GridDataItem)l.NamingContainer; 
 
            var value = ((DataRowView)container.DataItem)[colname].ToString(); 
 
            l.Text = value; 
 
        } 
 
    } 
 

And ASPX:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="postbacktest.aspx.cs" Inherits="Test.WebApplication.postbacktest" %> 
 
<%@ 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></title
</head> 
<body> 
   <script type="text/javascript"
 
       function Post() { 
 
            __doPostBack("", ""); 
        } 
 
      
         
   </script> 
 
    <form id="form1" runat="server"
    <div> 
     
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server"
        </telerik:RadScriptManager> 
     
    </div> 
    <telerik:RadGrid ID="RadGrid1" runat="server"
    </telerik:RadGrid> 
     
    <button id="button" onclick="Post()">POST</button> 
    </form> 
</body> 
</html> 
 

Please, push the button "POST" and look at the column "test".
No DataBinding event, no values at column "test"


Anton
Top achievements
Rank 1
 answered on 18 Nov 2008
2 answers
83 views
Hello,

we are using the TreeView control on several pages and it's always loaded with the same data and behaves almost in the same manner. To prevent us from doing repetitive coding related to this tree on all these pages we inherited the TreeView control and placed common code (such as loading, node expanding, etc) inside the derived control.

The problem is with context menus on the nodes. If we define a context menu and and assign an event handler then the RadTreeViewContextMenuEventArgs object passed to the handler always has a null value in the Node field. We are thus unable to determine which node to direct our actions upon. However the MenuItem field of the same object is correctly filled with the usual information.

Is there something we missed to override/implement in the derived TreeView control? Or maybe something on the client side?


Thank you!
Missing User
 answered on 18 Nov 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?