Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
138 views
Hello telerik team,
we need powerful grid control. Simply speaknig we want google-docs like look and feel - selecition of cells, begin edit on keypress, without page realoads, is it achievable with RadControls?
I checked out ASP.NET Ajax Grid examples with telerik controls but there is not such a example - everytime the cells is going to edit mode the records are being pulled from storage every time and it causes big delays.
I have seen excel-like grid in code library - it puts all cells to edit mode onload,that solves just part of a problem, because we also want to be able to select cells/rows, that cannot be done in edit mode.

Can RadControsl somehow help in achieving our goal?

The only solution that comes to my mind is code this entirely in Silverlight or some other Javascript like Ext library.
Vlad
Telerik team
 answered on 12 Aug 2009
1 answer
107 views
I have successfully created a RadGrid dynamically against one datasource obejct using your example on creation in the Page_PreInit event. All is well. Now I want to change one of the columns to a RadComboBox using a different datasource programatically too. Using the Northwind database, I have one of the columns defined in the Page_PreInit as this:

Dim calcColumn2 As New GridBoundColumn
calcColumn2.UniqueName = "ProductName"
calcColumn2.HeaderText = "Product Name"
calcColumn2.DataField = "ProductName"
calcColumn2.SortExpression = "ProductName"
RadGrid1.MasterTableView.Columns.Add(calcColumn2)

How do I change this to reflect a comboxbox instead? I see examples of creating each control separately now I need an example of doing both dynamically.

TIA, Tom
Vlad
Telerik team
 answered on 12 Aug 2009
3 answers
182 views
Hi

I have seen a few threads about this topic. None have helped me.
I only get this error on my production server. It occurs randomly. ie sometimes the radchart will display correctly and sometimes I will get this error. There is no pattern to the error.

My web.config contains

http handlers section
<add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />

system.webserver section
<add name="ChartImage_axd" verb="*" preCondition="integratedMode" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" />

Is their anything else I need to do?
Deon Visser
Top achievements
Rank 1
 answered on 12 Aug 2009
1 answer
109 views
Hi,
I would like to use the radconfirm dialog in a right-to-left environment. The problem is that I can't manage to change the direction of the action buttons (when in RTL, OK should appear in the right and Cancel in the left), or the location of question mark image (also should be on the right side of the window).
The browser I'm using is IE6.

Is there a solution for this?

Thanks.
Fiko
Telerik team
 answered on 12 Aug 2009
1 answer
241 views
Hi all,

I tried to bind data in onDataNeed function of a radgrid with IEnumerable as the code below. Remember DisplayComponent is just a temporary class, not a table that I created to store the results. The ExecuteQuery runs without any trouble. However, I cannot bind the to the radgrid. Anyone knows why?

protected void viewBookings_OnNeedDataSource(...) 
            string s_query = "select distinct bk.Start, fi.FacilityName, bk.Username " + 
                              "from Booking_Form as bk, " + 
                                    "Facility_Item as fi " + 
                              "where bk.FacilityID = fi.ID"; 
 
            IEnumerable<DisplayComponent> results = data.ExecuteQuery<DisplayComponent>(s_query); 
 
            viewBookingsGrid.DataSource = results.ToList(); 
 
        public class DisplayComponent 
        { 
            public string FacilityName, Username; 
            DateTime Start; 
 
            public DisplayComponent() 
            { 
            } 
        } 





Vlad
Telerik team
 answered on 12 Aug 2009
1 answer
209 views

Hello Sir

I want to filter the radgrid column but it can give the error selection out of range when i m trying to add 2nd drop downlist search for 2nd column. It works when i add the dropdownlist for single column it will works fine , but in 2nd gives error .


<telerik:GridTemplateColumn HeaderText="Primary Product" DataField="ProdName" UniqueName="ProdName"
                                                                                AllowFiltering="true" AutoPostBackOnFilter="true">
                                                                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                                                         
                                                                                <ItemTemplate>
                                                                                  <%# DataBinder.Eval(Container.DataItem,"ProdName") %>
                                                                                    <input type="hidden" id="hidPropID" runat="server" value='<%# DataBinder.Eval(Container.DataItem,"Proposal_ID")%>'
                                                                                        name="hidPropID" />
                                                                                    <input type="hidden" id="hidProposalGrpVal" runat="server" value='<%# DataBinder.Eval(Container.DataItem,"ProposalGrpVal")%>'
                                                                                        name="hidProposalGrpVal" />
                                                                                    <input type="hidden" id="hidChecked" runat="server" value='<%# DataBinder.Eval(Container.DataItem,"Checked")%>'
                                                                                        name="hidChecked" />
                                                                                </ItemTemplate>
                                                                             <FilterTemplate>
                                                                                    <telerik:RadComboBox ID="ddlPrimProd" Width="130" DataSourceID="Sqlprimprod" DataTextField="Name"
                                                                                        DataValueField="Name" Height="70" SelectedValue='<%# TryCast(Container, GridItem).OwnerTableView.GetColumn("Name").CurrentFilterValue %>'
                                                                                        runat="server" AppendDataBoundItems="True" Sort="Ascending" SortCaseSensitive="false"
                                                                                         MarkFirstMatch="true" Skin="Black" OnClientSelectedIndexChanged="ProdSelectedIndexChanged">
                                                                                        <Items>
                                                                                            <telerik:RadComboBoxItem Text="< Any Product >" />
                                                                                        </Items>
                                                                                    </telerik:RadComboBox>
                                                                                    <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">

                                                                                        <script type="text/javascript">
                                                                                            function ProdSelectedIndexChanged(sender,args) {
                                                                                            var tableView = $find("<%# TryCast(Container, GridItem).OwnerTableView.ClientID %>");
                                                                                                  if (sender.get_value() != "0")
                                                                                                   {                                                                                               
                                                                                                        tableView.filter("Name",args.get_item().get_value(),"EqualTo");
                                                                                                   }
                                                                                                else {
                                                                                                        tableView.filter("Name", args.get_item().get_value(), "NoFilter");
                                                                                                  }
                                                                                            }
                                                                                        </script>

                                                                                    </telerik:RadScriptBlock>
                                                                                </FilterTemplate></telerik:GridTemplateColumn>


<telerik:GridBoundColumn HeaderText="Crop" DataField="CropName" AllowFiltering="true"
                                                                                UniqueName="Name" AutoPostBackOnFilter="true" SortExpression="CropName">
                                                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                                                               
                                                                                <%--<ItemStyle Width="10%" />--%>
                                                                               <%--<FilterTemplate >
                                                                                <telerik:RadComboBox ID="ddlcrop" Width="130" DataTextField="CropName" ShowToggleImage ="false" EnableLoadOnDemand = "true"
                                                                                    DataValueField="CropName" runat="server" AppendDataBoundItems="true" markFirstMatch="true" Skin="Black"></telerik:RadComboBox>
                                                                                </FilterTemplate>--%>                  
                                                                                                                                                              
                                                                                <FilterTemplate>
                                                                                <telerik:RadComboBox ID="ddlcrop" Width="130" DataSourceID="SqlDataSource1" DataTextField="Name"
                                                                                    DataValueField="Name" Height="90" SelectedValue='<%# TryCast(Container, GridItem).OwnerTableView.GetColumn("Name").CurrentFilterValue %>'
                                                                                    runat="server" AppendDataBoundItems="true" OnClientSelectedIndexChanged="SelectedIndexChanged"
                                                                                    MarkFirstMatch="true" Skin="Black">
                                                                                    <Items>
                                                                                        <telerik:RadComboBoxItem Text=" <  Every  >" />
                                                                                    </Items>
                                                                                </telerik:RadComboBox>
                                                                                <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">

                                                                                    <script type="text/javascript">
                                                                                            function SelectedIndexChanged(sender,args) {
                                                                                            var tableView = $find("<%# TryCast(Container, GridItem).OwnerTableView.ClientID %>");
                                                                                                  if (sender.get_value() != "0")
                                                                                                   {                                                                                                
                                                                                                        tableView.filter("Name",args.get_item().get_value(),"Contains");
                                                                                                   }
                                                                                                else {
                                                                                                        tableView.filter("Name", args.get_item().get_value(), "NoFilter");
                                                                                                  }
                                                                                            }
                                                                                    </script>

                                                                                </telerik:RadScriptBlock>
                                                                            </FilterTemplate>
                                                                            </telerik:GridBoundColumn>



It gives exception when page is postback

  dgProposals.DataBind()

I m confuse why it happen bcuz it works when i trying for single column it will filter out proper , but when i add the the combobox for another column it gives exception.


The datasources are different ;


<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:GoConnectionString %>"
        SelectCommand="SELECT [ID], [Name] FROM [Crop]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="sqlprimprod" runat="server" ConnectionString="<%$ ConnectionStrings:GoConnectionString %>"
        SelectCommand="SELECT [Name] FROM [QryProdTN] ORDER BY [Name]"></asp:SqlDataSource>


Help Me urgent sir, Its very urgnet need


I hv seen your online demo but m not getting the solution from that .


reply urgent
Georgi Krustev
Telerik team
 answered on 12 Aug 2009
1 answer
140 views
as you can see under the code below i have these 3 radcombobox
<telerik:RadComboBox ID="ddl_Stores" AutoPostBack="true" runat="server" Visible="false" Width="100px" Skin="Forest" />&nbsp;&nbsp;                                               
<telerik:RadComboBox ID="ddl_Departments" AutoPostBack="true"  runat="server" Visible="false" Width="200px" Skin="Forest"/>&nbsp;&nbsp;  
<telerik:RadComboBox ID="ddl_Paging1" AutoPostBack="true" runat="server" Visible="false" Width="100px" Skin="Forest"/><br /><br /> 


and everytime when i tried to do
telerik:AjaxSetting AjaxControlID="ddl_Stores">  
                    <UpdatedControls>                          
                        <telerik:AjaxUpdatedControl ControlID="ddl_Paging1" /> 
                        <telerik:AjaxUpdatedControl ControlID="tbl_Data" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                        <telerik:AjaxUpdatedControl ControlID="PivotTable" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
 it would just create a break right after ddl_departments. so instead of having all 3 horizontally in one line, i now have first 2 in one line and the third dropdown in the next line. WHY IS IT? can you tell me what i did wrong? thanks.



<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Report.aspx.vb" Inherits="Report" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head id="Head1" runat="server">  
    <title>Sales Report</title> 
    <script type="text/javascript" src="FusionCharts/FusionCharts.js"></script> 
    <script type="text/javascript">  
        function RequestStart(sender, eventArgs)  
        {  
            var divElementStyle = document.getElementById("RadAjaxLoadingPanel1").style;  
            divElementStyle.position = 'absolute';  
            //position the loading panel  
            divElementStyle.left = eventArgs.get_eventTargetElement().offsetLeft + "px";  
            divElementStyle.top = eventArgs.get_eventTargetElement().offsetTop + "px";  
        }  
    </script>   
    <style type="text/css">  
        .CustomCssClass1 .rspPaneTabText, .rspPane, .RadSplitter  
        {  
            color: white !important;  
            border-color: white !important;  
        }  
        .CustomCssClass2 .rspSlideTitle     
        {  
            color: white !important;  
        }   
    </style>     
</head>      
<body style="background-color:#3d766f;; font-family:Verdana; font-size:12px;">  
    <form id="form1" runat="server">  
        <telerik:radscriptmanager id="RadScriptManager1" runat="server" AsyncPostBackTimeout="0" /> 
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Office2007" DecoratedControls="All" /> 
        <telerik:radajaxmanager id="RadAjaxManager1" runat="server" EnableEmbeddedScripts="true">    
            <ClientEvents OnRequestStart="RequestStart" /> 
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="ddl_Stores">  
                    <UpdatedControls>                          
                        <telerik:AjaxUpdatedControl ControlID="ddl_Paging1" /> 
                        <telerik:AjaxUpdatedControl ControlID="tbl_Data" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                        <telerik:AjaxUpdatedControl ControlID="PivotTable" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="ddl_Departments">  
                    <UpdatedControls>                          
                        <telerik:AjaxUpdatedControl ControlID="ddl_Paging1" /> 
                        <telerik:AjaxUpdatedControl ControlID="tbl_Data" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                        <telerik:AjaxUpdatedControl ControlID="PivotTable" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="ddl_Paging1">  
                    <UpdatedControls>                          
                        <telerik:AjaxUpdatedControl ControlID="ddl_Paging1" /> 
                        <telerik:AjaxUpdatedControl ControlID="tbl_Data" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                        <telerik:AjaxUpdatedControl ControlID="PivotTable" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:radajaxmanager>     
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" > 
            <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border:0;" /> 
        </telerik:RadAjaxLoadingPanel> 
        <asp:Table ID="tbl_Report" runat="server" BorderWidth="1px" cellpadding="5" cellspacing="0" width="100%" HorizontalAlign="center" height="100%" BackColor="#ffffff">  
            <asp:TableRow> 
                <asp:TableCell ColumnSpan="2"><asp:Label ID="lb_Error" runat="server" Font-Bold="true" ForeColor="red" /></asp:TableCell> 
            </asp:TableRow>                                                        
            <asp:TableRow> 
                <asp:TableCell VerticalAlign="top" ColumnSpan="2" Width="100%" Height="100%" BackColor="white">  
                    <telerik:RadSplitter id="RadSplitter1" runat="server" CssClass="CustomCssClass1" Skin="Forest" Width="100%" Height="23px" visible="false">  
                        <telerik:RadPane runat="server" id="RadPane1" Width="100%" > 
                            <telerik:RadSlidingZone runat="server" ID="RadSlidingZone_Graph" SlideDirection="Bottom">  
                                 <telerik:RadSlidingPane id="RadSlidingPane_Graph" title="Graph" runat="server" Scrolling="both">  
                                    <telerik:RadComboBox ID="ddlcharttype" Font-Size="12px" runat="server" Skin="Forest" AutoPostBack="true">                                                                                                  
                                        <Items> 
                                            <telerik:RadComboBoxItem Text="Select a chart type" Value="" /> 
                                            <telerik:RadComboBoxItem Text="Area" Value="Area" /> 
                                            <telerik:RadComboBoxItem Text="Bar" Value="Bar" /> 
                                            <telerik:RadComboBoxItem Text="Column" Value="Column" /> 
                                            <telerik:RadComboBoxItem Text="Line" Value="Line" /> 
                                        </Items> 
                                    </telerik:RadComboBox>    
                                 </telerik:RadSlidingPane> 
                            </telerik:RadSlidingZone>                                                
                        </telerik:RadPane> 
                    </telerik:RadSplitter>      
                    <telerik:RadComboBox ID="ddl_Stores" AutoPostBack="true" runat="server" Visible="false" Width="100px" Skin="Forest" />&nbsp;&nbsp;                                                 
                    <telerik:RadComboBox ID="ddl_Departments" AutoPostBack="true"  runat="server" Visible="false" Width="200px" Skin="Forest"/>&nbsp;&nbsp;  
                    <telerik:RadComboBox ID="ddl_Paging1" AutoPostBack="true" runat="server" Visible="false" Width="100px" Skin="Forest"/><br /><br /> 
                    <asp:Table ID="tbl_Data" runat="server">  
                        <asp:TableRow> 
                            <asp:TableCell> 
                                <asp:Literal ID="PivotTable" runat="server" Visible="false" /> 
                            </asp:TableCell> 
                        </asp:TableRow> 
                    </asp:Table> 
                </asp:TableCell> 
            </asp:TableRow>    
            <asp:TableRow> 
                <asp:TableCell ColumnSpan="2">  
                    <asp:Button ID="ExportToExcel" runat="server" Text="Export" /> 
                </asp:TableCell> 
            </asp:TableRow> 
        </asp:Table> 
    </form> 
</body> 
</html> 
 
Vlad
Telerik team
 answered on 12 Aug 2009
1 answer
73 views
Is there a way to turn off the custom dictionary options for spellchecking in the radeditor 2009 q1? I do not want people adding to the dictionary because of the large audience using the editor.
Rumen
Telerik team
 answered on 12 Aug 2009
2 answers
210 views

I have a RadWindow that I am unable to display the contents of the URL that is specified in the NavigateUrl property after the page does a postback. When the page first loads, I can open the RadWindow with no problem. But after I click on an asp.net button, which causes a postback, the RadWindow opens but does not load the page.
 
I am using a Master page, and the content page contains a user control, that contains the RadWindowManager and the RadWindow declaration. Someone please help!!!!
 
This is the aspx  code to call the js function to open the window:
<asp:HyperLink ID="lockerSettingsLnk" Text="windowLink" runat="server" 
                    NavigateUrl="javascript:showRadWindow();" /> 
 

The Javascript Function
  function showRadWindow ()  
    { 
        var radWindow = window.radopen(null"myWindow"); 
        radWindow.argument = new Object(); 
        radWindow.argument.refreshParent = false
    } 
 
 
This is the aspx  code for a button:
<asp:Button ID="testButton" runat="server" OnClick="testButton_clicked"/> 

This is the aspx  code for the RadWindowManager and RadWindow declaration:
<telerik:RadWindowManager id="radWindowManager" runat="server" enableembeddedskins="True"
    <Windows> 
        <telerik:RadWindow id="mywindow" Behaviors="Close, Move, Resize, Maximize" ReloadOnShow="true" VisibleStatusbar="true" ShowContentDuringLoad="false" 
                 Left="150px" Modal="true" Runat="server" Width="600px" Height="450px" > 
        </telerik:RadWindow>         
    </Windows> 
</telerik:RadWindowManager>
 
Duy
Top achievements
Rank 1
 answered on 12 Aug 2009
4 answers
112 views
All,

I currently have controls inside of a custom template that need to pass a strict validation process. For instance, there are two datetime pickers within the Template whose values need to be passed to a custom validation function. The problem that I am getting is how to pass those values to say the following customvalidator servervalidate routine. I seem to only be able to reference the items in one of the radgrid commands as shown below:
Protected Sub RadGrid2_UpdateCommand(ByVal source As ObjectByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid2.UpdateCommand  
        If TypeOf e.Item Is GridEditableItem Then 
            Dim editedItem As GridEditFormItem = CType(e.Item, GridEditFormItem)  
            Dim StartTime As RadDateTimePicker = CType(editedItem.FindControl("RadDateTimePickerStart"), RadDateTimePicker)  
 
            Dim EndTime As RadDateTimePicker = CType(editedItem.FindControl("RadDateTimePickerEnd"), RadDateTimePicker)  
            Dim LeaveType As RadComboBox = CType(editedItem.FindControl("drpleavetype"), RadComboBox)  
            Dim LeaveRequest_Fkey As Label = CType(editedItem.FindControl("lblid"), Label)  
                          
 
 
 
 
 
 
        End If 

I need to be able to reference these values in the custom validator event as shown below:
Private Sub HoursPositiveValidator_ServerValidate(ByVal source As ObjectByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles HoursPositiveValidator.ServerValidate  
 

 

'Create variable to hold instance of validation return array.

 

 

Dim ReturnArray = LeaveClass.CustomDateValidation(FirstGridDateTimePicker.selectedvalue, SecondGridDateTimePicker.selectedvalue)

 

    If returnarray(0) = "False" then
        args.isvalid = false
    End If
End Sub 
Is it possible to reference these values outside of one of the radgrid events because a standard validation and custom validation will not fit my needs. Any help will be greatly appreciated.

Thanks,
Jonathan Adkins
Veli
Telerik team
 answered on 12 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?