Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
155 views
Hello,
    I am looking for a combo box with a textbox as first item so that user can enter a text and then click on the dropdown to select a search kind ex. Starts with Ends With. This is a search condition attached to the RadGrid. Please refer to the following code. The search condition also has excel like advanced filter. Is it possible to make the first Item in the RadMenu - "All" to a editable mode?
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="true" AutoGenerateColumns="false"
                   GridLines="None" Width="95%" AllowPaging="true" PageSize="25" OnNeedDataSource="RadGrid1_NeedDataSource">
                   <MasterTableView Width="100%" DataKeyNames="City" AllowFilteringByColumn="true" FilterItemStyle-Width="100%">
                       <Columns>
                           <telerik:GridBoundColumn DataField="City" HeaderText="City" UniqueName="City">
                               <FilterTemplate>
                                   <telerik:RadComboBox ID="RadSearchComboBox" Height="60px" AppendDataBoundItems="true"
                                       AutoPostBack="true" Text="" runat="server" OnSelectedIndexChanged="FilterCombo_SelectedIndexChanged"
                                       OnClientSelectedIndexChanged="SelectedIndexChanged" ShowDropDownOnTextboxClick="true">
                                       <Items>
                                           <telerik:RadComboBoxItem Text="All" Value="All" Style="display: none;" />
                                           <telerik:RadComboBoxItem Text="Chennai" Value="Chennai"/>
                                           <telerik:RadComboBoxItem Text="Hyderabad" Value="Hyderabad" />
                                       </Items>
                                       <HeaderTemplate>
                                          <telerik:RadMenu runat="server" ID="radM" Flow="Vertical" >
                                          <Items>
                                           <telerik:RadMenuItem Text="Select Filter">
                                               <Items>
                                                   <telerik:RadMenuItem Text="Starts With" Value="SW"></telerik:RadMenuItem>
                                                   <telerik:RadMenuItem Text="Ends With" Value="EW"></telerik:RadMenuItem>
                                               </Items>
                                           </telerik:RadMenuItem>
                                          </Items>
                                          </telerik:RadMenu>
                                       </HeaderTemplate>
                                       <ItemTemplate>
                                           <asp:CheckBox runat="server" ID="CheckBox" onclick="stopPropagation(event);" Text="">
                                           </asp:CheckBox>
                                           <asp:Label ID="lbl" runat="server" Text='<%# DataBinder.Eval(Container, "Text") %>'></asp:Label>
                                       </ItemTemplate>
                                   </telerik:RadComboBox>
                               </FilterTemplate>
                           </telerik:GridBoundColumn>
                       </Columns>
                   </MasterTableView>
                   <PagerStyle Mode="NextPrevAndNumeric" />
               </telerik:RadGrid>
Thanks,
JJ
Jayavidya
Top achievements
Rank 1
 answered on 27 Oct 2010
3 answers
140 views
Hi,
We are can click on the name of the column in the Image Manager to sort ASC and DESC.
Can we set these sorted alphabetically by default?  If yes what property we should used?
Thanks
Rumen
Telerik team
 answered on 27 Oct 2010
1 answer
82 views
If is basically to document what I found. I don't know if it is a bug or not, I believe it is just a flaw in the design. But this hopefully will save someone time by not having to troubleshoot for hours like I did.

I used the example of Excel-like RadGrid because it was exactly what I wanted. HOWEVER, it is for text only columns in a database. I found that when binding to the database without hard coding in the columns on the .aspx page the grid will imply a column type (nvarchar = textbox, float=RadNumericTextBox, etc...). This is fine, but there are different naming conventions for each.

Textboxes will have names like RadGrid1_ctl00_ctl04_ctl02, RadGrid1_ctl00_ctl04_ctl03, RadGrid1_ctl00_ctl04_ctl04, while NumericTextBox will have names like RadGrid1_ctl00_ctl04_RNTB_EmpID, RadGrid1_ctl00_ctl04_RNTB_EmpAge. This makes the navigation impossible with databases with numeric values, as in the example to move right you increment the name by one:
    Active Cell RadGrid1_ctl00_ctl04_ctl02 -> to move right increment RadGrid1_ctl00_ctl04_ctl02 becomes RadGrid1_ctl00_ctl04_ctl03.

My question is: is there a way to change the naming convention of the RadNumericTextBox without casting the column on the SQL call?

I can work around it by using Shift-tab/Tab for Left/Right and since the 3rd ctl99 subset is the row, I can move up and down. And I have not tried it yet, but I am sure you can just get the cell location (i.e. row 2, cell 3) and move it that way by getting the control id in the adjacent cell, but Just wondering if there is a way to make NumericTextBox have the same naming convention as TextBox ?  


Radoslav
Telerik team
 answered on 27 Oct 2010
1 answer
78 views
Hi,

I have a problem with the appearance of the grid.

I have two button-columns. I decide if which one is shown in OnItemBound.
When I set

dataItem["btnDeny"].Controls[0].Visible = false;

the gridlines are broken in this column after that like in the screenshot.

Nadine
Pavlina
Telerik team
 answered on 27 Oct 2010
6 answers
119 views
Not sure whether this should be posted here or the RadWindow forum.

I have a monthly Scheduler view where I add and edit entries using a RadWindow to open another page.

This all works perfectly fine, until my Monthly Scheduler grows bigger than the displayed page.  If I then scroll down and add an entry at the bottom, the RadWindow opens and is shown for a moment in the correct position as maximized, then it is shifted down so it starts half way down the browser window.

If I add an event at the top of the Calendar it all works OK.

I am using RadControls 2010.2.9.929 and IE8 (although it exhibits the behaviour in other browsers as well)

David Penny
David Penny
Top achievements
Rank 2
 answered on 27 Oct 2010
1 answer
82 views
Hi,

I have a problem in my grid (skin: Oulook).

When I select a row, some kind of half background appears in the row. I don't know if it's some kind of background color or an additional part of the header?

I attached a screenshot of unselected and selected state.

            <telerik:RadGrid ID="RadGridSourcing" Skin="Outlook"  BorderStyle="None" <br>                runat="server" OnItemCreated="RadGridSourcing_ItemCreated" <br>                OnItemCommand="RadGridSourcing_OnItemCommand" AllowMultiRowSelection="true" ClientSettings-Selecting-AllowRowSelect="true"<br>                OnNeedDataSource="RadGridSourcing_NeedDataSource"<br>                 Width="100%" OnItemDataBound="RadGridSourcing_ItemDataBound" OnPreRender="RadGridSourcing_PreRender" BorderWidth="0">                 <br>                <HeaderStyle BackColor="Blue" BorderWidth="0"/> <br>                <CommandItemStyle BackColor="White"   /><br>                <ItemStyle ForeColor="DimGray" BackColor="White"  /><br>                <ActiveItemStyle BackColor="White"  /><br>                <AlternatingItemStyle BackColor="AliceBlue" ForeColor="DimGray" /> <br>                <SelectedItemStyle BackColor="White" /> <br>                <EditItemStyle BackColor="White" />                <br><MasterTableView AutoGenerateColumns="False" ShowHeader="true" EditMode="PopUp" DataKeyNames="Guid">


Nadine
Dimo
Telerik team
 answered on 27 Oct 2010
1 answer
529 views
Hi,
i've got a problem and dont know how to make it. Ive got a master site:
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Default.master.cs" Inherits="Gambu.Client.Web.Default" %>
 
<!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>
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager" runat="server" />
    <link rel="stylesheet" type="text/css" href="./Styles/Table.css" />
</head>
<body>
    <form id="MainForm" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager" runat="server">
            <Scripts>
                <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>
        </telerik:RadScriptManager>
        <telerik:RadAjaxManager  ID="RadAjaxManager" runat="server" EnableHistory="True" />
        <telerik:RadSkinManager ID="RadSkinManager" Runat="server" Skin="Windows7" />
        <telerik:RadFormDecorator ID="RadFormDecorator" runat="server" Skin="Windows7" />
        <asp:ContentPlaceHolder ID="MainContentPlaceHolder" runat="server">
        </asp:ContentPlaceHolder>
        </form>
</body>
</html>
Default.cs: OnLoad i check if user is logged in, if no than show window with login:
var rWindow = new RadWindow();
rWindow.Title = "Logowanie";
rWindow.NavigateUrl = "Users/Login.aspx";
rWindow.Skin = "Windows7";
rWindow.IconUrl = "--";
rWindow.AutoSize = true;
rWindow.Modal = true;
rWindow.EnableShadow = true;
rWindow.EnableViewState = false;
rWindow.VisibleTitlebar = true;
rWindow.VisibleStatusbar = false;
rWindow.VisibleOnPageLoad = true;
rWindow.ShowContentDuringLoad = false;
rWindow.OnClientClose = "OnClientClose";
rWindow.Behaviors = Telerik.Web.UI.WindowBehaviors.Move;
WindowManager.Windows.Add(rWindow);
After user loggs in, i close the window and an event is fired:
function OnClientClose(oWnd, args) {
        var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>");
        ajaxManager.ajaxRequest("client");
    }
 it fires in Default.aspx:
<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Gambu.Client.Web.Default1" %>
 
<asp:Content ID="HeadContent" ContentPlaceHolderID="head" runat="server"></asp:Content>
<asp:Content ID="MainContent" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy" runat="server"></telerik:RadAjaxManagerProxy>
<script type="text/javascript">
    //<![CDATA[
    function OnClientClose(oWnd, args) {
        var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>");
        ajaxManager.ajaxRequest("client");
    }
    //]]>
</script>
 
<telerik:RadWindowManager ID="WindowManager" runat="server" />
 
<telerik:RadSplitter ID="MainRadSplitter" runat="server" Width="100%" Height="100%" LiveResize="True" Orientation="Horizontal">
    <telerik:RadPane ID="MainTopRadPane" runat="server" Height="30px" Scrolling="None"></telerik:RadPane>
    <telerik:RadPane ID="MainMiddleRadPane" runat="server" Scrolling="None">
        <telerik:RadSplitter ID="MainContentRadSplitter" runat="server" Width="100%" Height="100%" LiveResize="True" Orientation="Vertical">
            <telerik:RadPane ID="MainLeftMenuRadPane" runat="server" MinWidth="200" Width="250px" Scrolling="None">               
                <asp:Panel ID="MainLeftMenuPanel" runat="server"></asp:Panel>
                <div id="test" runat="server"></div>
            </telerik:RadPane>
            <telerik:RadSplitBar ID="MainMiddleRadSplitBar" runat="server" CollapseMode="Forward"></telerik:RadSplitBar>
            <telerik:RadPane ID="MainContentRadPane" runat="server" Scrolling="None">
            </telerik:RadPane>
        </telerik:RadSplitter>
    </telerik:RadPane>
</telerik:RadSplitter>
</asp:Content>
so i got request in:
protected void AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
        {
            RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);
            manager.Alert("test");
            test.InnerHtml = "test";
        }
Alert is working fine, but i cant change any control  on the site, and id like to load into MainLeftMenuPanel a UserControl, not only this, because ill need to load 3 diffrent controls into 3 diffrent panels or divs
Dimo
Telerik team
 answered on 27 Oct 2010
1 answer
83 views
Hey guys,

i have the following scenario.

I have an RadListView with about 10 pages. Each item in the ListView is clickable and linked to a new page with detailed information.

Let`s say i am currently on page 6 and click on an item. A new site with detailed information about this item appears in my browser.

Now i want to get back and click on the browser back-button. The ListView is appearing again but now i am not on page 6 where i clicked the item rather i am on page 1 of my ListView again.

Is there an possibility that the ListView can remember the page where i clicked my item and jump back automatically or do i have to store the page in the session and restore it manually to the ListView?

I am using RadDataPager and RadListView.

Thanks in advance.

Christ 
Dimo
Telerik team
 answered on 27 Oct 2010
1 answer
97 views
Hi,

I am unable to align the checkbox column of Templatecolumn to center in the Telerik grid column. Checkbox column is the first column and i am unable to make it center.
Please find the bellow code

<telerik:GridTemplateColumn UniqueName="ChkTmpColumn" HeaderText="Chk1" AllowFiltering="false" Resizable = "false" Reorderable = "false" >
                                                        <HeaderTemplate>                                                       
                                                            <asp:CheckBox ID="hdrChkTmpColumn" AutoPostBack="false" runat="server" ></asp:CheckBox>
                                                        </HeaderTemplate>
                                                        <ItemTemplate>                                                          
                                                            <asp:CheckBox ID="ChkTmpColumnSearch" AutoPostBack="false" runat="server" ></asp:CheckBox>
                                                        </ItemTemplate>
                                                        <HeaderStyle Width="50px"  HorizontalAlign="Center"  VerticalAlign="Middle" /> 
                                                        <ItemStyle  HorizontalAlign="Center" VerticalAlign="Middle" /> 

                                                    </telerik:GridTemplateColumn>


Please view the attached screen shot for further reference.
Thanks in advance.

Pavlina
Telerik team
 answered on 27 Oct 2010
1 answer
61 views
I have seen the examples but have had some trouble implementing them.  I need to know how to put a grid in edit mode similar to excel for non readonly columns in a grid with gridboundcolumns.

Thanks
Dimo
Telerik team
 answered on 27 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?