Telerik Forums
UI for ASP.NET AJAX Forum
13 answers
227 views
Here is the scenario:

1. Create a RadListView as per the documentation
2. Call Rebind where the NeedDataSource uses List<T> with 0 records to set DataSource
3. RadListView shows correctly 0 items
2. Call Rebind again where the NeedDataSource uses List<T> with 3 (or any > than 0) records to set DataSource
3. RadListView shows incorrectly 0 items

If I switch between any number of records larger than 0 it works fine. As soon as I use 0 record collection for DataSource it does not matter what collection I rebind to it shows none after that.

What is the problem?
Sebastian
Telerik team
 answered on 13 Oct 2010
1 answer
148 views
What is the easiest way to implement the jQuery fadeIn function on a particular element after an ajax callback occurs? I am using the RadAjaxManager and would like to give the user a visual cue by fading in new content from ajax updates (instead of just immediately showing it on the page).
Dimo
Telerik team
 answered on 13 Oct 2010
1 answer
97 views

 

I'm using with RegExpTextBoxSetting and WebMethod validation.

 

its works fine, but the only problem is that when the method gets false, the RegExpTextBoxSetting gets the error icon and the text box gets the red color but, The error message not display !

Martin
Telerik team
 answered on 13 Oct 2010
2 answers
141 views
I have set my masterview to

 

 

 

 

ExpandCollapseColumn-Display="False" 

 

 

and have 
<expandcollapsecolumn Display="false"
</expandcollapsecolumn>

But I am not getting the desired results.  The column is gone for the rows but the nested view still show a large grey space.  Please see attached.  Why is it still showing in the nested template?

Thanks in advanced.
Paula

 

 

 

 

Princy
Top achievements
Rank 2
 answered on 13 Oct 2010
2 answers
116 views
hi,

another question: 

the OnClientContextMenuItemClicked event is not fired after refreshing the control with radxmlhttppanel...the events which are registered to to contextmenucontrol itself are working correctly, but OnClientContextMenuItemClicked and OnClientContextMenuShown are not fired after the ajax refresh!

regards,
ingemar
Ingemar
Top achievements
Rank 1
 answered on 13 Oct 2010
1 answer
289 views
Hi,
I have a RadGrid with autogenerated columns.  As the rows are building, I need to add a label and a dropdownlist to one of the columns.  Everything works fine if I put everything in ItemDataBound and have my grid hierarchyloadmode=client (code snippet #1).  This is slow, so I want to use ServerBind.  In doing that, my controls disappear on postback.  I have found examples where I should create my control in ItemCreated and ItemDatabound, but this does not seem to work for me (code snippet #2).  I get an object reference error because it cannot find the control.  What am I doing wrong?

//code snippet #1 - this works when in hierarchyloadmode=Client
protected
void grdVerification_ItemDataBound(object sender, GridItemEventArgs e) 
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem item = (GridDataItem)e.Item;
  
                //build and set the value for the Escalators
                GridTableCell cellEscalatorID = (GridTableCell)item["EscalatorID"];
                GridTableCell cellEscalatorName = (GridTableCell)item["EscalatorName"];
                //add a label to store the EscalatorName
                Label lblEscalatorName = new Label();
                lblEscalatorName.ID = "lblEscalatorName";
                lblEscalatorName.Text = cellEscalatorName.Text;
                cellEscalatorName.Controls.Add(lblEscalatorName);
  
                DropDownList ddlEscalators = new DropDownList();
                ddlEscalators.DataSourceID = "dsrcEscalators";
                ddlEscalators.DataTextField = "EscalatorName";
                ddlEscalators.DataValueField = "EscalatorID";
                ddlEscalators.Attributes.Add("style", "display:none");
                ddlEscalators.Attributes.Add("OnChange", "ddlEscalators_Change(this)");
                ddlEscalators.ID = "ddlEscalators";
                cellEscalatorName.Controls.Add(ddlEscalators);
                (item.FindControl("ddlEscalators") as DropDownList).SelectedValue = cellEscalatorID.Text;
//code snippet #2 - this errors when it can't find the control.  As you can see, I tried calling it by referencing
// the cell's controls and the item's controls.  Neither approach works.
protected
void grdVerification_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem item = (GridDataItem)e.Item;
  
                //build and set the value for the Escalators
                GridTableCell cellEscalatorName = (GridTableCell)item["EscalatorName"];
                //add a label to store the EscalatorName
                Label lblEscalatorName = new Label();
                lblEscalatorName.ID = "lblEscalatorName";
                lblEscalatorName.BackColor = System.Drawing.Color.Orange;
                cellEscalatorName.Controls.Add(lblEscalatorName);
  
                DropDownList ddlEscalators = new DropDownList();
                ddlEscalators.DataSourceID = "dsrcEscalators";
                ddlEscalators.DataTextField = "EscalatorName";
                ddlEscalators.DataValueField = "EscalatorID";
                ddlEscalators.Attributes.Add("style", "display:none");
                ddlEscalators.Attributes.Add("OnChange", "ddlEscalators_Change(this)");
                ddlEscalators.ID = "ddlEscalators";
                cellEscalatorName.Controls.Add(ddlEscalators);
                  
            }
  
        }
         
        protected void grdVerification_ItemDataBound(object sender, GridItemEventArgs e) 
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem item = (GridDataItem)e.Item;
  
                ////build and set the value for the Escalators
                GridTableCell cellEscalatorID = (GridTableCell)item["EscalatorID"];
                GridTableCell cellEscalatorName = (GridTableCell)item["EscalatorName"];
                (cellEscalatorName.FindControl("lblEscalatorName") as Label).Text = cellEscalatorName.Text;
  
                (item.FindControl("ddlEscalators") as DropDownList).SelectedValue = cellEscalatorID.Text;

 
Princy
Top achievements
Rank 2
 answered on 13 Oct 2010
1 answer
108 views
Hi
I am a newbie, so this may be trivial.
I am using your login window example, and failed on the get-go.
I took the TelerikLoginWebForm and added a login template.
I expect to see "DGV" when I am logged in, and nothing, when I am not.
However, DGV does appear when I am logged in, but fails to disappear when I logout. 
As if the logout event does not modify the LoginView.
The LoginControl does change when I hit Logout.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TelerikLoginWebForm.aspx.cs" Inherits="TelerikLoginWebForm" %>
 
<%@ Register src="LoginControl.ascx" tagname="LoginControl" tagprefix="uc1" %>
 
<%@ 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 runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server" >
    <asp:ScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
<%--            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
--%>       
        </Scripts>
    </asp:ScriptManager>
     
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
     
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="LoginView">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="LoginView" UpdatePanelHeight="" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
     
    <div>
        <uc1:LoginControl ID="LoginControl1" runat="server" />
        <asp:LoginView ID="LoginView" runat="server">
            <AnonymousTemplate>
             
            </AnonymousTemplate>
            <LoggedInTemplate>
                DGV
            </LoggedInTemplate>
        </asp:LoginView>
    </div>
    </form>
</body>
</html>

Maria Ilieva
Telerik team
 answered on 13 Oct 2010
5 answers
231 views
I have a radgrid with an objectdatasource that binds to an entity list.
We are trying to insert a new record, but the insert command never fires. 
The update and delete commands work perfectly it's just the insert that is failing.

We've got allowautomaticinsert = true, and the commandname of the button is "insert".

Please advise.
Pavlina
Telerik team
 answered on 13 Oct 2010
3 answers
97 views
Dea Telerik-Team

After a client ajax request via Javascript I want to ajaxfied the title of the page (this.Page.Title), I set the new title but after the ajax request the title isn't to the new string/name.

Any idea how I can implemented this?

The UpdatePageHead property is set to true.

Kind regards
Christian
Maria Ilieva
Telerik team
 answered on 13 Oct 2010
3 answers
211 views
Hey,

I am not able to Populate dropdownlist with sql data source--aspx is

<telerik:GridDropDownColumn HeaderText="Items" UniqueName="column1" DataSourceID="SqlDataSource1"
                     ListTextField="ProductName" ListValueField="Pid" DataField="ProductName" >
                    </telerik:GridDropDownColumn>
Ans datasource is--
<asp:SqlDataSource ID="SqlDataSource1" runat="server" DataSourceMode="DataReader"
            ConnectionString="<%$ ConnectionStrings:ChalkHillConnectionString3 %>"
            SelectCommand="SELECT [ProductName] FROM [tblProducts] ORDER BY [Pid]"></asp:SqlDataSource>
I am trying to populate ddl from ProductName column of my tblProducts.
Does'nt seem to be workin'.I am getting this error--

'System.Data.Common.DataRecordInternal' does not contain a property with the name 'Pid'

Plz help..
Thanks
Amit
Pavlina
Telerik team
 answered on 13 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?