Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
273 views
Hi ,

Your reqirement is like one control will have rad grid with autogenerate column = true. And dynamically according to the page type the datasource will be set i.e. like if page is for customer then  list of customer will be there. If page is for product then product list will be the datasource for radgrid. Also we are goinig to have filters in each page for each cloumns.
Here my question is how can i apply filter to columns which are auto generated?

Thanks in advance.
Let me know if more info is neeeded.
Princy
Top achievements
Rank 2
 answered on 11 Jul 2011
1 answer
130 views
We need to customise the popup that is we want to change the "Ok" & "Cancel" button look up & background color
and I also want to change the title of popup as customised.How can I do this please suggest me.

Thanks
Jaichand
Princy
Top achievements
Rank 2
 answered on 11 Jul 2011
1 answer
144 views
I m developing an ASP.NET portal using Telerik UI Controls exclusively. I Have several RAD menu in Master page they are being overlapped by the Radmenu in a WebuserContol in a Content page

All the menu works well except when I use the Menu in the master page and when it expands over the Menu in content page i can till see the content page Menu Image on the expanded Master page menu....

I tried almost all z-index solutions but it didnot help.

Please find attached the image

Please suggest me the solution

Thanks

Sid
Shinu
Top achievements
Rank 2
 answered on 11 Jul 2011
2 answers
350 views
I have a combo box that I am attempting to populate in the page_load event and want the item in the combo box that corresponds to an incoming request string member value to be selected when done.  I have done this before and am not a "greenie", but I cannot get any item selected in the combo box.

The definition of the combo box is in the code block immediately below:
<telerik:RadComboBox ID="SearchCountry" TabIndex="5" style="z-index: 9000;" Width="200px" EnableEmbeddedSkins="true" Skin="Sitefinity" runat="server" Height="150px" OnClientSelectedIndexChanging="LoadSearchStateProv"></telerik:RadComboBox>

The server-side code behind code is immediately below this line:
Try
    Dim reader As SqlDataReader = cmd.ExecuteReader()
    Do While reader.Read()
        RCBI = New RadComboBoxItem()
        RCBI.Text = reader(sFieldToPopulate)
        RCBI.Value = reader("CodeList")
        If oValueToMatch = RCBI.Value Then
            RCBI.Selected = True
        End If
        RadComboBox1.Items.Add(RCBI)
    Loop
    reader.Close()
    reader = Nothing
Catch ex As Exception
    Throw New ApplicationException("Error reading to populate country combo box from Select Statement=" & ComboSelectStmt & ". Code=" & ex.Message)
Finally
End Try

Can you please tell me what I am doing wrong?  The combo box is being populated correctly...but no item is selected when the page_load event completes and the page is visible.  Why?

Thanks in advance!

Lynn
Lynn
Top achievements
Rank 2
 answered on 11 Jul 2011
2 answers
133 views
Hi all,

I have a grid created through declarative client side binding. Everything works fine but now I have added a combox and I would like the databind function to be called again as soon as an item is selected.

There is an example in the demo but it looks like this happening on the server side. I need this to happen on the client side. Here is my code:

<%@ Page language="C#" Codebehind="Custom_DealUI.aspx.cs" AutoEventWireup="false" Inherits="KF.Crm.Web.Custom_DealUI" %>
  
  
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  
  
  
<head id="Head1" runat="server">
      
      
     
 <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
  
  
        <script type="text/javascript">
         
       <!--
            function OnClientSelectedIndexChangedEventHandler(sender, args) {            
              
            //NEED TO SOMEHOW CALL THE CLIENT SIDE DATABIND FUNCTION 
                  
            }
      
        function RadGrid1_DataBinding(sender, args) {
              
  
             
            var dataSourceLocation = args.get_location();
            var selectMethodName = args.get_methodName();
            var methodArguments = args.get_methodArguments();
  
           
              
            var startRowIndexParameterName = sender.ClientSettings.DataBinding.StartRowIndexParameterName;
            
            var maximumRowsParameterName = sender.ClientSettings.DataBinding.MaximumRowsParameterName;
              
            var sortParameterName = sender.ClientSettings.DataBinding.SortParameterName;
             
            var filterParameterName = sender.ClientSettings.DataBinding.FilterParameterName;
         
        }
          
        -->
    </script>
  
</telerik:RadCodeBlock>
  
    <style type="text/css">
        #mainForm
        {
            height: 646px;
        }
    </style>
  
</head>
<body class="BODY">
    <form runat="server" id="mainForm" method="post">
         
        <telerik:RadScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server" />
        <!-- content start -->
          <telerik:RadComboBox ID="RadComboBox1" runat="server" OnClientSelectedIndexChanged ="OnClientSelectedIndexChangedEventHandler"
  
       DataTextField="DealSelector"
      DataValueField="DealSelector" Culture="English (Australia)" 
            EnableAutomaticLoadOnDemand="True" Skin="Windows7"  >
              <Items>
                  <telerik:RadComboBoxItem runat="server" Text="All Deals" Value="All Deals" />
                  <telerik:RadComboBoxItem runat="server" Text="New Deals" Value="New Deals" />
                  <telerik:RadComboBoxItem runat="server" Text="Waiting Manager Approval" 
                      Value="Waiting Manager Approval" />
                  <telerik:RadComboBoxItem runat="server" Text="Manager Approved" 
                      Value="Manager Approved" />
                  <telerik:RadComboBoxItem runat="server" Text="Income Recognised" 
                      Value="Income Recognised" />
                  <telerik:RadComboBoxItem runat="server" Text="Pro-forma Invoice Created" 
                      Value="Pro-forma Invoice Created" />
                  <telerik:RadComboBoxItem runat="server" Text="Waiting Accounts Approval" 
                      Value="Waiting Accounts Approval" />
                  <telerik:RadComboBoxItem runat="server" Text="Invoiced" Value="Invoiced" />
                  <telerik:RadComboBoxItem runat="server" Text="Receipt Processed" 
                      Value="Receipt Processed" />
                  <telerik:RadComboBoxItem runat="server" Text="Credit Processed" 
                      Value="Credit Processed" />
                  <telerik:RadComboBoxItem runat="server" Text="Inactive" Value="Inactive" />
              </Items>
    </telerik:RadComboBox>
      
        <telerik:RadGrid ID="RadGrid1" AllowSorting="True" AllowPaging="True" 
            AllowFilteringByColumn="True" runat="server" CellSpacing="0" GridLines="None" 
            PageSize="100" Skin="Windows7" Culture="English (Australia)" 
             ShowStatusBar="True" Height="611px" style="margin-top: 34px">
            <MasterTableView>
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
  
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
  
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="DealNo" HeaderText="DealNo" 
                AllowFiltering="True" >
                        <HeaderStyle Font-Bold="True" />
                    </telerik:GridBoundColumn>
                      
                   <telerik:GridBoundColumn DataField="ID" HeaderText="ID" 
                AllowFiltering="True" Visible="True" >
                        <HeaderStyle Font-Bold="True"  />
                    </telerik:GridBoundColumn>
                      
                        
          <telerik:GridBoundColumn DataField="Location" HeaderText="Location" 
                AllowFiltering="True" >
              <HeaderStyle Font-Bold="True" />
                    </telerik:GridBoundColumn>
          <telerik:GridBoundColumn DataField="Department" HeaderText="Department" 
                AllowFiltering="False" >
              <HeaderStyle Font-Bold="True" />
                    </telerik:GridBoundColumn>
          <telerik:GridBoundColumn DataField="LeadOp" 
                HeaderText="Lead Operative" AllowFiltering="True" >
              <HeaderStyle Font-Bold="True" />
                    </telerik:GridBoundColumn>
          <telerik:GridBoundColumn DataField="TranType" 
                HeaderText="Transaction Type" AllowFiltering="False" >
                  
              <HeaderStyle Font-Bold="True" />
                    </telerik:GridBoundColumn>
                  
          <telerik:GridBoundColumn DataField="LevelSuite" HeaderText="Level Suite" 
                AllowFiltering="False" >
                  
              <HeaderStyle Font-Bold="True" />
                    </telerik:GridBoundColumn>
                  
          <telerik:GridBoundColumn DataField="Address" HeaderText="Address" 
                AllowFiltering="False" >
                  
              <HeaderStyle Font-Bold="True" />
                    </telerik:GridBoundColumn>
                  
          <telerik:GridBoundColumn DataField="KFAAmtExGST" 
                HeaderText="Amount Ex GST" AllowFiltering="False" DataType ="System.Decimal"  >
                  
              <HeaderStyle Font-Bold="True" />
                    </telerik:GridBoundColumn>
                  
          <telerik:GridBoundColumn DataField="DealStatus" HeaderText="Deal Status" 
                AllowFiltering="False" >
                  
              <HeaderStyle Font-Bold="True" />
                    </telerik:GridBoundColumn>
                  
          <telerik:GridBoundColumn DataField="GPDebtor" HeaderText="GP Debtor" 
                AllowFiltering="False" >
                <HeaderStyle Font-Bold="True" />
                    </telerik:GridBoundColumn>
                </Columns>
  
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
  
<PagerStyle AlwaysVisible="True"></PagerStyle>
            </MasterTableView>
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
  
             
            <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" >
                <DataBinding Location="WebService.asmx"
                    SelectMethod="GetDataAndCount" SelectCountMethod="GetCount" 
                    EnableCaching="True" />
                <ClientEvents OnDataBinding="RadGrid1_DataBinding" />
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                <Resizing AllowColumnResize="True" AllowResizeToFit="True" />
                  
                  
            </ClientSettings>
  
<FilterMenu EnableImageSprites="False"></FilterMenu>
        </telerik:RadGrid>
          
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" 
            BackImageUrl="loading.gif" BackgroundPosition="None" HorizontalAlign="Center" />
  
  
         
         
        <!-- content end -->
         
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" 
            DefaultLoadingPanelID="RadAjaxLoadingPanel1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" 
                            LoadingPanelID="RadAjaxLoadingPanel1"  />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
         
    </form>
</body>
</html>
Stanley
Top achievements
Rank 1
 answered on 11 Jul 2011
5 answers
776 views
Hi,

Radcombobox selectedindexchanged not firing when changing the index programmatically, I am changing the index as the code block below. The event is firing fine when changing the index manually from the screen
cbo_Mode.SelectedIndex = cbo_Mode.FindItemIndexByValue(SubmissionMode);
Pls guide me how to go about it.

Thanks
Jidesh
Cat Cheshire
Top achievements
Rank 1
 answered on 10 Jul 2011
6 answers
383 views
Hi All,

i have a page this used radgrid to retrieve data from database and i used a customized edit form which is shown as popup while editing and inserting records....

i noticed that when this popup is called for the first time...all controls in it are shown correctly in their postions including the update/insert and cancel buttons.... the popup is called when click on the edit/insert columns in the grid...

but after the first time and when the popup is called the update/insert button is moved up its position in the row...

i used html tables to design the popup template....

i don't know what is the reason for this behavior??? and how can be solved?

i have a second question regarding the grid direction attribute if from right to left...
the gird direction becomes from right to left correctly BUT the grid header, pager and filter row is expanded and controls are not in their expected positions.

i have attached a snapshot of the grid when it is left to right and right to left...

i hope can find the reason and solution of this problem????

thanks in adavnced

Asa'ad

Asa'ad
Top achievements
Rank 1
 answered on 10 Jul 2011
2 answers
62 views
Hi

I tried to use radeditor 4.5.6 in my webpart coding. I am getting the error message as "The type 'Telerik.SharePoint.MOSSRadEditor' has no constructors defined". It means "Radeditor Lite version" ?. Can we use this version in my webpart coding?.  I can't craete a instance for MoassRadEditor class. How can I use? if it is possible. Please guide me the correct way.

Thanaks in advance

selva
Top achievements
Rank 1
 answered on 09 Jul 2011
8 answers
773 views
Im reposting this here because someone moved my query to radmenu because i used it as an example. Ill paste my comments below...

Post 1.

After updating to the latest version of rad controls,  Visual Studio is not showing me the control formed correctly.
For example

<telerik:RadMenu ID="RadMenu3" Runat="server"></telerik:RadMenu

works fine, but

 

<telerik:RadMenu ID="RadMenu3" Runat="server" Skin="Forest"><CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation></telerik:RadMenu>

 


doesnt .

...and while you at it, can u put the colour controls in here, there is nothing more annoying then having to format text after copying and pasting.

Post 2.

ok, now the error for the ajax manager comes up as:
Error creating control - Rad Ajax Manager1

'AjaxSettings' could not be initialized. Detailes:[a]Telerik.Web.Ui.RadAjaxManager cannot be cast to[B]Telerik.Web.Ui.RadAjaxManager. Type A originates from 'Telerik.Web.Ui, Version=2008.3.1125.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4' in the context 'LoadNeither' at location 'C:\Documents and settingsMatthew\Local Settings\Application Data\Microsoft\VisualStudio\9.0\ProjectAssemblies\y5-i03sn01\telerik.web.ui.dll'. Type B originates from 'Telerik.Web.Ui, Version=2008.3.1125.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4' in the context 'LoadNeither' at location 'C:\Documents and settingsMatthew\Local Settings\Application Data\Microsoft\VisualStudio\9.0\ProjectAssemblies\z0ovsobn01\telerik.web.ui.dll'.

I have deleted the contents of 'C:\Documents and settingsMatthew\Local Settings\Application Data\Microsoft\VisualStudio\9.0\ProjectAssemblies' in case it was calling an old version, or it was cached or something.

If I drag a new control from th tool bar, then everything is fine until I try and change a setting


I really need some help on this as I have been able to do no work since installing the new controls


Michael
Top achievements
Rank 1
 answered on 08 Jul 2011
2 answers
195 views
Hi all,

I have grid that on insert / edit opens a RadWindow using functionality I have found on this website.  This default functionality uses a default view to present the edit form and I have amended it slightly changing two of the text boxes to a RadDatePicker and a RadEditor.  These additional RadControls bind properly but the binding appears to only be one way.  Upon update/insert any data in these RadControls is ignored and only the data from the text boxes goes into the database.

Can anyopne help me out please?  I have attached the code below:

PersonEditForm.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonEditForm.aspx.cs" Inherits="HonoursBoard.Admin.PersonEditForm" %> 
<%@ 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 id="Head1" runat="server">  
        <title>Untitled Page</title> 
    </head> 
    <body> 
        <form id="form1" runat="server">  
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
            </telerik:RadScriptManager> 
            <div> 
                <script type="text/javascript">  
                function CloseAndRebind(args)  
                {  
                    GetRadWindow().Close();  
                    GetRadWindow().BrowserWindow.refreshGrid(args);  
                }  
                       
                function GetRadWindow()  
                {  
                    var oWindow = null;  
 
                    if (window.radWindow)  
                        oWindow = window.radWindow; //Will work in Moz in all cases, including classic dialog  
                    else if (window.frameElement.radWindow)  
                        oWindow = window.frameElement.radWindow;//IE (and Moz as well)  
                        return oWindow;  
                 }  
                 function CancelEdit()  
                 {  
                    GetRadWindow().Close();    
                 }  
                </script> 
                <asp:DetailsView ID="DetailsView1" DataKeyNames="intPersonID" runat="server" AutoGenerateRows="False" 
                    DataSourceID="SqlDataSource1" Height="50px" Width="125px" OnItemCommand="DetailsView1_ItemCommand">  
                    <Fields> 
                        <asp:BoundField DataField="strTitle" HeaderText="Title" SortExpression="strTitle" /> 
                        <asp:BoundField DataField="strFirstName" HeaderText="First Name" SortExpression="strFirstName" /> 
                        <asp:BoundField DataField="strInitials" HeaderText="Initials" SortExpression="strInitials" /> 
                        <asp:BoundField DataField="strLastName" HeaderText="Last Name" SortExpression="strLastName" /> 
                        <asp:TemplateField HeaderText="Date Of Birth">  
                            <ItemTemplate> 
                                <telerik:RadDatePicker EnableViewState="false" MinDate="01/01/1850" 
                                    MaxDate="01/01/2100" Skin="Telerik" ID="RadDatePicker1" 
                                    DbSelectedDate='<%# DataBinder.Eval(Container.DataItem, "datDateOfBirth") %>' 
                                    Runat="server"></telerik:RadDatePicker> 
                            </ItemTemplate> 
                        </asp:TemplateField> 
                        <asp:TemplateField HeaderText="Biography">  
                            <ItemTemplate> 
                                <telerik:RadEditor EnableViewState="false" ID="RadEditor1" runat="server" Skin="Telerik" 
                                    ToolsFile="~/Editor/BasicTools.xml" Width="400px" Height="200px" 
                                    Content='<%# DataBinder.Eval(Container.DataItem, "strBiography") %>'>  
                                </telerik:RadEditor> 
                            </ItemTemplate> 
                        </asp:TemplateField> 
                        <asp:CommandField ShowEditButton="True" /> 
                        <asp:CommandField ShowInsertButton="True" InsertText="Add" /> 
                    </Fields> 
                </asp:DetailsView> 
            </div> 
            <asp:SqlDataSource ID="SqlDataSource1" runat="server"   
                ConnectionString="<%$ ConnectionStrings:dbGolfHonoursConnectionString %>"   
                InsertCommand="InsertAPerson" InsertCommandType="StoredProcedure"   
                SelectCommand="SelectPersonByPersonID" SelectCommandType="StoredProcedure"   
                UpdateCommand="UpdateAPerson" UpdateCommandType="StoredProcedure">  
                <SelectParameters> 
                    <asp:QueryStringParameter DefaultValue="0" Name="PersonID"   
                        QueryStringField="intPersonID" Type="Int32" /> 
                </SelectParameters> 
                <UpdateParameters> 
                    <asp:Parameter Name="intPersonID" Type="Int32" /> 
                    <asp:Parameter Name="strTitle" Type="String" /> 
                    <asp:Parameter Name="strFirstName" Type="String" /> 
                    <asp:Parameter Name="strInitials" Type="String" /> 
                    <asp:Parameter Name="strLastName" Type="String" /> 
                    <asp:Parameter Name="strBiography" Type="String" /> 
                    <asp:Parameter Name="datDateOfBirth" Type="DateTime" /> 
                </UpdateParameters> 
                <InsertParameters> 
                    <asp:Parameter Name="strTitle" Type="String" /> 
                    <asp:Parameter Name="strFirstName" Type="String" /> 
                    <asp:Parameter Name="strInitials" Type="String" /> 
                    <asp:Parameter Name="strLastName" Type="String" /> 
                    <asp:Parameter Name="strBiography" Type="String" /> 
                    <asp:Parameter Name="datDateOfBirth" Type="DateTime" /> 
                </InsertParameters> 
            </asp:SqlDataSource> 
        </form> 
    </body> 
</html> 


PersonEditForm.aspx.cs
using System;  
using System.Collections;  
using System.Configuration;  
using System.Data;  
using System.Linq;  
using Telerik.Web.UI;  
using System.Web;  
using System.Web.Security;  
using System.Web.UI;  
using System.Web.UI.HtmlControls;  
using System.Web.UI.WebControls;  
using System.Web.UI.WebControls.WebParts;  
using System.Xml.Linq;  
 
namespace HonoursBoard.Admin  
{  
    public partial class PersonEditForm : System.Web.UI.Page  
    {  
        protected void Page_Init(object sender, EventArgs e)  
        {  
            if (Request.QueryString["intPersonID"] == null)  
            {  
                DetailsView1.DefaultMode = DetailsViewMode.Insert;  
            }  
            else 
            {  
                DetailsView1.DefaultMode = DetailsViewMode.Edit;  
            }  
        }  
 
        protected void DetailsView1_ItemCommand(object sender, System.Web.UI.WebControls.DetailsViewCommandEventArgs e)  
        {  
            if (e.CommandName == "Update")  
            {  
                ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CloseAndRebind();", true);  
            }  
            else if (e.CommandName == "Insert")  
            {  
                ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CloseAndRebind('navigateToInserted');", true);  
            }  
            else 
            {  
                ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CancelEdit();", true);  
            }  
        }  
    }  
} 

Thanks in advance for any help offered,

Martyn
Hoon
Top achievements
Rank 1
 answered on 08 Jul 2011
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?