Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
82 views
My problem is related to this Code Library solution for Row Selection Persistence on Paging & Filtering.

The header checkbox does not work if Grouping is enabled in the RadGrid and/or there is another RadGrid nested within in the outer RadGrid.

I've added the Group Expressions and NestedViewTemplate in the code sample to reproduce the problem. Could anyone please mention the reason why the header selection does not work in this code sample with Grouping and NestedViewTemplate ?
<telerik:RadGrid ID="RadGrid1" runat="server" Skin="Outlook" AllowSorting="true" AllowPaging="true"
           AllowFilteringByColumn="true" AutoGenerateColumns="false" ShowGroupPanel="true" PageSize="6" >
           <MasterTableView DataKeyNames="ID">
                <GroupByExpressions>
                      <telerik:GridGroupByExpression>
                          <SelectFields>
                                 <telerik:GridGroupByField FieldAlias="Public" HeaderText="Grouped by Public & Private Questions"  FieldName="ID" />
                           </SelectFields>
                           <GroupByFields>
                                 <telerik:GridGroupByField FieldName="ID" FieldAlias="Public"    />
                           </GroupByFields>
                        </telerik:GridGroupByExpression>
                 </GroupByExpressions>
                  
                 <NestedViewTemplate>
                    
                       <telerik:RadGrid ID="RadGrid2" runat="server" Skin="Outlook" AllowSorting="true" AllowPaging="true"
                                AllowFilteringByColumn="true" AutoGenerateColumns="false" ShowGroupPanel="true" PageSize="6" >
                           <MasterTableView DataKeyNames="ID">
                            
                               <Columns>
                                    <telerik:GridBoundColumn DataField="ID" UniqueName="ID" HeaderText="ID">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Item" AllowSorting="false" UniqueName="Item"
                                       HeaderText="Item">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Date" UniqueName="Date" HeaderText="Date">
                                    </telerik:GridBoundColumn>
                               </Columns>
                            </MasterTableView>
                         </telerik:RadGrid>  
                    
                 </NestedViewTemplate>
                  
                  
               <Columns>
                   <telerik:GridTemplateColumn AllowFiltering="false" UniqueName="template">
                       <ItemTemplate>
                           <asp:CheckBox ID="CheckBox1" runat="server" />
                       </ItemTemplate>
                       <HeaderTemplate>
                           <asp:CheckBox ID="CheckBoxHeader" runat="server" />
                       </HeaderTemplate>
                   </telerik:GridTemplateColumn>
                   <telerik:GridBoundColumn DataField="ID" UniqueName="ID" HeaderText="ID">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="Item" AllowSorting="false" UniqueName="Item"
                       HeaderText="Item">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="Date" UniqueName="Date" HeaderText="Date">
                   </telerik:GridBoundColumn>
               </Columns>
           </MasterTableView>
           <ClientSettings>
               <ClientEvents OnRowClick="onRowClick" />
           </ClientSettings>
       </telerik:RadGrid>
       <asp:HiddenField ID="HiddenField" runat="server" />


Pavlina
Telerik team
 answered on 25 Feb 2011
1 answer
91 views
Hi,

I'm currently using the trial version of the controls.

Does the trial version expire and, if so, can the trial be extended?

Thanks.

Matt.
Sebastian
Telerik team
 answered on 25 Feb 2011
5 answers
281 views
Hello,

I'm have a similar setup to this demo: http://demos.telerik.com/aspnet-ajax/tooltip/examples/default/defaultcs.aspx.
Where I have a repeater, radtooltipmanager that loads a Web User Control that contains a RadUpload and a submit button.
The key difference between the demo and my is that I have a RadUpload control on the Web User Control.
I can't get the RadUpload to work. I understand that I have to disable AJAX somehow,
but can't seem to get to work properly.

Please advise.

Thanks,
Quan

 
Dimitar Terziev
Telerik team
 answered on 25 Feb 2011
3 answers
157 views
Hi Team,
            I want to reorder the grid rows  in client side only , Without server side scripting can i do that.
if i drag and drop any number of rows than it should be reorder properly by client side code.

i achieved it by server side code but i want it should be work for client side.

Please reply me as soon as possible......


Thanks
Azam
Pavlina
Telerik team
 answered on 25 Feb 2011
2 answers
107 views
Hello - if I only have 2 or 3 items in my rotator and I use my mouse scroll wheel over the rotator, those few items scroll up and out of view leaving and empty space.

Is there any way to disable the scroll wheel?
Niko
Telerik team
 answered on 25 Feb 2011
1 answer
435 views
I have a RadGrid which uses the folowing settings

<ClientSettings EnablePostBackOnRowClick="True">
    <Selecting EnableDragToSelectRows="False" AllowRowSelect="True" />
</ClientSettings>

The highlighting of the selected  dataItem or row provides the user with a visual cue to the dataItem he wishes to use without requiring screen real estate to be occupied by a dedicated Select button column. I use the ItemCommand and PreRender events of the grid to do the highlighting. The grid also contains an Edit button column and a Delete button column and this method of row selection works when either of the buttons is clicked e.g. if row 4 is currently selected and I click on the Edit button of row 2, then row2 is rendered in edit mode and is also selected.

My problem lies with the Delete button processing. I am trying to use the technique mentioned in Delete row in grid and prompt alert message to show a javascript Confirm dialog box before proceeding with the Delete operation however the ResponseScripts.Add

statement in the grid's ItemCommand function are not working for me - there are no errors but no Confirm dialog either.

.aspx

 

 

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FDCSTest.aspx.cs" Inherits="FDCSDev.FDCSTest" %>
  
  
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
  
  
  
<head id="Head1" runat="server">
  
  
  
<title></title>
  
  
  
<link href="StyleSheet.css" type="text/css" />
  
</head>
  
<body class="body">
  
  
  
<form id="form1" runat="server">
  
  
  
<!-- Page Content Area -->
  
  
  
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
  
  
  
<AjaxSettings>
  
  
  
<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
  
  
  
<UpdatedControls>
  
  
  
<telerik:AjaxUpdatedControl ControlID="gridFlightSchedule" />
  
  
  
</UpdatedControls>
  
  
  
</telerik:AjaxSetting>
  
  
  
<telerik:AjaxSetting AjaxControlID="gridFlightSchedule">
  
  
  
<UpdatedControls>
  
  
  
<telerik:AjaxUpdatedControl ControlID="gridFlightSchedule" />
  
  
  
</UpdatedControls>
  
  
  
</telerik:AjaxSetting>
  
  
  
</AjaxSettings>
  
  
  
</telerik:RadAjaxManager>
  
  
  
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
  
  
  
</telerik:RadScriptManager>
  
  
  
<div style="width: 800px; height: 800px; margin-left: auto; margin-right: auto;">
  
  
  
<asp:Label ID="lblInfo" runat="server" Text="Label"></asp:Label>
  
  
  
<div style="width: 100%; height: 400px;">
  
  
  
<!-- Flight Schedule Grid Area -->
  
  
  
<telerik:RadGrid ID="gridFlightSchedule" runat="server"
  
  
  
AutoGenerateColumns="False" 
  
DataSourceID="FlightScheduleDataSource" GridLines="None" 
  
Height="380px"
  
  
  
AllowSorting="True" 
  
ShowStatusBar="True"
  
  
  
onitemcreated="gridFlightSchedule_ItemCreated"
  
  
  
onitemcommand="gridFlightSchedule_ItemCommand" 
  
onprerender="gridFlightSchedule_PreRender"
  
  
  
>
  
  
  
<ClientSettings EnablePostBackOnRowClick="True">
  
  
  
<Selecting EnableDragToSelectRows="False" AllowRowSelect="true" />
  
  
  
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
  
  
  
<ClientEvents />
  
  
  
</ClientSettings>
  
  
  
<MasterTableView Name="FlightScheduleTableView" DataKeyNames="fltID,carID" DataSourceID="FlightScheduleDataSource"
  
  
  
NoMasterRecordsText="No flights defined." CommandItemDisplay="Top" CommandItemSettings-AddNewRecordText="Add a new Flight"
  
  
  
GridLines="Horizontal" EditMode="InPlace" >
  
  
  
<CommandItemSettings AddNewRecordText="Add a new Flight" ExportToPdfText="Export to Pdf"></CommandItemSettings>
  
  
  
<Columns>
  
  
  
<telerik:GridBoundColumn DataField="fltID" DataType="System.Int32" 
  
HeaderText="fltID" ReadOnly="True" SortExpression="fltID" UniqueName="fltID" Display="false">
  
  
  
<HeaderStyle />
  
  
  
</telerik:GridBoundColumn>
  
  
  
<telerik:GridBoundColumn DataField="carID" DataType="System.Int32" 
  
HeaderText="carID" ReadOnly="True" SortExpression="carID" UniqueName="carID" Display="false">
  
  
  
<HeaderStyle />
  
  
  
</telerik:GridBoundColumn>
  
  
  
<telerik:GridDropDownColumn 
  
HeaderText="Carrier" SortExpression="carDesc" UniqueName="carDesc" ListTextField="carDesc"
  
  
  
ListValueField="carID" DataField="carID" DataSourceID="CarriersDataSource"
  
  
  
DropDownControlType="DropDownList" AllowVirtualScrolling="true" ShowMoreResultsBox="true"
  
  
  
ItemsPerRequest="10" >
  
  
  
<HeaderStyle Width="12em" />
  
  
  
</telerik:GridDropDownColumn>
  
  
  
<telerik:GridBoundColumn DataField="FltNo" HeaderText="Flight No" 
  
SortExpression="FltNo" UniqueName="FltNo" >
  
  
  
<HeaderStyle Width="6em" />
  
  
  
</telerik:GridBoundColumn>
  
  
  
  
<telerik:GridDropDownColumn 
  
HeaderText="Aircraft" SortExpression="atyDescription" UniqueName="atyDescription" ListTextField="atyDescription"
  
  
  
ListValueField="atyID" DataField="atyID" DataSourceID="AircraftDataSource"
  
  
  
DropDownControlType="DropDownList" >
  
  
  
<HeaderStyle Width="12em" />
  
  
  
</telerik:GridDropDownColumn>
  
  
  
<telerik:GridEditCommandColumn>
  
  
  
<HeaderStyle Width="8em" />
  
  
  
</telerik:GridEditCommandColumn>
  
  
  
<telerik:GridTemplateColumn>
  
  
  
<ItemTemplate> </ItemTemplate>
  
  
  
</telerik:GridTemplateColumn>
  
  
  
<telerik:GridButtonColumn UniqueName="DeleteCol" Text="Delete" CommandName="Delete"></telerik:GridButtonColumn
  
</Columns>
  
  
  
</MasterTableView>
  
  
  
</telerik:RadGrid>
  
  
  
</div>
  
  
  
<asp:SqlDataSource ID="FlightScheduleDataSource" runat="server" 
  
ConnectionString="<%$ ConnectionStrings:FDCSWebFltConnectionString %>"
  
  
  
SelectCommand="SELECT fltID, licID, carID, FltNo, StartDate, EndDate, Mon, Tue, Wed, Thu, Fri, Sat, Sun, atyID FROM fdcs_FltSched WHERE (licID = @licID) ORDER BY FltNo">
  
  
  
<SelectParameters>
  
  
  
<asp:SessionParameter Name="licID" SessionField="licID" />
  
  
  
</SelectParameters>
  
  
  
</asp:SqlDataSource>
  
  
  
<asp:SqlDataSource ID="CarriersDataSource" runat="server" 
  
ConnectionString="<%$ ConnectionStrings:FDCSWebFltConnectionString %>" 
  
SelectCommand="SELECT carID, carDesc FROM fdcs_Carriers WHERE (carID IN (SELECT carID FROM fdcs_LicIdCarNumCode WHERE (licID = @licID)))">
  
  
  
<SelectParameters>
  
  
  
<asp:SessionParameter DefaultValue="" Name="licID" SessionField="licID" />
  
  
  
</SelectParameters>
  
  
  
</asp:SqlDataSource>
  
  
  
<asp:SqlDataSource ID="AircraftDataSource" runat="server" 
  
ConnectionString="<%$ ConnectionStrings:FDCSWebFltConnectionString %>" 
  
SelectCommand="SELECT [atyID], [atyCode], [atyDescription] FROM fdcs_Aircraft WHERE (carID IN (SELECT carID FROM fdcs_LicIdCarNumCode WHERE (licID = @licID)))">
  
  
  
<SelectParameters>
  
  
  
<asp:SessionParameter Name="licID" SessionField="licID" />
  
  
  
</SelectParameters>
  
  
  
</asp:SqlDataSource>
  
  
  
</div>
  
  
  
</form>
  
</body>
  
</html>

.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Data;
using System.Data.SqlClient;
using System.Collections;
  
namespace FDCSDev
{
    public partial class FDCSTest : System.Web.UI.Page
    {
  
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["UserLogInName"] == null)
                {
                    Session["UserLogInName"] = "len";
                    Session["UserID"] = "cc3b700d-b6a7-42ac-b1f0-c2de6e3d0fd9";
                    Session["HomeStation"] = "ABB";
                    Session["HandlerCode"] = "ABC";
                    Session["licID"] = 1;
                }
            }
            lblInfo.Text = " ";
        }
  
        protected void gridFlightSchedule_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item.OwnerTableView.Name == "FlightScheduleTableView" && e.Item is GridEditableItem && e.Item.IsInEditMode)
            {
                GridEditableItem editItem = e.Item as GridEditableItem;
  
                DropDownList ddList = editItem["carDesc"].Controls[0] as DropDownList;
                if (!e.Item.OwnerTableView.IsItemInserted)
                {
                    //item is about to be edited
                    // don't allow the Carrier or Flight No to be changed once the flight has been created
                    ddList.Enabled = false;
  
                    TextBox tb = editItem["FltNo"].Controls[0] as TextBox;
                    tb.Width = 50;
                    tb.Enabled = false;
                }
                else
                {
                    //item is about to be inserted
                    ddList.AutoPostBack = true;
                    ddList.SelectedIndexChanged += new System.EventHandler(this.Carrier_SelectedIndexChanged);
                }
            }
        }
  
        private void Carrier_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            DropDownList ddl = sender as DropDownList;
            string strCarID = ddl.SelectedValue;
        }
  
        protected void gridFlightSchedule_PreRender(object sender, EventArgs e)
        {
            if (Session["SelectedFlightIndex"] != null)
            {
                Int32 selectedIndex = Convert.ToInt32(Session["SelectedFlightIndex"]);
                gridFlightSchedule.MasterTableView.Items[selectedIndex].Selected = true;
            }
  
        }
  
        protected void gridFlightSchedule_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if ((e.CommandName == RadGrid.EditCommandName) || (e.CommandName == RadGrid.DeleteCommandName) || (e.CommandName == "RowClick"))
            {
                GridDataItem dataItem = e.Item as GridDataItem;
                //dataItem.Selected = true;
                Session["SelectedFlightIndex"] = dataItem.ItemIndexHierarchical;
  
                if (e.CommandName == "Delete")
                {
                    e.Canceled = true;
                    string script = String.Format("if (confirm('Do you wish to Delete the flight ?')) clientDeleteFlight({0});", dataItem.ItemIndexHierarchical);
                    RadAjaxManager1.ResponseScripts.Add(script);
                    //ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('Help!!');", true);   
                }
  
            }
        }
  
    }
}

 

Veli
Telerik team
 answered on 25 Feb 2011
3 answers
84 views
Hi,

If I have a RadTreeList populated with some data, how can I determine client-side if the selected item has a child or not?

function ItemSelected(sender, args) {
               var treelist = $find("radTreeList");
               var selectedIndexes = treelist.get_selectedIndexes();
                 
               var row = selectedIndexes[0];
               var item = treelist.getItem(row);
Veli
Telerik team
 answered on 25 Feb 2011
1 answer
496 views
Hi,

Can u pls help how to display (Date & Time in 24hrs) in
Radtextbox using MaskedEditExtender... below are the code i already tried..pls correct it..or give me other solution.
<asp:MaskedEditExtender ID="MaskedEditExtender1" runat="server" AcceptAMPM ="False"
 Mask ="99/99/9999 99:99" MaskType="DateTime"   TargetControlID="Rad_entry_date"> </asp:MaskedEditExtender>
                   <asp:MaskedEditValidator ID="MaskedEditValidator1" runat="server" ControlExtender="MaskedEditExtender1"
ControlToValidate="Rad_entry_date" Display="Dynamic" EmptyValueMessage="Input Date and Time"
ErrorMessage="Invalid Time" InvalidValueMessage="Invalid Date and Time"
SetFocusOnError="True" ></asp:MaskedEditValidator>

Thanks..
Vinkel
Top achievements
Rank 1
 answered on 25 Feb 2011
1 answer
50 views
Can I sort by the UniqueName?
Veli
Telerik team
 answered on 25 Feb 2011
3 answers
144 views
I have implemented some custom external Editor Dialogs in my apps which are based on your built-in dialogs. I am wondering what the recommendation is for making sure you haven't made any fixes to the built-in dialogs that need to be addressed in my custom ones. When I look at the changes made in various releases, I don't typically see anything speicifically about the editor dialogs, but surely you must make some changes and bug fixes to these.

Also, it looks like the FileManagerDialogParameters.EnableImageEditor property has been deparacted. Is there no way to enable/disable the image editor in the Image Manager dialog w/o modifying the dialog?

Lastly, it would be nice to be able to hide the file insertion functionality (Insert Button and Properties tab) of the Image Manager in codebehind instead of, again, altering the dialog. I am using the dialog to manage some images (ie not insert them into an editor), so the Insert button and Properties tab should not be show. I can, of course, alter the dialog, but this leads to the fragility issue mentioned above.
Rumen
Telerik team
 answered on 25 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?