Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
348 views
Hello,

    I am using Telerik 2009.2 
    I have a grid that is filled by an object data source. In the itemcommand event I insert a new row in the data table. 
    Unfortunately, Nothing that I do forces the grid to reload the list from the database. It grabs some values from the the new object inserted but not all of them. I tried rebind, force bind, etc, without success. 
 
   What can I do to reload the objects from the database? 



Thanks, 
Nikolay Rusev
Telerik team
 answered on 19 Oct 2009
1 answer
117 views
Hello,

I need to add a new record with default values each time the user click on add new record, without staying in edit mode, what is the best method.


Regards
CS
Shinu
Top achievements
Rank 2
 answered on 19 Oct 2009
1 answer
213 views
Hey,

I'm using a radtreeview control to map relations between 2 recordsets and I do it all in a single stored proc as specified in the example provided in the documentation.

I get the radtreeview working flawlessly, except for in one situation. The situation involves a parent and child sharing the same id which confuses the control somehow. The failing recordset would look like.

ParentID    ID    Title
null             1       Car
null             2       Motorcycle
1                1        Honda Civic
1                5        Ford Focus
2                3        Yamaha
2                6        Suzuki


radTreeView1.DataTextField =

"Title";

radTreeView1.DataFieldID =

 

 

"ID";

radTreeView1.DataFieldParentID =

 

 

 

"ParentID";

radTreeView1.DataSource = myResultSet;

radTreeView1.DataBind();

The italized record in the example where parentid and id are sharing the same value of 1 would throw an error "these columns don't currently have unique values." If I remove that record, then it will work.

This example should read if the parentid is null then make it the root element, then map all records with a parentid value to it's corresponding id value, but in this case it does not like the fact that I have a child and parentid matching even though the id field of the second level items should not matter one bit because it shouldn't be factored in the equation.

Thanks in advance.

 

 

 

 

Atanas Korchev
Telerik team
 answered on 19 Oct 2009
1 answer
67 views
Hi,

We build solution for our customer based on Sitecore Intranet Portal (SIP) CMS system (that has RadEditor 6.5.2 by default).

Editor works well on clean CMS, but recently we noticed that it doesn't work in IE (6,7) on developing solution, please see attached screenshot. Toolbars are not shown, and textarea is disabled, so it is not usable. But it works well in Firefox and Chrome.

We didn't changed any editor related folder/files, scripts or something, so it seems very strange. I compared html from both sites (clean CMS and one that is being developed), and it is basically the same except auto-generated IDs of html elements.
Just to mention, both servers (with clean and customer sites) have .NET 3.5 SP1 installed, but it is unclear what might be a source of the problem....
Please help to find a reason.
Rumen
Telerik team
 answered on 19 Oct 2009
1 answer
179 views
Is there a clientside event that I can access when the RadGrid goes into Edit mode or Insert mode when I am using a template for insertin/editing?
Shinu
Top achievements
Rank 2
 answered on 19 Oct 2009
3 answers
530 views
Hello,

  I have a grid where I want to access the object containing the data at client side, in order to present details of the object
  in another panel of the page. I have tried several variations to access the underline object and dataitem values without success.
  I maybe overlooking the solutions somehow.

  Here is a portion of my javascript . Nothing that I tried worked yet. I tried many variations of the below without success. Only the index value shows correctly on my page.

 
               function OnRowSelected(sender, eventArgs)
                    {
                        var grid = $find("<%=TradesGrid.ClientID %>");

                        var index = eventArgs.get_itemIndexHierarchical();   
                        var master = grid.get_masterTableView();         
                        var row = master.get_dataItems()[index];
                        var newValues = master.extractValuesFromItem(index);
                        var newValuesSB = new Sys.StringBuilder();
                       
                        newValuesSB.append("this is a test </br>");
                        for(var property in newValues)
                        {          
                        newValuesSB.append(String.format("<b>{0}</b> : {1} <br/>", property,newValues[property]));
                        }  
                        document.getElementById("<%= QuantityDetail.ClientID %>").innerHTML = "123" + index;
                        document.getElementById("<%= PriceDetail.ClientID %>").innerHTML = newValuesSB.toString();                      
                        document.getElementById("<%= InitialLoan.ClientID %>").innerHTML =row["InitialLoan"];

   

  Thanks.

Joao,
Princy
Top achievements
Rank 2
 answered on 19 Oct 2009
2 answers
146 views
Hi Folks,

I am working on a wizard where I have an informative radsplitter with muliple vertical panes in it. As I navigate through the wizard I want the panes to highlight, thus giving the  user  a status as to where they are in the wizard.

at the moment I am setting the background colour of the radpanes via an ajaxrequest method. Ideally I would like to do this on the clientside

I am assuming its something like this
RadPane.style.backgroundColor = "red"

I would be grateful if someone could give me an insight into a snippet of code     that would achieve this

thanks

Mark
mark
Top achievements
Rank 1
 answered on 19 Oct 2009
1 answer
123 views
Hello,

I have a RadGrid  (Q1 2008).. it has 1 detail Table...

I am capturing the ItemDatabound event as such:

Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound  
 
     If e.Item.OwnerTableView.Name = "ClientTable" Then  
          If e.Item.ItemType = GridItemType.Item Then  
(...) 

The event seems to run fine for the first record of the details table, but doesn't fire on any other records in the detail...  the records show fine, but nothing I have set in the event affects them...  ie..

I set the tooltip text for an image button to "Whuzzle"...   tool tip on the first row of the detail table is correct.. but empty on all the remaining rows.

My whole code looks like this..
Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As _ Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound  
     
   If e.Item.OwnerTableView.Name = "ClientTable" Then  
        If e.Item.ItemType = GridItemType.Item Then  
            Dim DGI As GridItem = DirectCast(e.Item, GridItem)  
            Dim rttEdit As Telerik.Web.UI.RadToolTip = _ 
                 DirectCast(DGI.FindControl("rttEdit"), RadToolTip)  
            Dim rttDelete As Telerik.Web.UI.RadToolTip = _ 
                 DirectCast(DGI.FindControl("rttDelete"), RadToolTip)  
 
            rttEdit.Text = "Edit Client" 
            rttDelete.Text = "Delete Client" 
         End If  
      End If  
End Sub  
 
 
Thanks!

Matt
Matt
Top achievements
Rank 1
 answered on 19 Oct 2009
1 answer
137 views
Hi

I'm having difficulties persisting  a special day style have now moved over to using DayRender function.

I'm using a RadCalendar inside a asp:repeater item. In the serverside DayRender, how can I reference values in my RepeaterItem (row) where I have a databound key or hidden label?
I thought I could do that through the dayRender Sender parent but no luck.

Axel
Axel
Top achievements
Rank 2
 answered on 18 Oct 2009
1 answer
345 views
Hello

I have a web user control that fires 2 events - Event1 and Event2 and I want when the control fires Event1 then Event1Panel to postback, and the same when Event2 fires then Event2Panel postbacks. Here is some code:

Default.aspx

<%@ Register Src="WebUserControl.ascx" TagName="WebUserControl" TagPrefix="uc1" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title></title>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
        </telerik:RadScriptManager> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="WebUserControl1" EventName="Event1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="Event1Panel" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="WebUserControl1" EventName="Event2">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="Event2Panel" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    </div> 
    <uc1:WebUserControl ID="WebUserControl1" runat="server" /> 
    <asp:Panel ID="Event1Panel" runat="server">  
        Event1Panel<br /> 
        <%= DateTime.Now.ToString() %> 
    </asp:Panel> 
    <asp:Panel ID="Event2Panel" runat="server">  
        Event2Panel<br /> 
        <%= DateTime.Now.ToString() %> 
    </asp:Panel> 
 
    </form> 
</body> 
</html> 
 


WebUserControl.ascx

 

<asp:Button ID="btn1" runat="server" Text="Event1" /> 
<asp:Button ID="btn2" runat="server" Text="Event2" /> 
 
public partial class WebUserControl : System.Web.UI.UserControl  
{  
    public event EventHandler<EventArgs> Event1;  
 
    protected virtual void OnEvent1(EventArgs args)  
    {  
        if (Event1 != null)  
        {  
            Event1(this, args);  
        }  
    }  
 
 
    public event EventHandler<EventArgs> Event2;  
 
    protected virtual void OnEvent2(EventArgs args)  
    {  
        if (Event2 != null)  
        {  
            Event2(this, args);  
        }  
    }  
 
    protected void Page_Load(object sender, EventArgs e)  
    {  
        btn1.Click += delegate(object o, EventArgs args)  
        {  
            OnEvent1(EventArgs.Empty);  
        };  
 
        btn2.Click += delegate(object o, EventArgs args)  
        {  
            OnEvent2(EventArgs.Empty);  
        };  
 
    }  
}  
 

 

 

 

 

Why this is not working??

 

 

Iana Tsolova
Telerik team
 answered on 18 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?