Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
270 views
Hi,
I have a web user control containing 2 RadComboBox's - ddlGroup and ddlGorem.
my ascx is as follows:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="InfoOrderForm.ascx.cs" Inherits="Reforma.Web.Application.Hagbalot.InfoOrderForm" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<table  width="100%" dir="rtl">  
    <tr> 
        <td width="20%">קבוצה</td> 
        <td align="right"  > 
            <telerik:RadComboBox   
                ID="ddlGroup" 
                OnClientSelectedIndexChanging="LoadGormim"   
                OnItemsRequested="ddlGroup_ItemsRequested"   
                runat="server" 
                Skin="ReformaSkin" EnableEmbeddedSkins="False" 
                > 
            </telerik:RadComboBox> 
        </td> 
        <td width="20%">גורם מבצע</td> 
        <td align="right">  
            <telerik:RadComboBox   
                ID="ddlGorem"   
                runat="server" 
                OnClientItemsRequested="ItemsLoaded" 
                OnItemsRequested="ddlGorem_ItemsRequested" 
                Skin="ReformaSkin" EnableEmbeddedSkins="False">  
                  
            </telerik:RadComboBox> 
       </td> 
    </tr> 
    <tr> 
        <td colspan="1" width="20%">המידע המבוקש</td> 
        <td align="right" colspan="3">  
            <asp:TextBox  ID="txtMelel"  ReadOnly="false" runat="server" TextMode="MultiLine" Rows="2" Width="100%"></asp:TextBox> 
        </td> 
    </tr> 
    <tr> 
        <td align="left" colspan="2" > 
            <asp:ImageButton ID="btnView"  runat="server"   
                ImageUrl="~/ReformaSkin/images/bigarrow_up.gif" BorderWidth="1px"   
                Width="31px" BackColor="Silver" onclick="btnView_Click" ToolTip="בחר" /> 
        </td> 
        <td align="right" colspan="2">  
            <asp:ImageButton ID="btnAdd"  runat="server"   
                ImageUrl="~/ReformaSkin/images/bigarrow_down.gif" BorderWidth="1px"   
                style="margin-right: 0px"  Width="31px" BackColor="Silver"   
                onclick="btnAdd_Click" ToolTip="הוסף" /> 
        </td>      
    </tr> 
    <tr> 
        <td colspan="4" align="center">  
            <ref:CustomGrid ID="alichTzavMeidaGrid" runat="server" CreatedByDesigner="True" EntityID="0" AutoGenerateColumns="false" EnableEmbeddedSkins="False" Skin="ReformaSkin"   > 
                <ClientSettings  Selecting-AllowRowSelect="true"  ></ClientSettings>  
                <MasterTableView PageSize="3" EditFormSettings-EditFormType="AutoGenerated"   
                    EditMode="EditForms">  
                    <RowIndicatorColumn> 
                        <HeaderStyle Width="20px" /> 
                    </RowIndicatorColumn> 
                    <ExpandCollapseColumn> 
                        <HeaderStyle Width="20px" /> 
                    </ExpandCollapseColumn> 
                    <Columns>    
                        <telerik:gridboundcolumn   
                        datafield="group"     
                         headertext="קבוצה" uniquename="group" MaxLength="10"></telerik:gridboundcolumn>    
                         <telerik:GridBoundColumn DataField="gorem" HeaderText="גורם" MaxLength="10"   
                             UniqueName="gorem">  
                         </telerik:GridBoundColumn> 
                         <telerik:GridBoundColumn DataField="melel" HeaderText="המידע המבוקש" MaxLength="200"   
                             UniqueName="melel">  
                         </telerik:GridBoundColumn> 
                    </Columns>    
                    <EditFormSettings ColumnNumber="2">  
                    </EditFormSettings> 
                </MasterTableView> 
                <FilterMenu EnableTheming="True">  
                    <CollapseAnimation Duration="200" Type="OutQuint" /> 
                </FilterMenu> 
            </ref:CustomGrid> 
        </td> 
    </tr> 
</table> 
 
 
on my code behind i include a .js file in the following way:
protected override void OnPreRender(EventArgs e)  
{  
    if (!Page.ClientScript.IsClientScriptIncludeRegistered("ComboBoxScript"))  
    {  
        Page.ClientScript.RegisterClientScriptInclude(  
        "ComboBoxScript",  
        "ComboBoxScript.js");  
        }  
        base.OnPreRender(e);  
    }  
the ComboBoxScript.js is:
                function ItemsLoaded(combo, eventarqs)  
                {  
                   /* var countriesCombo = $find("ddlGorem");    
                    if (combo.get_items().get_count() > 0)
                    {
                        combo.set_text(combo.get_items().getItem(0).get_text());
                        combo.get_items().getItem(0).highlight();
                    }*/ 
                    alert("ItemsLoaded");  
                }  
                  
                function LoadGormim(combo, eventarqs)  
                {      
                    /*var gormimCombo = $find("ddlGorem");    
                    
                    var item = eventarqs.get_item();
                    if (item.get_index() >= 0)
                    {        
                        gormimCombo.requestItems(item.get_value(), false);                        
                    }*/ 
                    alert("LoadGormim");  
                } 
of course the commented lines are the ones I actually want to use, but for now, as nothing is working, I have tried just to get some alerts for debugging the problem.
both combos load just fine, but as I change the selected index in the ddlGroup combo, I get a javascript error saying : " 'null' is null or not an object".
my conclusion is that for some reason my javascript functions cannot be found.

please help me... :(
Thanx,
Revital

p.s.
before putting it all in a user control the combos were on a panel in a web form that contained all the javascript functions and it all worked fine...
Simon
Telerik team
 answered on 04 Nov 2008
2 answers
67 views
Can you use a news reader (like Outlook Express) to read the forums or do you have to do it through the web?

TIA - Jeff.
Jeff Bradshaw
Top achievements
Rank 1
 answered on 04 Nov 2008
2 answers
106 views
hi, due to desing restictions, the sqldatasource's select command & connection string, must be entrer every time at run time, when i try to group a radgrid's column i have no records as result, in the other hand, when i define the sqldatasource's select command and connection string through the wizard, i have no problem to group the column, then you can help me?, what i'm doing wrong, thanks for your help. sorry for my english, i'm working on it
jav
Top achievements
Rank 1
 answered on 04 Nov 2008
6 answers
95 views
Hi..
I have a combo box in a large ajax form. When I click on item using the mouse the cursor jumps to my main menu on the page. When I select the item with the enter button it works fine and tabs to the next control.
Any ideas?
thanks
Jon
Top achievements
Rank 1
 answered on 04 Nov 2008
1 answer
65 views
Dear All,

I have group in my telerik grid . I have to add check box to that group. After adding check box I have to read the checkbox event.If checkbox is checkd then I have to add group datakey id to one string collection for each checkbox .

Please suggest

Regards,
Ansari
Yavor
Telerik team
 answered on 04 Nov 2008
3 answers
146 views
I created a dialog page. This dialog page will be called from a main page through rad.window. I also add one close button in the dialog page, so user can close the dialog page (the rad.window). The codes for close button are from your document. It works well if the dialog page has the same domain as main page. I copied the dialog page to a remote website (different domain site). And the close button is no longer functional.

I have a testing page to show the difference:
http://dev2.tjc.org/TestingProject/Default.aspx

This page has 2 links which connect to 2 identical pages but hosted on 2 different places. The first link connect to the same domain, in which close button works properly. The second link connect to a remote website, in which close button cannot work.

Can you help me with this issue?

Our environment is: Windows 2008 IIS7, Telerik.RadControls Q3 beta.

Darren
Top achievements
Rank 1
 answered on 04 Nov 2008
4 answers
171 views
Hi

I am trying to use the radupload device twice on the same page.
I have two seperate database fields for holding the names of a standard and technical graphic.

The graphics have two different folder areas on the server.

Is it possible to load the radupload twice on the page with the select ability limited to 1 file per control and succesfully insert the field infornation using a stored procedure?.

I have supplied my standard code for 1 radupload in the hope that you can see my potential issue pulling from two seperate radupload controls.

Code -----------------

 If RadUpload1.UploadedFiles.Count = 0 Then
            'Ceate SQL Connection & Open it
            Dim objConn As New SqlConnection("Data Source=")
            objConn.Open()
          
            'Create a command object for the stored proc
            Dim objCmd As New SqlCommand("a_", objConn)
            objCmd.CommandType = Data.CommandType.StoredProcedure
            objCmd.CommandText = "a_"

    

            objCmd.Parameters.Add(New SqlParameter("@headline", Data.SqlDbType.VarChar, 255))
            objCmd.Parameters("@headline").Value = txtheadline.Text
       
            objCmd.Parameters.Add(New SqlParameter("@Name", Data.SqlDbType.VarChar, 100))
            objCmd.Parameters("@Name").Value = "none.gif"
    
           
            objCmd.ExecuteNonQuery()
            objConn.Close()
               
            Response.Redirect("page.aspx")
        Else
            For Each f As UploadedFile In RadUpload1.UploadedFiles
                f.SaveAs("C:\folder\" & f.GetName, True)
            Next
       
            For Each file As UploadedFile In RadUpload1.UploadedFiles

           
                Dim bytes(file.InputStream.Length) As Byte
                file.InputStream.Read(bytes, 0, file.InputStream.Length)
           
                'Ceate SQL Connection & Open it
                Dim objConn As New SqlConnection("Data Source=")
                objConn.Open()
          
                'Create a command object for the stored proc
                Dim objCmd As New SqlCommand("a_", objConn)
                objCmd.CommandType = Data.CommandType.StoredProcedure
                objCmd.CommandText = "a_"

    

                objCmd.Parameters.Add(New SqlParameter("@headline", Data.SqlDbType.VarChar, 255))
                objCmd.Parameters("@headline").Value = txtheadline.Text

       
                objCmd.Parameters.Add(New SqlParameter("@Name", Data.SqlDbType.VarChar, 100))
                objCmd.Parameters("@Name").Value = file.GetName
    
           
                objCmd.ExecuteNonQuery()
                objConn.Close()
               
                Response.Redirect("page.aspx")
            Next
        End If

----------------------------------

Thanks in advance

J

Jay
Top achievements
Rank 1
 answered on 04 Nov 2008
5 answers
138 views
I have created an Inox combobox. Below it is a regular button that has been RadFormDecorated.

When I click the combobox and it extends down, it goes over the button and is see through in Firefox. In Internet Explorer, it covers the button as it should.

Moon
Moon
Top achievements
Rank 2
 answered on 04 Nov 2008
1 answer
111 views
Hi,

We have a RadGrid which goes to edit mode on double-click. When I make changes, or does'nt make any changes,  in the editable row, the update takes place after a confirm dialog.

Once the confirm dialog is removed, row remains in edit mode with no database update.

Note: RadGrid uses ObjectDataSource


Any help in this regard is highly appreciated

Regards,
Martin

Daniel
Telerik team
 answered on 04 Nov 2008
1 answer
117 views
I ran into a bit of an unexpected issue, and I am curious if there is an elegant way around it. Basically, if you add a button as an AjaxUpdatedControl, clicking on that button will now cause async postbacks, and I still want it to do a full, regular postback. Is there a way to make this happen?

Simple example with dropdownlist and button below. Click on the button, and examine the console in Firebug to verify.
<%@ 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></title
</head> 
<body> 
    <form id="form1" runat="server"
    <asp:ScriptManager ID="ScriptManager1" runat="server"
    </asp:ScriptManager> 
    <div> 
     
        <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"
            <asp:ListItem Value="test">Test</asp:ListItem> 
            <asp:ListItem>Test2</asp:ListItem> 
        </asp:DropDownList> 
    </div> 
    <asp:Button ID="Button1" runat="server" Text="Button" /> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="DropDownList1"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="Button1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    </form> 
</body> 
</html> 


using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Web; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
 
public partial class _Default : System.Web.UI.Page  
    protected void Page_Load(object sender, EventArgs e) 
    { 
 
    } 
    protected void Button1_Click(object sender, EventArgs e) 
    { 
        string test = "test if we do a full postback"
    } 
    protected void Page_PreRender(object sender, EventArgs e) 
    { 
        this.Button1.Text = this.DropDownList1.Text; 
    } 
 

Yavor
Telerik team
 answered on 04 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?