Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
216 views
When DropDownTree sits near other expanding controls (e.g. standard date pickers), causes these controls to sit behind DropDownTree. I tried every solution like sitting inline style, enforcing z-index to .RadDropDownTree_Default, making other controls' z-index attribute too much bigger than 100000 and enforcing style via jquery, but in any case, expanded controls fall behind the input (textbox) area of RadDropDownTree.

How can I enforce low z-index values on RadDropDownTree so that it does not sit above other expanding controls?
Shinu
Top achievements
Rank 2
 answered on 16 Jul 2014
1 answer
1.0K+ views
hi
i have combo box i use it in  user control and this is code for it
code of  all user control

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DirectSales.ascx.cs"
    Inherits="SallingSystem.GUI.Layer.DirectSales1" %>
<br />
    <script type="text/javascript">
        function pageLoad() {
        }
        ///*********************************************************************************///
        function OnClientDropDownClosed(sender, args) {
            var radcombobox = $find('<%=RedComboItem.ClientID %>').get_text();
                alert(radcombobox);
            }
        ///*********************************************************************************///
    </script>
<div id="DirectSalesControls" runat="server">
    <telerik:RadComboBox ID="RadComboTreasury" runat="server" Width="100px" DataSourceID="ODSTreasury"
        DataTextField="Name" DataValueField="ID" MarkFirstMatch="True" ResolvedRenderMode="Classic">
    </telerik:RadComboBox>
    <telerik:RadComboBox ID="RadComboSaler" runat="server" Width="150px" DataSourceID="ODSSaler"
        DataTextField="Name" DataValueField="ID" MarkFirstMatch="True" ResolvedRenderMode="Classic">
    </telerik:RadComboBox>
    <telerik:RadComboBox ID="RedComboItem" runat="server" AppendDataBoundItems="True"
        Width="545px" HighlightTemplatedItems="true" DropDownWidth="565px" EmptyMessage="Choose a Product"
        DataValueField="Value" DataTextField="Text"
        OnClientDropDownClosing="OnClientDropDownClosed" oninit="RedComboItem_Init" >
        <HeaderTemplate>
            <table cellspacing="0" cellpadding="0">
                <tr>
                    <td id="Td1" runat="server" style="width: 100px;">
                        Product Price
                    </td>
                    <td id="Td2" runat="server" style="width: 100px;">
                        Product Code
                    </td>
                    <td id="Td3" runat="server" style="width: 330px;">
                        Product Name
                    </td>
                </tr>
            </table>
        </HeaderTemplate>
        <ItemTemplate>
            <table cellspacing="0" cellpadding="0">
                <tr>
                        <td style="width: 100px;">
                            <asp:Label ID="lblProductPrice" runat="server"><%# DataBinder.Eval(Container, "Text")%></asp:Label>
                        </td>
                        <td style="width: 100px;">
                            <asp:Label ID="lblproductCode" runat="server"><%# DataBinder.Eval(Container, "Attributes['ProductCode']")%></asp:Label>
                        </td>
                        <td style="width: 330px;">
                            <asp:Label ID="lblProductName" runat="server"><%# DataBinder.Eval(Container, "Attributes['ProductName']")%></asp:Label>
                        </td>
                </tr>
            </table>
        </ItemTemplate>
    </telerik:RadComboBox>
    <telerik:RadNumericTextBox ID="RadNumTextIncrease" runat="server" Width="120" Label="Increase">
    </telerik:RadNumericTextBox>
    <telerik:RadNumericTextBox ID="RadNumTextDiscount" runat="server" Width="150" Label="Discount">
    </telerik:RadNumericTextBox>
    <telerik:RadNumericTextBox ID="RadNumTextTotale" runat="server" Width="110" Label="Totale">
    </telerik:RadNumericTextBox>
    <telerik:RadButton ID="RadBtnSave" runat="server" Text="Save" OnClick="RadBtnSave_Click">
    </telerik:RadButton>
    <br />
    <asp:ObjectDataSource ID="ODSTreasury" runat="server" SelectMethod="GetTreasuryDetails"
        TypeName="SallingSystem.DataBussinessLayer.TreasuryDBL"></asp:ObjectDataSource>
    <asp:ObjectDataSource ID="ODSSaler" runat="server" SelectMethod="GetDirectSalerDetails"
        TypeName="SallingSystem.DataBussinessLayer.DirectSalerDBL"></asp:ObjectDataSource>
</div>

and this is code behind for it too

protected void RadBtnSave_Click(object sender, EventArgs e)
        {
            // check if user not leave the field of item free
            if (RedComboItem.SelectedValue != "" && RedComboItem.Text != "Choose a Product" && RadNumTextTotale.Text != null && RadComboTreasury.SelectedValue != null && RadComboSaler.SelectedValue != null)
            {
                var objDirectSalesOperation = new DirectSalesOperation();
                objDirectSalesOperation.UserID = Convert.ToInt32(Session["LoginUserID"]);
                objDirectSalesOperation.TreasurID = Convert.ToInt32(RadComboTreasury.SelectedValue);
                objDirectSalesOperation.SalerID = Convert.ToInt32(RadComboSaler.SelectedValue);
                objDirectSalesOperation.ItemID = Convert.ToInt32(RedComboItem.SelectedValue);
                objDirectSalesOperation.TotalePrice = Convert.ToInt32(RadNumTextTotale.Text);
                var objDirectSalesOperationDAl = new DirectSalesOperationDAL();
                var Result = objDirectSalesOperationDAl.InsertNewSalesOperation(objDirectSalesOperation);
                if (Result >= 1)
                {
                    // inserted right
                    // hide the control who i use in insert new sales order
                    DirectSalesControls.Style.Add("display", "none");
                }
                else
                {
                    // not inserted
                    
                }
            }
            else
            {
              // some data mast inserted not inserted  
 
            }
        }

        protected void RedComboItem_Init(object sender, EventArgs e)
        {
            // create object from IteamDBL
            IteamDBL objIreamDBL = new IteamDBL();
            // create list of Iteam object
            List<Iteam> lstIteam = new List<Iteam>();
            // call method who get all iteam details
            lstIteam = objIreamDBL.GetIteamDetails();
            // create loop to add the list of object to cobobox
            foreach (var objiteam in lstIteam)
            {
                // create object of comboBoxIteam
                RadComboBoxItem comIteam = new RadComboBoxItem();
                /// give every item of object created value text and and more attribute more
                /// in comboBox i created
                comIteam.Value = objiteam.ID.ToString();
                comIteam.Text = Convert.ToString(objiteam.SalesPrice);
                comIteam.Attributes.Add("ProductCode", objiteam.CodeNumber);
                comIteam.Attributes.Add("ProductName", objiteam.Name.ToString());
                // if i want get all data as value in code behind
                //comIteam.Value += ":" + objiteam.Name;
                // add the object of combo item i create to the comboBox i want in page
                RedComboItem.Items.Add(comIteam);
                // bind the data after i add all value i want in item i create of combo box item
                comIteam.DataBind();
            }
        }

and in clinte side i need to access the value and text of item combo box
i try all what i find in site like (get_value , get_text) but it is not work with me get the empty massage or get null
so i need t know h i can access the combo box text and value in client side 

thanks
Ahmed Salem
 
Shinu
Top achievements
Rank 2
 answered on 16 Jul 2014
2 answers
151 views
Hi Sir,

I am having an issue, After double clicking on RadGrid Record then  through GetDatakeyValue i am getting vaue but not getting value with thousand operator.
 
-->Suppose in Raggrid displayed Amoun Field values is:$1,500.00
-->by using GetDataKeyValue getting value is:1500 not like the above.

If you have an idea please suggest to me sir.

Script:<script type="text/javascript">
        function RowDblClick(sender, eventArgs) {
            var grid = $find("<%= RadGrid1.ClientID %>");
            var MasterTable = grid.get_masterTableView();
            var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];
            var key = MasterTable.getCellByColumnUniqueName(row, "EmpID");
            var ID = key.innerHTML;
            MasterTable.fireCommand("DblClick", ID);
        }
    </script>

 ASPX:
---------

                <telerik:GridBoundColumn DataFormatString="{0:C2}" DataField="Amount" HeaderText="Amount"
                    UniqueName="Amount" Visible="true" Display="true" HeaderStyle-HorizontalAlign="Center"
                    ItemStyle-HorizontalAlign="Center">
                </telerik:GridBoundColumn>

 Code Behind:
 ------------------
   protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
    {
    
        if (e.CommandName == "DblClick")
        {
           GridDataItem item = (GridDataItem)RadGrid1.SelectedItems[0];
           Session["Amount"] = item.GetDataKeyValue("Amount").ToString();
        }
   }

  
Venkateswarlu
Top achievements
Rank 1
 answered on 16 Jul 2014
1 answer
102 views
I want a grid with only  column names and filtering option visible initially. Only when user click on a Search button, the rows will be displayed accordingly. How can I achieve this?
Princy
Top achievements
Rank 2
 answered on 16 Jul 2014
1 answer
109 views
HI,
is there any to Hide "Today" on FastNavgationPopup?
Princy
Top achievements
Rank 2
 answered on 16 Jul 2014
4 answers
148 views
Hello, I am a junior programmar. Recently, I have been requested by using telerik AJAX to plot the html5 chart. Unfortunately, I am facing some kinds of minor problems.

1. Does event handler exist for the range selector?(Attachment: 1.JPG)
For some reasons, I need to keep track with the 'from' and 'to' date of the range selector. I need to put the 'from' and 'to' date to the textbox when the user slides the navigation bar. However, I can't put the rangeselector to the event class. So, it can't be done.
Does HtmlChart include something like http://www.telerik.com/help/winforms/rangeselector-properties-and-events.htmlelector-properties-and-events.html ?

2. Can Appearance of X-axis be changed?(2.JPG)
The another problem is that when the selection range is small, the displayed X-axis only display the time. It makes the users don't know what the date is.

3. HTML5 Chart is slow in IE
I have read many articles that related to HTML5 and IE, and try to add radstylesheet,scriptmanager......html5shiv.js. After doing everything that I know, it is faster but not fast enough. The tooltip only appears if I move the mouse towards the point many times. What else can I do? Can the future package be improved?

I hope you can answer the questions. Thank you.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
Maxson Junior
Top achievements
Rank 2
 answered on 16 Jul 2014
3 answers
447 views
Hi,

I am new to Telerik RadControl suite (2013 Q1) and testing RadGrid control. I am surprised to find that sorting on client side on Radgrid is not that simple. In some post it is mentioned that I have to do this:

call the web service/page method/ URL that provides your data when you need to sort. RadGrid then expects the sorted data to be returned in the response. If you need to simulate this approach entirely on the client-side, you can hook to the client-side OnCommand event, check for the Sort command, cancel the command to prevent default behavior, sort the data programmatically with javascript and pass the sorted result back to the grid using RadGrid.get_masterTableView().set_dataSource().

If we are going with server side:
I have to code in RadGrid1_SortCommand event and rebind the grid. Our requirement has that we use templated column with textboxes and let user enter data. At any point of time, user can sort. Say suppose I have 10 rows, user entered values into text boxes of 2 rows. Then he clicked on some column header text. How do we retain text box values if we rebind the grid. Does it automatically uses viewstate to set back templated column with textboxes and value.

If anyone has any examples, please let me know.
Thanks,
Prathiba.
Sami
Top achievements
Rank 1
 answered on 15 Jul 2014
4 answers
309 views
Can I get confirmation that the documentation on RadDropDownList client-side OnClientItemsRequesting event handling is incorrect, as the constructor for the event arguments is coming across as Sys.CancelEventArgs and therefore has no context? The event arguments for the combobox are of type RadComboBoxItemsRequestedEventArgs, which does not have a context, but I see no corresponding class for the DropDownList.

Is there a workaround that I could use to add a context to the the RadDropDownList OnClientItemsRequesting client-side function?
Bill
Top achievements
Rank 1
 answered on 15 Jul 2014
1 answer
103 views
I'm using Web Service binding for my scheduler control and would like to use Rad dock als  an external form for insert and edit appointment? How can I do it? I tried "Scheduler - External Edit in RadDock" shown in the demo,
http://demos.telerik.com/aspnet-ajax/scheduler/examples/raddock/defaultcs.aspx

but it didn't work.

Thanks for your help
Yi
Boyan Dimitrov
Telerik team
 answered on 15 Jul 2014
2 answers
400 views
I have a RadGrid to which I've applied alternating row colors via CssClass attributes as recommended here:

<ItemStyle CssClass="GridItemStyle" />
<AlternatingItemStyle CssClass="GridAltItemStyle" />
<SelectedItemStyle CssClass="GridSelItemStyle" />

That works fine to style the rows using my zebra colors.  Now, I've added to the grid:

<MasterTableView AllowSorting="true" />

Now, when I click on a column header, the cells in the column by which I've sorted the data are not styled using my ItemStyle and AlternatingItemStyle CSS classes.  All of the <td/>s in the sorted column have class="rgSorted", yet they're zebra striped in the default grid alternating colours.  What gives?

(Rhetorical aside: Why don't ItemStyle-BackColor, AlternatingItemStyle-BackColor and SelectedItemStyle-BackColor just work the way they should?  Why is the recommended solution that we should use CSS to bypass your grid's own properties?  Shouldn't the recommended solution be to make the grid's published properties work with each other?  If we have to do it in CSS, your developers definitely can.)

So, about that screenshot, why is the sorted column ignoring my CSS row styles and reverting to the defaults?

Thank you,
~Jeff

Jeff
Top achievements
Rank 1
 answered on 15 Jul 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?