Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
126 views
Hello , i have one RadNumerictextbox in my aspx page , i sent value to it with javascript  function , it shows value in page , but when i click a buttonin page , i cant access value in code behind. it returns ' ' .  why ? what should i do ?
______________________________________________
<script language="javascript">
        function checkedd() {
            var txt2 = document.getElementById('RadNumericTextBox1_text');
            txt2.value = '987';
            }
        </script>
<telerik:RadNumericTextBox ID="RadNumericTextBox1" Runat="server" >
                        <ClientEvents OnLoad="checkedd" />
                    </telerik:RadNumericTextBox>
______________________________________________________


Dimo
Telerik team
 answered on 22 Apr 2009
2 answers
81 views
Hi,
I have just updated our website using RadMenu and RadPanels for navigation and this has thrown up a couple of issues with IE6 (no surprises there !!!). You can see the main problems by going to Eastbourne College. In IE6 the sprite for the menu background is corrupted and the menu dropdowns do not work. Also when using the panelbar for Lefthand navigation ( see here for example ) there is no animation just a page refresh, the menu does however show expanded on the correct section. I know javascript is working as the main slideshow is all js. Needless to say this all works amazingly in any sensible browser. Unfortunately we still have about 5% of parents on IE6 :(.

Any help or guidance would be gratefully received. I am using Q1 2009 controls, my own custom skin for the menu, HTML 4 loose DOCTYPE, and it all lives in MOSS 2007 SP1

Thanks for the amazing controls, they get better with each release.

Chris
Chris
Top achievements
Rank 2
 answered on 22 Apr 2009
1 answer
86 views

Hi,

I am using hierarchical telerik gird with mode HierarchyLoadMode="Client"

 

 

 

When I use it on the aspx page it works fine. But when I shift the same grid to the usercontrol it shows me following error. I am sure it is because of telerik embedded javascript. I am only using expand/collapse from the grid javascript. Tell me how can I avoid follwing error.
---------------------------
Windows Internet Explorer
---------------------------
Stop running this script?

A script on this page is causing Internet Explorer to run slowly.
If it continues to run, your computer may become
unresponsive.

---------------------------
Yes   No  
---------------------------

Please reply asap.

Pavel
Telerik team
 answered on 22 Apr 2009
1 answer
215 views
Hello Team,

Could any one please help me, I have a requirement the i need to call a server method from client side. Let me explain my requirement clearly. I have save button when i click on that save button first it should execute a a server method from client side and check the database with the values and finally it should populate with a confirm message. If user selects OK button in the confirm window then the button click event should fire and the data should be inserted in the table. This is my requirement is there any option in the telerik framework to call the server method from client side.

Thanks,
Ram
Peter
Telerik team
 answered on 22 Apr 2009
1 answer
115 views
Hello,

I need to show one week at a time but is it possiple to organise the week so it shows 3 days in the first row, 3 days in the second row and 1 day in the last row, like in a little grid?

Thanks

Kati


Peter
Telerik team
 answered on 22 Apr 2009
1 answer
83 views

I want to create a cross-table using RadGrid. The table contains 56 rows and 24 columns which is displayed on a single page.
I found that the scroll column, static header, and frozen column of RadGrid are so great. The problem is that using the scrollbars (in particular the horizontal bar) induces some kind of temporary blocking giving the impression that everything is completely stuck.
I would like to create a cross-table with "scrolling images" on the top-right conner. 

(see the picture at: http://i577.photobucket.com/albums/ss220/maidinhnga/radgrid.jpg?t=1239869301)
When clicking on the images the columns of the Grid (except the "Designation" column) the  will slide to left/right to show the hidden columns.
Is there any solution?

thanks.

Daniel
Telerik team
 answered on 22 Apr 2009
2 answers
100 views
Greetings;

I have a webpage that contains the following:
  1. RadAjaxManager.
  2. Repeater.
  3. Datalist, inside that repeater that's being populted dynamically on repeater's itemDatabound.
  4. Label.

Inside every datalist row there is a button that initiates DataList ItemCommand, where it updates the label.
Inside repeater ItemDataBound I am adding the AjaxSettings for the RadAjaxManager.

The problem is, when I click on the button that's inside the datalist, the loading panel shows up and never disappear.
Here is my ASPx code:

                                    <radA:RadAjaxManager ID="RadAjaxManager1" runat="server">  
                                    </radA:RadAjaxManager> 
                                    <asp:Repeater ID="rpCategories" runat="server" DataSourceID="dsCategories"   
                                        onitemdatabound="rpCategories_ItemDataBound">  
                                        <HeaderTemplate> 
                                            <table width="100%" cellpadding="0" cellspacing="0" border="1" bordercolor="#ffffff">  
                                        </HeaderTemplate> 
                                        <ItemTemplate> 
                                            <tr> 
                                                <td> 
                                                    <asp:Literal ID="litCatID" runat="server" Text='<%# Eval("CategoryID") %>' Visible="false"></asp:Literal> 
                                                    <asp:Image runat="server" ID="imgCat" ImageUrl='<%# Eval("CategoryImage")%>' Width="100px" /> 
                                                    <asp:label runat="server" CssClass="CatName" id="lblCatName" Text='<%# Eval("CategoryName")%>'></asp:label> 
                                                </td> 
                                            </tr> 
                                            <tr> 
                                                <td> 
                                                    <asp:label runat="server" CssClass="CatDesc" id="lblCatDesc" Text='<%# Eval("CategoryDesc")%>'></asp:label> 
                                                </td> 
                                            </tr> 
                                            <tr> 
                                                <td> 
                                            <asp:DataList OnItemCommand="dlItems_OnItemCommand" DataKeyField="ProductID" ID="dlItems" Width="100%" runat="server">  
                                                <HeaderTemplate> 
                                                    <table width="100%" cellpadding="0" cellspacing="2">  
                                                </HeaderTemplate> 
                                                <ItemTemplate> 
                                                    <tr style="background-color:#e6caae;">  
                                                        <td valign="top">  
                                                            <asp:Literal ID="litProductID" runat="server" Text='<%# Eval("ProductID") %>' visible="false"></asp:Literal> 
                                                            <asp:Label ID="lblModelName" runat="server" Text='<%# Eval("ModelName") %>' CssClass="ItemName"></asp:Label> 
                                                        </td> 
                                                        <td width="50">  
                                                            <asp:Label ID="lblUnitCost" runat="server" Text='<%# Eval("UnitCost") + "/person" %>' CssClass="ItemDesc"></asp:Label> 
                                                        </td> 
                                                        <td width="50" rowspan="2">  
                                                            <asp:Button CommandName="AddToBasket" CommandArgument='<%# Eval("ProductID") %>' ID="btnAddToBasket" runat="server" Text="Add to basket" /> 
                                                        </td> 
                                                    </tr> 
                                                    <tr style="background-color:#e6caae;">  
                                                        <td colspan="2" valign="top">  
                                                            <asp:Label ID="lblDesc" runat="server" Text='<%# Eval("Description") %>' CssClass="ItemDesc"></asp:Label> 
                                                        </td> 
                                                    </tr> 
                                                    <tr style="background-color:#e6caae;">  
                                                        <td colspan="3">  
                                                            <span class="ItemDesc"># of persons:</span> <asp:TextBox ID="txtPersons" runat="server" Text="1"></asp:TextBox> 
                                                        </td> 
                                                    </tr> 
                                                    <tr style="background-color:#e6caae;">  
                                                        <td colspan="3">  
                                                            <span class="ItemDesc">Notes:</span> <asp:TextBox ID="txtNotes" runat="server" Text="" style="width:83%"></asp:TextBox> 
                                                        </td> 
                                                    </tr> 
                                                    <tr> 
                                                        <td colspan="3"><hr /></td>  
                                                    </tr> 
                                                </ItemTemplate> 
                                                <FooterTemplate> 
                                                    </table> 
                                                </FooterTemplate> 
                                            </asp:DataList> 
                                        </ItemTemplate> 
                                        <FooterTemplate> 
                                                    </td> 
                                                </tr> 
                                            </table> 
                                        </FooterTemplate> 
                                    </asp:Repeater> 
                                    <asp:SqlDataSource ID="dsCategories" runat="server"   
                                        SelectCommand="SELECT * FROM [CMRC_Categories] ORDER BY [SortNo]">  
                                    </asp:SqlDataSource> 
                                </td> 
                                <td style="width:30%" valign="top">  
                                    <div id="MiniBasket" style="position:relative">  
                                        <asp:DataList ID="dlBasket1" runat="server" DataSourceID="dsOrder"   
                                            BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px"   
                                            CellPadding="3" CellSpacing="2" GridLines="Both">  
                                            <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" /> 
                                            <ItemStyle BackColor="#FFF7E7" ForeColor="#8C4510" /> 
                                            <SelectedItemStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" /> 
                                            <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" /> 
                                            <ItemTemplate> 
                                                <table cellspacing="1" class="style1">  
                                                    <tr> 
                                                        <td> 
                                                            <asp:Label ID="lblITem" runat="server" Text='<%# Eval("ModelName") %>'></asp:Label> 
                                                        </td> 
                                                        <td> 
                                                            <asp:Label ID="lblQuan" runat="server" Text='<%# Eval("Quantity") %>'></asp:Label> 
                                                        </td> 
                                                        <td><asp:Button ID="Button1" runat="server" Text="Button" /></td>  
                                                    </tr> 
                                                </table> 
                                            </ItemTemplate> 
                                        </asp:DataList> 
                                        <asp:Label ID="lblCount" runat="server" Text="0"></asp:Label> 
                                        <asp:SqlDataSource ID="dsOrder" runat="server"   
                                            SelectCommand="SELECT dbo.CMRC_ShoppingCart.UserName, dbo.CMRC_ShoppingCart.IsCheckedOut, dbo.CMRC_ShoppingCartItems.Quantity, dbo.CMRC_ShoppingCartItems.ModelName, dbo.CMRC_ShoppingCartItems.Price, dbo.CMRC_ShoppingCartItems.BasketItemID, dbo.CMRC_ShoppingCart.cartID FROM dbo.CMRC_ShoppingCart INNER JOIN dbo.CMRC_ShoppingCartItems ON dbo.CMRC_ShoppingCart.cartID = dbo.CMRC_ShoppingCartItems.CartID WHERE (dbo.CMRC_ShoppingCart.IsCheckedOut = 0) AND (dbo.CMRC_ShoppingCart.UserName = @Username)">  
                                        </asp:SqlDataSource> 

And here is the codebehind:

    public partial class Order : System.Web.UI.Page  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            dsCategories.ConnectionString = LesPreasso.Properties.Settings.Default.ConnectionString;  
            dsOrder.ConnectionString = LesPreasso.Properties.Settings.Default.ConnectionString;  
            dsOrder.SelectParameters.Add("username"this.User.Identity.Name);  
        }  
 
        protected void rpCategories_ItemDataBound(object sender, RepeaterItemEventArgs e)  
        {  
            DataList dl = new DataList();  
            Literal pcatid;  
            dl = (DataList)(e.Item.FindControl("dlItems"));  
            pcatid = (Literal)e.Item.FindControl("litCatID");  
            if (!(dl ==null))  
            {  
                DataSet oData = new DataSet();  
                SqlConnection conn = new SqlConnection();  
                conn.ConnectionString = LesPreasso.Properties.Settings.Default.ConnectionString;  
                SqlDataAdapter cmd = new SqlDataAdapter("select * from CMRC_Products where CategoryID=@CategoryID", conn);  
                cmd.SelectCommand.Parameters.AddWithValue("CategoryID", pcatid.Text);  
                cmd.Fill(oData);  
                if (oData.Tables[0].Rows.Count > 0)  
                {  
                    dl.DataSource = oData.Tables[0].DefaultView;  
                    dl.DataBind();  
                }  
                RadAjaxManager1.AjaxSettings.AddAjaxSetting(dl, lblCount, LoadingPanel1);  
            }  
        }  
 
        protected void dlItems_OnItemCommand(object sender, DataListCommandEventArgs e)  
        {  
            if (e.CommandName=="AddToBasket")  
            {  
                lblCount.Text= Convert.ToString(Convert.ToInt32(lblCount.Text)+ 1);  
            }  
        }  
    }  
McHaimech
Top achievements
Rank 1
 answered on 22 Apr 2009
3 answers
161 views
In my application I use 4 radGrids which are synchronised. Sorting and scrolling workd fine.

Now I need to use Paging in the "RadGrid ensemble".

What is the best way to implement paging in a ensemble of 4 RadGrids?

Thanks

Christian
Princy
Top achievements
Rank 2
 answered on 22 Apr 2009
1 answer
130 views

Hi,

I am trying to get RadGrid to work. What I want to achive is simply a Grid that lets me modify the content of a database table. However, most online samples using the Grid Control is based on ASP.NET - I'm using the Grid Control within a SharePoint WebPart, and therefore needs to do it all programmatically (C# .NET)

When I execute my WebPart, I receive no errors. The Grid simply dosn't render. My code follows below. Any ideas?

 - Thanks in advance.

Regards
Jimmy Thomsen

=============================================================================

namespace CompGrid
{
    public class Grid : WebPart
    {
        private ScriptManager sm;
        private RadGrid grid;

        protected override void OnLoad(EventArgs e)
        {
            this.EnsureChildControls();
        }

        protected override void CreateChildControls()
        {
            if (ScriptManager.GetCurrent(this.Page) != null)
            {
                this.sm = ScriptManager.GetCurrent(this.Page);
            }
            else
            {
                this.sm = new ScriptManager();
                this.Controls.Add(this.sm);
            }

            this.grid = new RadGrid();
            this.Controls.Add(this.grid);

            this.grid.AllowAutomaticDeletes = true;
            this.grid.AllowAutomaticInserts = true;
            this.grid.AllowAutomaticUpdates = true;
            this.grid.AllowMultiRowEdit = true;
            this.grid.AutoGenerateColumns = true;
            this.grid.AutoGenerateDeleteColumn = true;
            this.grid.AutoGenerateEditColumn = true;

            if (this.Page.IsPostBack == false)
            {
                SqlDataSource dataSource = new SqlDataSource("Data Source=Comp-demo;Initial Catalog=TestDB;User ID=admin;Password=test", "SELECT xaxis, series1, series2 FROM testdata");
                dataSource.UpdateCommand = "UPDATE testdata SET xaxis=@xaxis, series1=@series1, series2=@series2 WHERE id=@id";
                dataSource.DeleteCommand = "DELETE FROM testdata WHERE id=@id";
                dataSource.InsertCommand = "INSERT INTO testdata VALUES (xaxis=@xaxis, series1=@series1, series2=@series2)";
               
                this.grid.DataSourceID = dataSource.ID;
            }
        }

        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            this.sm.RenderControl(writer);
            this.grid.RenderControl(writer);
        }
    }
}

Princy
Top achievements
Rank 2
 answered on 22 Apr 2009
1 answer
137 views
Hi,

i have a usercontrol which contain comboboxes.I have a page which uses master page and also that user control.So how can i find the text and value of combobox.


i have written

 

 

 

var dbMedication =

 

 

document.getElementById(

'<%=MedicationControl.FindControl("RadComboBoxMedication").ClientID%>').get_text();//it shows error get_text method not  found.


RadComboBoxMedication is id of combo box.


MedicationControl is usercontrol.

Plz help me.

 

Princy
Top achievements
Rank 2
 answered on 22 Apr 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?