Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
80 views
I know it makes senses for appointments that start on one day and finish the next to span accross multiple cells in MonthView but is it possible to turn that feature off?
Eric
Top achievements
Rank 1
 asked on 27 Oct 2009
1 answer
158 views
Hi,

i have a big Problem. I get a Javascript Error when i try to use the editor.pasteHtml Function.

Here is my Code:

ConfigFile.xml
<configuration> 
    <property name="ToolbarMode">ShowOnFocus</property> 
    <property name="ToolsWidth">680px</property>    
    <property name="AllowScripts">true</property> 
</configuration> 

ToolsFile.xml
    <tool name="Inhaltsverzeichnis" /> 

MOSSEditorTools.js
Telerik.Web.UI.Editor.CommandList["Inhaltsverzeichnis"] = function(commandName, editor, args)  
{  
  alert('test');  
  editor.PasteHtml('Hallo!!!');   
};  

It is very curious! When i only call alert('test'); without editor.PasteHtml('asdasd'); finally, everything works fine and i get an alert without any errors. But when i try to use the editor.PasteHtml('hello'); function, i always get an Javascript error and nothing happens.

Can someone help please.

regards
yavuz
Stanimir
Telerik team
 answered on 27 Oct 2009
4 answers
447 views
I have a RadGrid with two columns and I am using FormTemplate for editing (<EditFormSettings EditFormType="Template">) I have a CheckBox called chkIsAgentInformationAvailable. I want to add a following Javascript function to this checkbox. How do I do that
here is the function 

function chkIsAgentInformationAvailable_Clicked()
{
     var clicked = $('#<%=chkIsPurchasedThroughLender.ClientID%>:checked').val();
     if (clicked == 'on')
     {
          $('#<%=trAgentDetails.ClientID %>').show(); 
     } 
     else
     {
          $('#<%=trAgentDetails.ClientID %>').hide(); 
     }
}

Would really appreciate if you could tell me how to do that.

Thanks in Advance
Lakshman
Sebastian
Telerik team
 answered on 27 Oct 2009
3 answers
138 views
How come I cannot set different AutoCompleteModes in the asp version of the radcombobox?

The feature exists in radcombobox for winforms, apparently. But the available autocompletion in webpages does not deliver what I need.

Will this be added in the future?
Simon
Telerik team
 answered on 27 Oct 2009
1 answer
150 views
Hi.

I've downloaded radeditor 5.5.1 trial, and successfully added to our local WSS 3.0 installation.
We can get it working, and can customize its toolbar modifying file ListToolsFile.xml.

Next step was to try to localize tooltips for the toolbar and messages: I've followed the suggestions I've found in some previous messages in this forum, and I've downloaded the file 088436_086570_it-IT_App_GlobalResources.zip; then I extracted its content in App_Globalresources folder, so I get RadEditor.Main.it-IT.resx, RadEditor.Dialogs.it-IT.resx, RadEditor.Tools.it-IT.resx and RadEditor.Modules.it-IT.resx side by side with other resources files from trial installation.
Next step was to edit ListConfigFile.xml, adding the line
  <property name="Language">it-IT</property>

Anyway, strings are still in English. But if I try to alter other settings from ListConfigFile.xml, I can see the correct result in my browser (eg, I can remove Html from "EditModes" property and actually I don't see the html editor panel any longer.

So what am I doing wrong?

TIA

rioka
Top achievements
Rank 1
 answered on 27 Oct 2009
1 answer
108 views
Is it possible to disable keyboard support in the RadMenu?

I'm using a RadContextMenu and a RadInput control to build a "wordwheel" type auto-complete text box.  As the user types, I populate the items in a RadContextMenu with the results of a web service call.  I'd like to implement keyboard support, but the keyboard events for the RadMenu are interfering.  I'd like to disable the native support for the arrow keys, tab, and enter on the menu, but I can't find a way to do this.

Also, is there a CSS style for the currently "selected" menu item? I am calling item.set_selected(true), but there doesn't seem to be any visible indication of which item is selected in the menu.

Thanks!
Yana
Telerik team
 answered on 27 Oct 2009
2 answers
141 views
Hi,

I am just looking at how to replace the PublishingWebControls:RichHtmlField in a MOSS WCM site with the RadEditor lite. 

According to the docs, you have to replace all incidencies of the tag using sharepoint designer??  This would mean that the RadEditor could not be used on an existing site :(   It also means it could not be removed from a site at a later date!

Is there no way to implement the replacement with control adapters and .browser files??

Thanks,

Craig
Stanimir
Telerik team
 answered on 27 Oct 2009
8 answers
175 views
Hi ,
             I am using the rad color picker in the grid. As the grid is bound the picker behaves properly. The user should not be able to change the color in any row so i have made the color picker enabled as false. Now what is happening is when the color picker is diabled and the user clicks on it, the menus disappear and the page jumps like a post back. it works fine if i dont diable the picker at the time of binding. Ideally i would like to disable it  and enable it when the user clicks on row edit button. Please could you provide me a solution to this issue.

Thank you

Regards,
Ajit
ajit
Top achievements
Rank 1
 answered on 27 Oct 2009
2 answers
153 views
Hi,

I have CommandItemTemplate button in Radgrid as follows.

 <CommandItemTemplate>
                <asp:Button runat="server" ID="btnSave" Text="Save" CommandName="Save"  />
</CommandItemTemplate>

And i have a Radgrid.css with the following code:
.GridCommandRow_TelerikDataGridB
{
    FONT-SIZE: 12px;
    COLOR: #fff;
    FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
    BACKGROUND-COLOR: #3aa6b0;
    FLOAT: right;   
    PADDING-RIGHT: 11px;
    PADDING-BOTTOM: 0px; 
}

For some reason my stylesheet setting are not applied to 'Save' button, it is just showing as as regular button style.

I am using 2009 Q2 controls.

Any suggestions ?

Thanks
Veshala
Top achievements
Rank 1
 answered on 27 Oct 2009
9 answers
354 views
Hi

I have created a checkbox filtering item using the method suggested in your link http://www.telerik.com/help/aspnet-ajax/grdfilteringforchecboxcolumn.html

As suggested I have followed the steps outlined below. However SelectedIndexChanged event never fires ?????
Here are the steps with associated code:
 
Please come back to me with sugguestions or anything I've missed

Regards
Raj  Patel

  1. Handle the ItemCreated event of the grid to modify the Controls collection of the corresponding header cell.

Here is the code

 protected void StockGrid_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {

        try
        {
                if (e.Item is GridFilteringItem)
                {
                    GridFilteringItem filteringItem = e.Item as GridFilteringItem;

                    (filteringItem[VwStockListMetadata.ColumnNames.StCode].Controls[0] as TextBox).Width = Unit.Percentage(100.0);
                    (filteringItem[VwStockListMetadata.ColumnNames.StDesc].Controls[0] as TextBox).Width = Unit.Percentage(100.0);
                    (filteringItem[VwStockListMetadata.ColumnNames.Location].Controls[0] as TextBox).Width = Unit.Percentage(100.0);
                    (filteringItem[VwStockListMetadata.ColumnNames.StBin].Controls[0] as TextBox).Width = Unit.Percentage(100.0);
                    (filteringItem[VwStockListMetadata.ColumnNames.StQuantity].Controls[0] as TextBox).Width = Unit.Percentage(100.0);
                    //(filteringItem[VwStockListMetadata.ColumnNames.StAutoReorder].Controls[0] as DropDownList).Width = Unit.Percentage(100.0);
                    (filteringItem[VwStockListMetadata.ColumnNames.StArchive].Controls[0] as TextBox).Width = Unit.Percentage(100.0);

                    //if (filteringItem["StAutoReorder"].Controls.Count == 0)
                    //{

                        filteringItem["StAutoReorder"].Controls.Clear();
                        DropDownList ddList = new DropDownList();
                        //ddList.ID = "yourID";
                        ddList.AutoPostBack = true;
                        ddList.SelectedIndexChanged += new System.EventHandler(ddList_SelectedIndexChanged);
                        ddList.Items.Add(new ListItem("Clear", "Empty"));
                        ddList.Items.Add(new ListItem("Checked", "True"));
                        ddList.Items.Add(new ListItem("Unchecked", "False"));
                        if (Session["ddlSelValue"] != null)
                        {
                            ddList.Items.FindByValue((string)Session["ddlSelValue"]).Selected = true;
                        }
                        filteringItem["StAutoReorder"].Controls.Add(ddList);
                        //ddSet = true;
                    //}
                }
        }
        catch (Exception ex)
        {
            IsError(ex);
        }
    }

 

  1. Handle the SelectedIndexChanged event of the drop-down list (which appears in the place of the textbox) to modify the grid FilterExpression so that it reflects the SelectedValue of the drop-down list you added.

protected void ddList_SelectedIndexChanged(object sender, System.EventArgs e)
{
 DropDownList ddList = (DropDownList)sender;
 Session["ddlSelValue"] = "True";

 ViewState[VwStockListMetadata.ColumnNames.StAutoReorder] = ddList.SelectedValue;
 StockGrid.MasterTableView.Rebind();
 switch (ddList.SelectedValue)
 {
     case "Empty":
         StockGrid.MasterTableView.FilterExpression = "([StAutoReorder] = 'N') ";
         foreach (GridColumn column in StockGrid.MasterTableView.Columns)
         {
             column.CurrentFilterFunction = GridKnownFunction.NoFilter;
             column.CurrentFilterValue = String.Empty;
         }
         StockGrid.MasterTableView.Rebind();
         break;
     case "True":
         StockGrid.MasterTableView.FilterExpression = "([StAutoReorder] = 'Y') ";
         foreach (GridColumn column in StockGrid.MasterTableView.Columns)
         {
             column.CurrentFilterFunction = GridKnownFunction.NoFilter;
             column.CurrentFilterValue = String.Empty;
         }
         StockGrid.MasterTableView.Rebind();
         break;
     case "False":
         StockGrid.MasterTableView.FilterExpression = String.Empty;
         foreach (GridColumn column in StockGrid.MasterTableView.Columns)
         {
             column.CurrentFilterFunction = GridKnownFunction.NoFilter;
             column.CurrentFilterValue = String.Empty;
         }
         StockGrid.MasterTableView.Rebind();
         break;
 }
}

 

In the NeedDataSource event handler, add the check box column's filter expression to the FilterExpression property of the table so that it is honored when the user triggers a filter action from another column. 
    protected void StockGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
        PopulateGrid();
    }

    private void PopulateGrid()
    {
        try
        {
            //decimal stId = Convert.ToDecimal(ViewState[VwStockListMetadata.ColumnNames.StId]);
            string stockCode = null;
            string stockDesc = null;
            //decimal stLocId = Convert.ToDecimal(ViewState[VwStockListMetadata.ColumnNames.StLocId]);
            string location = null;
            string stBin = null;
            string stQuantity = null;
            bool bAutoReorder=false;
            string stArchive = null;

            if (StockGrid.MasterTableView.Items.Count != 0)
            {
                //--------------------------------
                //Get the filters entered to apply
                //--------------------------------
                GridFilteringItem item = StockGrid.MasterTableView.GetItems(GridItemType.FilteringItem)[0] as GridFilteringItem;
                stockCode = (item[VwStockListMetadata.ColumnNames.StCode].Controls[0] as TextBox).Text;
                stockDesc = (item[VwStockListMetadata.ColumnNames.StDesc].Controls[0] as TextBox).Text;
                location = (item[VwStockListMetadata.ColumnNames.Location].Controls[0] as TextBox).Text;
                stBin = (item[VwStockListMetadata.ColumnNames.StBin].Controls[0] as TextBox).Text;
                stQuantity = (item[VwStockListMetadata.ColumnNames.StQuantity].Controls[0] as TextBox).Text;

                if (Session["ddlSelValue"] != null)
                    if ((item[VwStockListMetadata.ColumnNames.StAutoReorder].Controls[0] as DropDownList).SelectedValue=="True")
                        bAutoReorder = true;
                    else
                        bAutoReorder = false;

                stArchive = (item[VwStockListMetadata.ColumnNames.StArchive].Controls[0] as TextBox).Text;
            }
            VwStockListCollection col = null;

            if (Cache["CollectionObject"] == null)
            {
                col = new VwStockListCollection();

                //List<string> LocationList = new List<string>();
                //    Hashtable htLocations = GetUserLocations();
                //    foreach (string key in htLocations.Keys)
                //    {
                //        LocationList.Add(key);
                //    }

                //    col.Query.Where(col.Query.Location.In(LocationList.ToArray()));
                col.Query.OrderBy(col.Query.StCode.Ascending);
                if (!col.Query.Load())
                {
                    string SqlText = col.Query.es.LastQuery;
                    StockGrid.DataSource = new Object[0];
                    return;
                }

                string SqlText2 = col.Query.es.LastQuery;
                Cache.Insert("CollectionObject", col, null, DateTime.MaxValue, TimeSpan.FromHours(2));
            }
            else
            {
                col = Cache["CollectionObject"] as VwStockListCollection;
            }

            //---------------------------------------------
            // Now apply the filters the user has selected
            //---------------------------------------------
            if (!string.IsNullOrEmpty(stockCode))
            {
                ViewState[VwStockListMetadata.ColumnNames.StCode] = stockCode;
                col.Filter = Helper.AndFilter(col.Filter, VwStockListMetadata.ColumnNames.StCode + " LIKE '%" + stockCode + "%'");
            }

            if (!string.IsNullOrEmpty(stockDesc))
            {
                ViewState[VwStockListMetadata.ColumnNames.StDesc] = stockDesc;
                col.Filter = Helper.AndFilter(col.Filter, VwStockListMetadata.ColumnNames.StDesc + " LIKE '%" + stockDesc + "%'");
            }

            if (!string.IsNullOrEmpty(location))
            {
                ViewState[VwStockListMetadata.ColumnNames.Location] = location;
                col.Filter = Helper.AndFilter(col.Filter, VwStockListMetadata.ColumnNames.Location + " LIKE '%" + location + "%'");
            }

            if (!string.IsNullOrEmpty(stBin))
            {
                ViewState[VwStockListMetadata.ColumnNames.StBin] = stBin;
                col.Filter = Helper.AndFilter(col.Filter, VwStockListMetadata.ColumnNames.StBin + " LIKE '%" + stBin + "%'");
            }

            if (!string.IsNullOrEmpty(stQuantity))
            {
                ViewState[VwStockListMetadata.ColumnNames.StQuantity] = stQuantity;
                col.Filter = Helper.AndFilter(col.Filter, VwStockListMetadata.ColumnNames.StQuantity + " = " + stQuantity );
            }

            if (Session["ddlSelValue"] != null)
            {
                if (bAutoReorder==true)
                    ViewState[VwStockListMetadata.ColumnNames.StAutoReorder] = "True";
                else
                    ViewState[VwStockListMetadata.ColumnNames.StAutoReorder] = "False";

                col.Filter = Helper.AndFilter(col.Filter, VwStockListMetadata.ColumnNames.StAutoReorder + " = " + bAutoReorder);
            }

            string sortExpression = Session["SortExpression"] == null ? string.Empty : (string)Session["SortExpression"];
            col.Sort = sortExpression;

            StockGrid.DataSource = col;
        }
        catch (Exception ex)
        {
            IsError(ex);
        }
    }


Raj
Top achievements
Rank 1
 answered on 27 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?