Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
158 views
I'm trying to add in the css but the head is always in low
Telerik.Web.UI.WebResource.axd how do I fix this?
I need my css is upon Telerik.Web.UI.WebResource.axd but
that is what is in the head.
Vasil
Telerik team
 answered on 03 Dec 2010
2 answers
315 views
Hello,
I have editable grid with buttons in form:

<asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Add" : "Update" %>'
CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'


I use my validation and I show validation result outer the grid. How I can prevent closing edit form or insert form. It is possible to repopen edit form when I saved index of last open editform.
Konrad
Top achievements
Rank 1
 answered on 03 Dec 2010
3 answers
62 views
I've been working with this  control, but as you can see in the screen capture something strange happens with the control as it is showing unexpected images and incorrectly positioned, I've tested with both IE and FF and looks the same.

How this can be solved?
I'm using RadControls for ASP.NET AJAX Q3 2010, This is the corresponding code block:

        <telerik:RadEditor ID="RadEditor" runat="server" Height="485px" Width="718px" OnClientLoad="OnClientLoad">
            <Modules>
                <telerik:EditorModule Name="RadEditorStatistics"></telerik:EditorModule>
                <telerik:EditorModule Name="RadEditorDomInspector"></telerik:EditorModule>
                <telerik:EditorModule Name="RadEditorNodeInspector"></telerik:EditorModule>
                <telerik:EditorModule Name="RadEditorHtmlInspector" Visible="False"></telerik:EditorModule>
            </Modules>
            <Tools>
                <telerik:EditorToolGroup Tag="MainToolbar">
                    <telerik:EditorTool Name="Print" ShortCut="CTRL+P" Visible="False"></telerik:EditorTool>
                    <telerik:EditorTool Name="AjaxSpellCheck" />
                    <telerik:EditorTool Name="FindAndReplace" ShortCut="CTRL+F"></telerik:EditorTool>
                    <telerik:EditorTool Name="SelectAll" ShortCut="CTRL+A" />
                    <telerik:EditorTool Name="Cut"></telerik:EditorTool>
                    <telerik:EditorTool Name="Copy" ShortCut="CTRL+C"></telerik:EditorTool>
                    <telerik:EditorTool Name="Paste" ShortCut="CTRL+V"></telerik:EditorTool>
                    <telerik:EditorToolStrip Name="PasteStrip">
                    </telerik:EditorToolStrip>
                    <telerik:EditorSeparator />
                    <telerik:EditorSplitButton Name="Undo" Width="80px">
                    </telerik:EditorSplitButton>
                    <telerik:EditorSplitButton Name="Redo" Width="80px">
                    </telerik:EditorSplitButton>
                </telerik:EditorToolGroup>
                <telerik:EditorToolGroup>
                    <telerik:EditorTool Name="AbsolutePosition"></telerik:EditorTool>
                    <telerik:EditorSeparator />
                    <telerik:EditorTool Name="Bold" ShortCut="CTRL+B"></telerik:EditorTool>
                    <telerik:EditorTool Name="Italic" ShortCut="CTRL+I"></telerik:EditorTool>
                    <telerik:EditorTool Name="Underline" ShortCut="CTRL+U" />
                    <telerik:EditorTool Name="StrikeThrough" />
                    <telerik:EditorSeparator />
                    <telerik:EditorTool Name="JustifyLeft" />
                    <telerik:EditorTool Name="JustifyCenter" />
                    <telerik:EditorTool Name="JustifyRight" />
                    <telerik:EditorTool Name="JustifyFull" />
                    <telerik:EditorTool Name="JustifyNone" />
                    <telerik:EditorSeparator />
                    <telerik:EditorTool Name="Indent" />
                    <telerik:EditorTool Name="Outdent" />
                    <telerik:EditorSeparator />
                    <telerik:EditorTool Name="InsertOrderedList" />
                    <telerik:EditorTool Name="InsertUnorderedList" />
                    <telerik:EditorSeparator />
                    <telerik:EditorTool Name="ToggleTableBorder" />
                </telerik:EditorToolGroup>
                <telerik:EditorToolGroup Tag="InsertToolbar">
                    <telerik:EditorTool Name="ImageManager" ShortCut="CTRL+G" />
                    <telerik:EditorTool Name="LinkManager" ShortCut="CTRL+K" />
                    <telerik:EditorTool Name="Unlink" ShortCut="CTRL+SHIFT+K" />
                </telerik:EditorToolGroup>
                <telerik:EditorToolGroup>
                    <telerik:EditorTool Name="Superscript" />
                    <telerik:EditorTool Name="Subscript" />
                    <telerik:EditorTool Name="InsertParagraph" />
                    <telerik:EditorTool Name="InsertHorizontalRule" />
                    <telerik:EditorSeparator />
                    <telerik:EditorTool Name="FormatCodeBlock" />
                </telerik:EditorToolGroup>
                <telerik:EditorToolGroup Tag="DropdownToolbar">
                    <telerik:EditorSplitButton Name="InsertSymbol" Width="80px">
                    </telerik:EditorSplitButton>
                    <telerik:EditorToolStrip Name="InsertTable">
                    </telerik:EditorToolStrip>
                    <telerik:EditorTool Name="ImageMapDialog" Visible="False" />
                    <telerik:EditorSeparator />
                    <telerik:EditorTool Name="ConvertToLower" />
                    <telerik:EditorTool Name="ConvertToUpper" />
                    <telerik:EditorSeparator />
                    <telerik:EditorDropDown Name="Zoom" Width="80px">
                    </telerik:EditorDropDown>
                    <telerik:EditorSplitButton Name="ModuleManager" Width="80px">
                    </telerik:EditorSplitButton>
                </telerik:EditorToolGroup>
                <telerik:EditorToolGroup>
                    <telerik:EditorDropDown Name="FormatBlock" Width="80px">
                    </telerik:EditorDropDown>
                    <telerik:EditorDropDown Name="FontName" Width="80px">
                    </telerik:EditorDropDown>
                    <telerik:EditorDropDown Name="RealFontSize" Width="80px">
                    </telerik:EditorDropDown>
                </telerik:EditorToolGroup>
                <telerik:EditorToolGroup>
                    <telerik:EditorSplitButton Name="ForeColor" Width="80px">
                    </telerik:EditorSplitButton>
                    <telerik:EditorSplitButton Name="BackColor" Width="80px">
                    </telerik:EditorSplitButton>
                </telerik:EditorToolGroup>
            </Tools>
        </telerik:RadEditor>

Rumen
Telerik team
 answered on 03 Dec 2010
2 answers
206 views
Hi,

I am using RadChart version 2010.2.929.35 . Here is what I would like to accomplish:
I would like to create a scatter plot with a fixed min and max for the X-axis and Y-axis. In this case i want the min/max to be -3/3. The ChartSeriesType that I am using is Point with the following settings:

PlotArea-XAxis-MaxValue=3
PlotArea-XAxis-MinValue=-3
PlotArea-YAxis-MaxValue=3
PlotArea-YAxis-MinValue=-3
PlotArea-XAxis-AutoScale=false
PlotArea-YAxis-AutoScale=false

When the chart gets rendered on my page, the Y-axis display correctly with the min value at the bottom and the max value at the top. For the X-Axis, there seems to be a padding for the min and max. Please see the attached image for refference.

So the question is:
1) Is there a way to force the X-axis to display the min value at the far left and the max value at the far right with out any padding?
2) Also, how can I get rid of the gap to the right of the chart?

Thanks,
Vuthy

Bill
Top achievements
Rank 1
 answered on 03 Dec 2010
3 answers
159 views
Hi,

I would like to know how to add a custom content filter in the RAD editor for MOSS.
I understodd that I need to add a property in the ConfigFile.xml:

<property  name="OnClientLoad">OnClientLoad</property>

Then I need to add a javascript function OnClientLoad and call another function that implements a few standard methods. OK but where should I put this javascript code. Is the MOSSEditorTools.js file suited for this ?

Could you please give me an example of a custom content filter that works with MOSS and RAD Editor full version.

Kind regards,

Jean
Stanimir
Telerik team
 answered on 03 Dec 2010
2 answers
116 views


     Columns with filter templates don't allow for sorting.  In the example below, when hovering over "Contact Name" and "Contact Title", the mouse-pointer turns into a "finger", and the column can be sorted by clicking.

     That doesn't happen for the City and Country columns.  Is there an easy remedy for this?  I have a similar grid, with several columns that have comboBox filters.  The columns with comboBox filters don't allow for sorting by clicking on the column headers, just like in the Demo example below.
see this example:

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filteringtemplatecolumns/defaultcs.aspx
sean
Top achievements
Rank 1
 answered on 03 Dec 2010
2 answers
206 views


Hi,
I'm using the RadGrid and the "AllowColumnHide" feature.  Is there a way to specify that a column is excluded from the hide-column list that appears when right-clicking on the header?  

The problem is that a user could unselect every column.  This would be a disaster if this was paired with saving grid attributes.

see these Telerik demos for an example:

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/savinggridsettingsonperuserbasis/defaultcs.aspx

http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/headercontextfiltermenu/defaultcs.aspx
sean
Top achievements
Rank 1
 answered on 03 Dec 2010
1 answer
108 views
Hello,

I have a radcombobox with footer and header.
1. How can i paint them let say in a red color?
2. How can i put in it an image?

I noticed that if i use:
<FooterTemplate>
        <div style="background-color:Red">asas</div>
</FooterTemplate>
not all the footer area is painted.

any suggestions?
 
Thank you,
Oren
Kalina
Telerik team
 answered on 03 Dec 2010
1 answer
228 views

Hi

As I was adding more data in the radgrid, it does a postback , however, the items in the radlistbox is duplicated
everytime there is a postbac, attached is the code. To run, click the -> to add data to the right hand side radlistbox,
and add a row to the radgrid, once finished, click the button at the bottom, you can see the items in the radlistbox
is duplicated, sometimes even tripled, please help,this is an urgent issue.

thanks, -regards, Al




using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
  
/// <summary>
/// Summary description for Auto
/// </summary>
public class Auto
{
      
        //
        // TODO: Add constructor logic here
        //
         public int VIN { get; set; }
        public string Model { get; set; }
        public string Make { get; set; }
        public int HiddenMileage { get; set; }
  
      
}




using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
  
using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
using System.Collections.Generic;
  
public partial class Default : System.Web.UI.Page 
{
    public List<Auto> Cars;
    public List<Auto> destCars = new List<Auto>();
  
    protected void Page_Load(object sender, EventArgs e)
    {
  
        if (!IsPostBack)
        {
              
            //Grid
            LoadCars();
  
            //transfer boxes
            this.lbAOBSource.ItemDataBound += new RadListBoxItemEventHandler(lbAOBDestination_ItemDataBound);
            this.lbAOBDestination.Transferring += new RadListBoxTransferringEventHandler(lbAOBSource_Transferring);
            lbAOBDestination.Updating += new RadListBoxUpdatingEventHandler(lbAOBDestination_Updating);
            lbAOBDestination.PreRender += new EventHandler(lbAOBDestination_PreRender);
            lbAOBDestination.Inserting += new RadListBoxInsertingEventHandler(lbAOBDestination_Inserting);
            lbAOBDestination.DataBinding += new EventHandler(lbAOBDestination_DataBinding);
            //lbAOBDestination.
  
            this.lbAOBDestination.RegisterWithScriptManager = false;
  
            this.lbAOBSource.DataValueField = "VIN";
            this.lbAOBSource.DataTextField = "Model";
  
  
            //set the object in session state
            this.Session["Cars"] = Cars;
  
            //set the destination list
        }
        else
        {
            Cars = (List<Auto>)this.Session["Cars"];
        }
        this.lbAOBSource.DataSource = Cars;
        this.lbAOBSource.DataBind();
  
    }
  
    void lbAOBDestination_DataBinding(object sender, EventArgs e)
    {
        //throw new NotImplementedException();
    }
  
    void lbAOBDestination_Inserting(object sender, RadListBoxInsertingEventArgs e)
    {
        //throw new NotImplementedException();
    }
  
    void lbAOBDestination_PreRender(object sender, EventArgs e)
    {
        //throw new NotImplementedException();
    }
  
    void lbAOBDestination_Updating(object sender, RadListBoxUpdatingEventArgs e)
    {
        //throw new NotImplementedException();
    }
  
    void lbAOBSource_Transferring(object sender, RadListBoxTransferringEventArgs e)
    {
        //throw new NotImplementedException();
    }
  
    void lbAOBDestination_ItemDataBound(object sender, RadListBoxItemEventArgs e)
    {
        //throw ne//w NotImplementedException();
    }
  
  
    private void LoadCars()
    {
        Cars = new List<Auto>();
  
        Auto Car = new Auto();
        Car.Make = "Ford";
        Car.Model = "Fiesta";
        Car.HiddenMileage = 100000;
        Car.VIN = 101;
        Cars.Add(Car);
  
        Car = new Auto();
        Car.Make = "Isuzu";
        Car.Model = "Rodeo";
        Car.HiddenMileage = 5000;
        Car.VIN = 102;
        Cars.Add(Car);
  
        Car = new Auto();
        Car.Make = "Honda";
        Car.Model = "Civic";
        Car.HiddenMileage = 200000;
        Car.VIN = 103;
        Cars.Add(Car);
  
        Car = new Auto();
        Car.Make = "chevy";
        Car.Model = "Cobalt";
        Car.HiddenMileage = 100000;
        Car.VIN = 104;
        Cars.Add(Car);
    }
  
    protected void GridCars_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        GridCars.MasterTableView.DataSource = Cars;
        //GridCars.DataSource = Cars;
        //GridCars.DataBind();
    }
  
    protected void GridCars_InsertCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
    {
        Auto newCar = new Auto();
        GridDataItem gdiItem = (GridDataItem)e.Item.DataItem;
        newCar.VIN = int.Parse(((TextBox)e.Item.FindControl("txtVIN")).Text);
        newCar.Make = ((TextBox)e.Item.FindControl("txtMake")).Text;
        newCar.Model = ((TextBox)e.Item.FindControl("txtModel")).Text;
        newCar.HiddenMileage = int.Parse(((TextBox)e.Item.FindControl("txtMileage")).Text);
        if (Cars == null)
        {
            Cars = new List<Auto>();
            LoadCars();
        }
        Cars.Add(newCar);
        this.Session["Cars"] = Cars;
        //e.ExecuteCommand("Cancel");
    }
  
    protected void GridCars_PreRender(object sender, EventArgs e)
    {
  
        GridCars.MasterTableView.Rebind();
        //GridCars.Rebind();
    }
  
    protected void GridCars_ItemCommand(object source, GridCommandEventArgs e)
    {
  
    }
  
    protected void GridCars_ItemInserted(object source, GridInsertedEventArgs e)
    {
  
    }
  
    protected void GridCars_DeleteCommand(object source, GridCommandEventArgs e)
    {
  
    }
  
    protected void GridCars_EditCommand(object source, GridCommandEventArgs e)
    {
  
    }
  
    protected void GridCars_UpdateCommand(object source, GridCommandEventArgs e)
    {
  
    }
  
  
    protected void Button1_Click(object sender, EventArgs e)
    {
        Label1.Text = "There are " + lbAOBDestination.Items.Count + " items in the destination";
    }
}






<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="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>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
      
       <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
      
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
      <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="GridCars">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="GridCars" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
      
      
      <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
        
        <telerik:RadGrid ID="GridCars" runat="server" AutoGenerateEditColumn="True" AutoGenerateDeleteColumn="True"
        AllowAutomaticInserts="False" AllowAutomaticDeletes="False" AllowAutomaticUpdates="False"
        Skin="Office2007" OnNeedDataSource="GridCars_NeedDataSource" OnPreRender="GridCars_PreRender"
        OnInsertCommand="GridCars_InsertCommand" OnItemCommand="GridCars_ItemCommand"
        OnItemInserted="GridCars_ItemInserted" OnDeleteCommand="GridCars_DeleteCommand"
        OnEditCommand="GridCars_EditCommand" OnUpdateCommand="GridCars_UpdateCommand">
        <MasterTableView CommandItemDisplay="Top" EditMode="PopUp" AutoGenerateColumns="True"
            DataKeyNames="VIN">
            <EditFormSettings InsertCaption="Add Auto" CaptionFormatString="Edit VIN: {0}" CaptionDataField="VIN"
                EditFormType="Template" PopUpSettings-Modal="true">
                <FormTemplate>
                    <table id="Table1" cellspacing="1" cellpadding="1" width="250" border="0">
                        <tr>
                            <td>
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                VIN:
                            </td>
                            <td>
                                <asp:TextBox ID="txtVin" Text='<%# Bind( "VIN") %>' runat="server">
                                </asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Make:
                            </td>
                            <td>
                                <asp:TextBox ID="txtMake" Text='<%# Bind( "Make") %>' runat="server">
                                </asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Model:
                            </td>
                            <td>
                                <asp:TextBox ID="txtModel" Text='<%# Bind( "Model") %>' runat="server">
                                </asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Mileage:
                            </td>
                            <td>
                                <asp:TextBox ID="txtMileage" Text='<%# Bind( "HiddenMileage") %>' runat="server">
                                </asp:TextBox>
                            </td>
                        </tr>
                    </table>
                    <table style="width: 100%">
                        <tr>
                            <td align="right" colspan="2">
                                <asp:Button ID="Button1" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                    runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                </asp:Button> 
                                <asp:Button ID="Button2" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel">
                                </asp:Button>
                            </td>
                        </tr>
                    </table>
                </FormTemplate>
                <PopUpSettings Modal="True"></PopUpSettings>
            </EditFormSettings>
        </MasterTableView>
    </telerik:RadGrid>
      
      
    <telerik:RadListBox ID="lbAOBSource" runat="server" TransferToID="lbAOBDestination"
        AllowTransfer="True" Height="150" Width="360" Skin="Office2007" AllowTransferOnDoubleClick="true"
        AllowTransferDuplicates="false" SelectionMode="Multiple">
        <ButtonSettings TransferButtons="Common" />
    </telerik:RadListBox>
    <telerik:RadListBox ID="lbAOBDestination" runat="server" Height="150" Width="300"
        AllowTransferDuplicates="false" Skin="Office2007" AllowTransferOnDoubleClick="true"
        SelectionMode="Multiple" />
    <br />
    <asp:Button ID="Button1" runat="server" Text="Click Me" 
        onclick="Button1_Click" />
    <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
    <div>
  
    </div>
    </form>
</body>
</html>
Dimitar Terziev
Telerik team
 answered on 03 Dec 2010
2 answers
98 views
Hey guys

I have a dual listbox for adding items, selecting roles and employees.  When I free an employee, they go into the "available pool".  When I choose from the available pool, it moves to the "assigned" on the right.  Pretty simple.  I have a save button that makes the necessary adjustments to my associative tables. 

What would be neat is to be able to use an icon on items that are "new" or "dirty".  I was thinking I could do this maybe through client script?

Also, is there any way I could iterate through the items collection, and know what is dirty and what is  not?  IE what was placed in a container from an action.  I was maybe thinking of an attribute.  An example would be greatly appreciated.
Dimitar Terziev
Telerik team
 answered on 03 Dec 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?