Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
103 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
128 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
162 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
148 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
344 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
1 answer
76 views
If a programmer already has the production copy of say the Rad Ajax Controls installed on his Visual Studio 2008 and would like to try the Telerik Reporting system on a trial basis, would the install of the Telerik Reporting Suite have any effect on the Radcontrols for ASP.Net AJAX?  Would it mess up my install of the RadAjax Controls?  Would it effect my current license at all?  thanks!
Donna
Telerik team
 answered on 27 Oct 2009
1 answer
90 views

Hi,

I am using radeditor for my application. It showing a error message in track change pop window 'OutOfMemoryException'.

Because I am using a html file in radeditor content  which contains more than 1000 lines.

Please the find image file attached, showing error message.

So give any suggestions and how to resolve it.

Thanks in Advance.

 

Regards

Utchimahali.N

Rumen
Telerik team
 answered on 27 Oct 2009
1 answer
74 views
When I add a SELECT element to a page in Design mode with rad editor, I can find no way to manipulate it. To demonstrate my problem, go to the following demo URL: http://demos.telerik.com/aspnet-ajax/editor/examples/default/defaultcs.aspx

Click anywhere in the page and use the toolbar to add a SELECT element. Now, try clicking on the SELECT element. You get no indication it's selected, nor do you get any editable properties down below. It does not seem to matter if you add it within a FORM element or not.

Ideally, I should be able to select the element and manage the normal properties, such as name, id, tooltip, etc. I should also be able to manage the list of options and choose which one is selected by default.

Am I missing something? I searched the manual and forum, but found nothing relating to SELECT elements.

Thank you in advance for your assistance.

Joel
Rumen
Telerik team
 answered on 27 Oct 2009
0 answers
96 views
My Fault:

The P of .PasteHtml must be lowercase!

Correct: .pasteHtml

Can a mod attach this please to the previous post?
Yavuz Bogazci
Top achievements
Rank 1
 asked on 27 Oct 2009
1 answer
78 views
hi 
I'am using latest RadControls for ASP.NET AJAX Q2 2009 SP1.
i have to apply custom skin in Rad Editor controls.
its won't apply for imagemanager control..


I have set 
radeditor.Skin = "MyCustomSkin";
            radeditor.EnableEmbeddedSkins = false;

Can you tell me how to solve that issue 

advanced thanks

with regards
R.Vivekanandan
Rumen
Telerik team
 answered on 27 Oct 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?