Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
274 views


If the OrderOption changed  radgrid _prerebder is fired butVisible = true; Columns are not showing



if (OrderOption == "Order Pending")
            {
                foreach (GridDataItem item in RadGrid1.MasterTableView.GetItems(GridItemType.Item))
                {
                    RadGrid1.MasterTableView.GetColumn("orderno").Visible = false;
                    RadGrid1.MasterTableView.GetColumn("orderdate").Visible = false;
                    RadGrid1.MasterTableView.GetColumn("quotationno5").Visible = true;
                }
            }
else if (OrderOption == "Order Generated")
            {
                foreach (GridDataItem item in RadGrid1.MasterTableView.GetItems(GridItemType.Item))
                {
                    RadGrid1.MasterTableView.GetColumn("orderno").Visible = true;
                    RadGrid1.MasterTableView.GetColumn("orderdate").Visible = true;
                    RadGrid1.MasterTableView.GetColumn("quotationno5").Visible = false;
                }
            }


Thanks,
Mohamed.
mohamed
Top achievements
Rank 1
 answered on 21 Oct 2011
3 answers
113 views
I have a RadCombobox being used exactly like the example here:
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridincombobox/defaultcs.aspx?product=combobox

I pretty much copied the code from the demo.  Everything works exactly like the demo except for 1 thing...  If you type too fast, its stops working.  After entering 3 characters, it works fine if you wait for the grid to load after each character, but if you type too fast, it stops working.  Once it stops working, the grid doesn't refresh even if you clear the text and start again. You have to refresh the page to get it to start working again.

I cannot reproduce it in the online demo, and since my code is the same, I don't expect you to know what's wrong.  However, if you can give me some tips on what might be the cause, or a way to diagnose the issue, it would be greatly appreciated.

Differences between my app and the demo:
    - I'm calling a WCF server from the code behind instead of retrieving directly from a database
    - My combobox is in the masterpage of the site.
    - My application is in SharePoint

Thanks,
Justin
Justin Lee
Top achievements
Rank 1
 answered on 21 Oct 2011
1 answer
100 views
Hello,
I use toolbar as a control inside CommandItemTemplate for RadGrid. One of buttons has CommandName="DeleteSelected". I can select rows only from clientside. How do I pass row IDs to CommandArgument from clientside?
That's how I use the button:
<telerik:RadToolBarButton runat="server" ImageUrl="~/images/btnDel.png" Value="delete"
            CommandName="DeleteSelected" Enabled="false"/>


function ToolbarClientButtonClicking(sender, args) {
            if (args.get_item().get_value() == "delete") {               
                 args.set_cancel(!confirm("Delete selected rows?"));
                return;
            }
Is there a way to add custom arguments to command from clientside before postback and ItemCommand event?
Thank you
Kevin
Top achievements
Rank 2
 answered on 21 Oct 2011
1 answer
289 views
Hi, when I click on the cancel button on the javascript confirm dialog, it does do a postback. 

The problem is that the file is just a (.cs), so I can't use the "return args.set_cancel(true);" argument in de aspx file.
.
Creating Remove button and javascript confirm:
// Remove
rtb = new RadToolBarButton();
rtb.CommandName = "Remove";
rtb.Text = "";
rtb.ImageUrl = "~/Images/actiontoolbar/actiontoolbar_remove.png";
rtb.DisabledImageUrl = "~/Images/actiontoolbar/actiontoolbar_remove_grayed.png";
rtb.CausesValidation = false;
rtb.Attributes.Add("onclick", "javascript: if (!confirmDelete()) return false;");
radtoolbar.Items.Add(rtb);

Creating message:
/// <summary>
/// Shows a conformation dialog when deleting.  On by default.
/// </summary>
[DefaultValue(true)]
public bool ConfirmDelete
{
    get
    {
        return (bool)(this.ViewState["ConfirmDelete"] ?? true);
    }
    set
    {
        this.ViewState["ConfirmDelete"] = value;
    }
}
 
/// <summary>
/// Shows this message in a conformation dialog when deleting ans ConfirmDelete is on.  On by default.
/// </summary>
[DefaultValue("Are you sure you want to delete this record?")]
public string ConfirmDeleteMessage
{
    get
    {
        return (string)(this.ViewState["ConfirmDeleteMessage"] ?? "Are you sure you want to delete this record?");
    }
    set
    {
        this.ViewState["ConfirmDeleteMessage"] = value;
    }
}
 
protected override void OnLoad(EventArgs e)
{
    base.OnLoad(e);
    RadScriptManager.RegisterClientScriptBlock(Page, GetType(), "confirmdelete", @"function confirmDelete(){return confirm('" + ConfirmDeleteMessage + "');}",true);
}

I hope somebody can help me.

Thanks.
Kevin
Top achievements
Rank 2
 answered on 21 Oct 2011
17 answers
296 views
Hello guys,

I have a Web Application that was originally created on SharePoint 2007 and on several pages we are using the RadEditor for MOSS webpart. Now we're migrating that Web Application to SharePoint 2010. I've installed the RadEditor for Sharepoint before migrating the content but when I migrate the content I get the next error on the pages that are using RadEditor for MOSS:

"Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe."

I know that the problem could be that the webpart changes its name and that now I've to change ALL the pages that are using the SP 2007 webpart to the new 2010 one.

I would like to know if there is any quick way to do the migration of webparts because we have several pages with that error and It's going to take a while in order to have all of them fixed.

Thanks in advance.
IT Department
Top achievements
Rank 1
 answered on 21 Oct 2011
1 answer
81 views
Hello everybody!
I have a problem when I use radmenu. I need load menu form a SQL database. I done, but I can't use multi-column (Error in IE9 and Firefox ) and when I use scrolling : my radmenu is 2 rows (Error in IE9 but not in FireFox).
Have you any ideas! Thank you very much!
My code is upload in link:
    http://www.mediafire.com/?8d1g24e6i5ee1tz
Or:
Code behind:
string connectionString = @"Server=PHAMDUCANH-PC\SQLEXPRESS; database=TestDB;Integrated Security = True";
        string command = "SELECT * FROM Menu";
        SqlDataAdapter da = new SqlDataAdapter();
        DataSet ds = new DataSet();
         
 
        protected void Page_Load(object sender, EventArgs e)
        {   
 
            if (!IsPostBack)
            {               
                SqlConnection conn = new SqlConnection(connectionString);
                conn.Open();
                SqlCommand cmd = new SqlCommand(command, conn);
                da.SelectCommand = cmd;
                da.Fill(ds);
                ds.AcceptChanges();
                DataSet dsMenu = new DataSet();
                dsMenu.Tables.Add(ds.Tables[0].Copy());
                if (dsMenu != null && dsMenu.Tables.Count > 0 && dsMenu.Tables[0].Rows.Count > 0)
                {                  
                    mnuMenu.Items.Clear();
                    var drGoc = dsMenu.Tables[0].Select("ParentMenuID = -1");
                    if (drGoc != null && drGoc.Length > 0)
                    {
                        foreach (DataRow dr in drGoc)
                        {
                            RadMenuItem item = new RadMenuItem();
                            item.Value = dr["MenuID"].ToString().Trim();
                            item.Text = dr["Header"].ToString().Trim();
                            CreateTree(item, dsMenu);
                            mnuMenu.Items.Add(item);
                        }
                    }
                }
            }
        }
 
        public void CreateTree(RadMenuItem node, DataSet ds)
        {
            try
            {
                node.Items.Clear();
                var p = ds.Tables[0].Select("ParentMenuID=" + node.Value);
                if (p != null && p.Length > 0)
                {
                    foreach (DataRow dr in p)
                    {
                        RadMenuItem item = new RadMenuItem();
                        item.Value = dr["MenuID"].ToString().Trim();
                        item.Text = dr["Header"].ToString().Trim();
                        if (dr["Path"].ToString().Trim().Length > 0)
                        {
                            
                            item.NavigateUrl = "~/Default.aspx?Menu=" + dr["Path"].ToString().Trim();
                        }
                        node.Items.Add(item);
                        CreateTree(item, ds);
                    }
                }
            }
            catch
            {
            }
        }
UI:

<telerik:RadMenu runat="server" ID="mnuMenu" EnableRootItemScroll="true" Width="400px"
                           EnableRoundedCorners="true" EnableShadows="true" 
                           Skin="WebBlue">
           <DefaultGroupSettings Height="100px" RepeatColumns="2"/>                     
                 <Items>
                     <telerik:RadMenuItem Text = "New..." >
                         <GroupSettings Height="100px" RepeatColumns="2"></GroupSettings>
                         <Items>                                   
                                <telerik:RadMenuItem Text="File"></telerik:RadMenuItem>
                                <telerik:RadMenuItem Text="Folder"></telerik:RadMenuItem>
                         </Items>
                     </telerik:RadMenuItem>
                     <telerik:RadMenuItem Text="Open">
                          <GroupSettings Height="100px"></GroupSettings>
                          <Items>
                               <telerik:RadMenuItem Text="File"></telerik:RadMenuItem>
                                <telerik:RadMenuItem Text="Folder"></telerik:RadMenuItem>
                          </Items>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem Text="Close">
                          <GroupSettings Height="100px"></GroupSettings>
                          <Items>
                                <telerik:RadMenuItem Text="File"></telerik:RadMenuItem>
                                <telerik:RadMenuItem Text="Folder"></telerik:RadMenuItem>
                          </Items>
                          </telerik:RadMenuItem>
                      <telerik:RadMenuItem Text="Save" >
                            <GroupSettings Height="100px"></GroupSettings>
                                <Items>
                                   <telerik:RadMenuItem Text="File"></telerik:RadMenuItem>
                                   <telerik:RadMenuItem Text="Folder"></telerik:RadMenuItem>
                               </Items>
                           </telerik:RadMenuItem>
                           <telerik:RadMenuItem Text="Save as ...">
                               <GroupSettings Height="100px"></GroupSettings>
                                <Items>
                                   <telerik:RadMenuItem Text="File"></telerik:RadMenuItem>
                                   <telerik:RadMenuItem Text="Folder"></telerik:RadMenuItem>
                               </Items>
                           </telerik:RadMenuItem>                          
                       </Items>                   
                   </telerik:RadMenu>
Kate
Telerik team
 answered on 21 Oct 2011
3 answers
238 views
Hi ALL,

         Let me tell you my current flow and what i want to do.

         I have one parent page with link as "Add New" and RadGrid, when user click on link radwindow will get open.

        User will fill up the details and click on save button, record will get save into DB and want to refresh the RadGrid on parent page.

        I have used RadAjaxManager on parent page to call radajaxrequest to refresh the grid.and update that particular grid only,

        But on same page i have to maintain history.back functionality on cancel button, whenever ajaxrequest get fire page will get postback.so when user click on cancel button user will stay on same page rather than previous page.

       Can you please help me out to refresh the parent page grid without any postback, so i can mange window.history on cancel button.
 

      
Tsvetina
Telerik team
 answered on 21 Oct 2011
3 answers
174 views
hey

I've a little problem with the js function $find...
The Menu used in the UserControl XY
I try to get the client object of the Menu with $find("<%=XYObject.InnerMenu.ClientId %>") but it returns null
so I've tried the function $get which worked...  the readyState is also 'complete'...
When I add the Menu directly without the UserControl it's working....

Greetings
Kate
Telerik team
 answered on 21 Oct 2011
1 answer
41 views
I am using the trial version of RAD Editor for sharepoint 2010. Although i am able to see the tools of the editor, the issue comes when i save the page, only plain HTML is rendered. Like if i add an image through the rad editor on saving the page i get the following html on my page:

<img width="800" height="375" alt="" style="width: 800px; height: 217px;" 
src="/sites/testJTI/Documents/Image1.jpg" />

Can anyone guide me if i am missing something in the settings or a particular config file entry.
Rumen
Telerik team
 answered on 21 Oct 2011
1 answer
87 views
Hi,

I've been using the Telerik toolkit with great ease since 2009 with that year's release. We have recently had to upgrade to the new toolkit and the manager (Images, documents and flash are the main ones I use.) stopped working. I would usually set the manager's folders from code, and I use this in a centralized admin for about several websites. The code looks like this:
             
Dim sUpldPath As String = "~/Admin/Uploads/" & sWebsiteName & "/"

Dim sImg() As String = {sUpldPath & "images"}
Dim sFls() As String = {sUpldPath & "flash"}
Dim sDoc() As String = {sUpldPath & "documents"}

RadEditor1.ImageManager.DeletePaths = sImg
RadEditor1.ImageManager.ViewPaths = sImg
RadEditor1.ImageManager.UploadPaths = sImg

RadEditor1.FlashManager.DeletePaths = sFls
RadEditor1.FlashManager.ViewPaths = sFls
RadEditor1.FlashManager.UploadPaths = sFls

RadEditor1.DocumentManager.DeletePaths = sDoc
RadEditor1.DocumentManager.ViewPaths = sDoc
RadEditor1.DocumentManager.UploadPaths = sDoc

For the most part this works, in the new and old control kit, but when the sWebsite name contains a space e.g. sWebsiteName = "Website ABC" then it doesn't work in the new control kit. Any suggestions as to how to fix that?
Dobromir
Telerik team
 answered on 21 Oct 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?