Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
248 views
in my webpage , I do not set  z-index to all elements.

but in IE6, RadMenu's Drop List is shown behind DIV. 

In IE8,  I use RadWindow  as Modal Dialog, but the Window can't override this Menu.

my page :(sorry,it's so long)

<!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 id="Head1" runat="server">
    <style type="text/css">
        html, body
        {
            overflow: hidden;
            height: 100%;
            margin: 0;
            padding: 0;
            font: 13px Georgia, Arial, Simsun;
        }
        html
        {
            _padding: 92px 0;
        }
        #divPageHead
        {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100px;
            background: #EFF3FB;
        }
        #divPageMenu
        {
            position: absolute;
            top: 70px;
            left: 0;
            right: 0;
            bottom: 0;
            width: 100%;
        }
        #divPageFoot
        {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 30px;
            background: #EFF3FB;
        }
        #divPageBody2
        {
            position: absolute;
            top: 140px;
            right: 0;
            bottom: 40px;
            left: 0;
            overflow: hidden;
            width: 100%;
            _height: 100%;
        }
        #divPageLeft2
        {
            position: absolute;
            top: 0;
            left: 0;
            bottom: 0;
            overflow: auto;
            width: 240px;
            _height: 100%;
            background: #EFF3FB;
        }
        #divPageRight2
        {
            position: absolute;
            _position: static;
            top: 0;
            right: 0;
            bottom: 0;
            left: 250px;
            overflow: auto;
            _overflow: hidden;
            _height: 100%;
            _margin-left: 250px;
            background: #EFF3FB;
        }
        #divRightContent2
        {
            _overflow: auto;
            _width: 100%;
            _height: 100%;
        }
        #divPageBar2
        {
            position: absolute;
            top: 110px;
            left: 0;
            right: 0;
            height: 30px;
            width: 100%;
            overflow: hidden;
            z-index: 10;
        }
        #divPageLeftHd2
        {
            position: absolute;
            top: 0;
            left: 0;
            width: 240px;
            height: 30px;
            background: #F00;
        }
        #divPageRightHd2
        {
            position: absolute;
            _position: static;
            top: 0;
            left: 250px;
            right: 0;
            height: 30px;
            _margin-left: 250px;
            background: #FF0;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div id="divPageHead">
        <div style="height: 70px">
            some text
        </div>
        <div id="divPageMenu">
            <telerik:RadMenu ID="mainMenu" runat="server" CausesValidation="False" EnableViewState="False"
                PersistLoadOnDemandItems="False">
            </telerik:RadMenu>
        </div>
    </div>
    <div id="divPageBar2">
        <div id="divPageLeftHd2">
        </div>
        <div id="divPageRightHd2">
        </div>
    </div>
    <div id="divPageBody2">
        <div id="divPageLeft2">
        </div>
        <div id="divPageRight2">
            <div id="divRightContent2">
            </div>
        </div>
    </div>
    <div id="divPageFoot">
        Copyright &copy;(2010)
    </div>
    </form>
</body>
</html>

Peter
Telerik team
 answered on 15 Apr 2010
1 answer
200 views
hi

I have a menu in the master page and i would like to fix its position.

For example, when i have default page that uses the master page and when i scroll up and down the default page, the menu should stay fix. what should i do? Thanks
Yana
Telerik team
 answered on 15 Apr 2010
7 answers
280 views
i ve griddropdowncolumn and gridbound columns on my radgrid
while selecting the value from dropdown i need to bind values on bound columns n also i want to make some bound columns read only true on the selected index changes event
<telerik:radgrid   ID="RadGrid1" runat="server" Height="300" Visible="true" BackColor="LightBlue" ShowFooter="true" PageSize="20" AllowPaging="True" AllowFilteringByColumn="True" AllowSorting="true" ShowStatusBar="true" GridLines="None" AutoGenerateColumns="False" Skin="Vista"   OnPreRender="RadGrid1_PreRender"  OnItemDataBound ="RadGrid1_ItemDataBound" OnItemCreated="RadGrid1_ItemCreated"  OnNeedDataSource="RadGrid1_NeedDataSource" OnColumnCreated="RadGrid1_ColumnCreated" >                                                                                                                              
                <MasterTableView      CommandItemDisplay="Top" AutoGenerateColumns="false" AllowFilteringByColumn="True" AllowSorting="true"   >                                                                                    
                        <ExpandCollapseColumn><HeaderStyle Width="20px"></HeaderStyle></ExpandCollapseColumn
                        <RowIndicatorColumn><HeaderStyle Width="20px" /></RowIndicatorColumn
                        <ExpandCollapseColumn><HeaderStyle Width="20px" /></ExpandCollapseColumn>                                                                                                 
                        <Columns>                        
               <%-- <telerik:GridDropDownColumn DataField="a" HeaderText="a" UniqueName="a"  />--%> 
               <telerik:GridDropDownColumn DataField="a" HeaderText="a" UniqueName="a" ListTextField="a" ListValueField="a" DataSourceID="SqlDataSource1"/>                 
               <telerik:GridBoundColumn    DataField="b" HeaderText="b" UniqueName="b" />                 
               <telerik:GridBoundColumn    DataField="c" HeaderText="c" UniqueName="c" />                 
               <telerik:GridBoundColumn    DataField="d" HeaderText="d" UniqueName="d" />   


 protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) 
        { 
            if (e.Item is GridEditFormItem && e.Item.IsInEditMode) 
            { 
                string[] strArray = { "a", "e"}; 
                    GridEditFormItem item = (GridEditFormItem)e.Item; 
                    for (int k = 0; k < 2; k++) 
                    { 
                        GridDropDownListColumnEditor editor = (GridDropDownListColumnEditor)item.EditManager.GetColumnEditor(strArray[k]); 
                        editor.DataSource = (DataSet)Session["sesds"]; 
                        editor.DataTextField = strArray[k]; 
                        editor.DataValueField = strArray[k]; 
                        editor.DataBind(); 
                        editor.ComboBoxControl.AutoPostBack = true
                        editor.ComboBoxControl.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(ComboBoxControl_SelectedIndexChanged); 
                    } 
                     
            } 
             
        } 
 
 
protected void ComboBoxControl_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) 
        { 
            try 
            { 
                //string ElementID = Convert.ToString((sender as RadComboBox).SelectedItem.Text); 
                RadComboBox rad = (RadComboBox)o;                 
                GridEditableItem editedItem = (GridEditableItem)(o as RadComboBox).NamingContainer; 
                GridEditManager editMan = editedItem.EditManager; 
                foreach (GridColumn column in RadGrid1.MasterTableView.RenderColumns) 
                { 
                if (column is IGridEditableColumn) 
                {                    
                    IGridEditableColumn editableCol = (column as IGridEditableColumn); 
                    if (editableCol.IsEditable) 
                    { 
                        IGridColumnEditor editor = editMan.GetColumnEditor(editableCol);                         
                        if (editor is GridTextColumnEditor) 
                        {                         
                            if ( rad.ID.ToLower() == "rcb_a") 
                            { 
                                if (column.UniqueName == "b") 
                                { 
                                    (editor as GridTextColumnEditor).Text = "Done"
                                } 
                                else if (column.UniqueName == "c") 
                                { 
                                    (editor as GridTextColumnEditor).Text = "ok"
                                } 
                                else if (column.UniqueName == "d") 
                                { 
                                    (editor as GridTextColumnEditor).Text = "ok1"
                                } 
                            } 
                            if (rad.ID.ToLower() == "rcb_e") 
                            { 
                                if (column.UniqueName == "f") 
                                { 
                                    (editor as GridTextColumnEditor).Text = "Done2"
                                } 
                                else if (column.UniqueName == "g") 
                                { 
                                    (editor as GridTextColumnEditor).Text = "ok2"
                                } 
                                else if (column.UniqueName == "h") 
                                { 
                                    (editor as GridTextColumnEditor).Text = "ok3"
                                    (editor as GridTextColumnEditor).Visible = false
                                } 
                            } 
                             
                        } 
                    } 
                 } 
              }             
            } 
            catch 
            { 
 
            } 
        } 


i can able to fetch values to bound columns but couldnt make it as non editable .
dynamically i want to set ,for some scenarios i need to make them as non editable ,n for some it shd be editable for that
only am not setting those properties on source


thanks in advance
shankar mohan
Top achievements
Rank 1
 answered on 15 Apr 2010
3 answers
98 views
I have a panel bar that is built up of some pretty expensive database queries, I don't want this binding to happen per page load.

In my code I build up the panel using allocated RadPanelItems(), and than I was planning to allocate a RadPanelItemCollection() to put all the items into.  Then I would only have to cache that Item Collection once across the site, and just assign it to the Items property of the RadPanel...  But you can't do that.

The collection can only be constructed with a parent control, and once a control is built you can't assign a collection to it (get, no set).

How are you supposed to cache the items list in a RadPanel?  I don't want it to have to cache per user, and I don't want to have the bind happen over and over.

Thanks.


Kalina
Telerik team
 answered on 15 Apr 2010
3 answers
127 views
Hi

I have a databound Repeater control. I'm using RadWindow to show additional Data and pop up additional forms.

Currently I have:

GetRadWindow().BrowserWindow.location.href = GetRadWindow().BrowserWindow.location.href;

to reload the page so that any changes take effect. The problem is it relaods the whole page and resets any paramters that may be selected in a series of dropdowns. All I want to do is refresh the Repeater contol with Ajax from the RadWindow close.

How would I go about doing this.
Andy

Georgi Tunev
Telerik team
 answered on 15 Apr 2010
1 answer
67 views
I basically don't want the user to be able to enter paragraphs into the RadEditor.  Is there a way to make it single-line only?
Stanimir
Telerik team
 answered on 15 Apr 2010
1 answer
111 views
Hi,

I was trying to get the example of simple filtering working that is located at this location http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/filtering/defaultcs.aspx. I was able to get it working without too much trouble. The issue is that when I removed the 'DataSourceID="SqlDataSource1' from the Grid and used code in the Page_Load method to set the Datasource of the grid the filtering did not work. I set the datasource to be a list of ints. I have also tried using the NeedDataSource event of the grid itself to populate the grid, but again the grid will be populated but when I go to filter it doesn't filter.  Here is sample of the code I am using to set the datasource of the grid:

SqlCommand sql =

new SqlCommand();

 

SqlDataAdapter da =

new SqlDataAdapter();

 

 

string connectionString = WebConfigurationManager.ConnectionStrings["SBF"].ToString();

 

SqlConnection con =

new SqlConnection(connectionString);

 

 

//ConfigurationManager.ConnectionStrings[connectionString]

 

con.ConnectionString = connectionString;

sql.CommandText =

@"select A from SSA";

 

sql.Connection = con;

da.SelectCommand = sql;

DataTable dt =

new DataTable();

 

 

List<int> ints = new List<int>();

 

da.Fill(dt);

 

for (int i = 0; i < dt.Rows.Count; i++)

 

{

ints.Add(

Convert.ToInt32(dt.Rows[i]["A"]));

 

 

}

RadGrid1.DataSource = ints;

I am using the 2009.3.1208.35 version of the Telerik.Web.UI.

Thanks,
Jonathan Simon

Yavor
Telerik team
 answered on 15 Apr 2010
1 answer
191 views
hi,
    
    i have a radgrid in my page. in the need_datasource method i assign the grid's datasource to a list of objects returned from the business layer. but my problem is if the list is returned as null, (means no records) the grid disappears. i want the grid to show the empty item template. how to achieve this? please help.

Regards,
Saravanan K
Radoslav
Telerik team
 answered on 15 Apr 2010
2 answers
309 views

I want to set the DataTextField of a RadComboBox at pageload according to the users prefered language - and keep that value.
So far my code looks like this:
(a small part of the mastertableview of the grid RadGridVehicle)

                <telerik:GridDropDownColumn DataSourceID="sdsHaulierType" 
                                            DataField="HaulierType" DataType="System.Int32" 
                                            HeaderText="Haulier type"   
                                            ReadOnly="true" 
                                            ListTextField="HaulierTypeName"   
                                            ListValueField="HaulierTypeID"   
                                            DropDownControlType="DropDownList" 
                                            SortExpression="HaulierType" 
                                            UniqueName="HaulierType" 
                                            EditFormColumnIndex="0"   
                                            Visible="true" ForceExtractValue="Always" >  
                    <FilterTemplate>  
                        <telerik:RadComboBox ID="cbHaulierType" runat="server"   
                                             AppendDataBoundItems="true" 
                                             DataSourceID = "sdsHaulierType" 
                                             DataValueField = "HaulierTypeID" 
                                             DataTextField = "HaulierTypeName" 
                                             SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("HaulierType").CurrentFilterValue %>'  
                                             OnClientSelectedIndexChanged="HaulierTypeChanged">  
                            <Items>  
                                <telerik:RadComboBoxItem Text="All" />  
                            </Items>  
                        </telerik:RadComboBox>  
                        <telerik:RadScriptBlock ID="sbHaulierType" runat="server">  
                           <script type="text/javascript">  
                                function HaulierTypeChanged(sender,args)   
                                {  
                                    var tableView=$find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");  
                                    tableView.filter("HaulierType",args.get_item().get_value(),"EqualTo");                                      
                                }  
                            </script>   
                        </telerik:RadScriptBlock>  
                    </FilterTemplate>  
                </telerik:GridDropDownColumn> 

I'm using a table called HaulierType with the following columns:
  • HaulierTypeID (PK)
  • HaulierTypeName (default column for DataTextField in the RadComboBox)
  • SVHaulierType
  • DAHaulierType
    <asp:SqlDataSource ID="sdsHaulierType" runat="server"   
                       ConnectionString="<%$ ConnectionStrings:MyConnectionString %>"   
                       SelectCommand="SELECT * FROM [HaulierType]">  
    </asp:SqlDataSource> 

I can get the grid to show the correct values like this:
protected void RadGridVehicle_Load(object sender, EventArgs e)  
    {  
        ddc = (GridDropDownColumn)RadGridVehicle.MasterTableView.Columns.FindByUniqueName("HaulierType");  
        if (userLang == "da")  
        {  
            ddc.ListTextField = "DAHaulierType";  
        }  
        else if (userLang == "sv")  
        {  
            ddc.ListTextField = "SVHaulierType";  
        }  
    } 

What's missing is setting the filtervalues in the gridcolumn.
How do I set the DataTextField serverside and in which event?

Please help - I'm totally stock.
BOS
Top achievements
Rank 1
 answered on 15 Apr 2010
2 answers
136 views

Hi,

I am getting the following error after upgrading my site to use the 2010 Q1 release:

Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.


Quick goolge found it is something to do with the server not having .net 3.5 SP1 installed. Is this required for 2010 Q1 release?

Thanks
Tom
Jeff
Top achievements
Rank 1
 answered on 15 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?