Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
81 views
Since I never received a response from this thread: http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/inherited-page-classes-problem.aspx

I'll post here.

In using v. 2008.2.826.35 i wasn't having any problems with the RadGrid.  However, when I tried using build 2008.3.1125.35, i began having insert/update issues.

On insert, empty strings (not NULLs) are returned to my app and therefore empty strings are being inserted into my DB.

On update, the original values are being 'updated' in the database - not the new values.

As you can see from the link above, I'm using OnNeedDataSource, so I don't believe the issue is with a PostBack.  AND, like i said earlier, everything works perfect with the 2nd Quarter Release.  There's a bug somewhere in your 3rd quarter.

Thanks,
Joshua
Joshua
Top achievements
Rank 1
 asked on 10 Dec 2008
1 answer
33 views
I need to provide only the timeline option to the user and not the "Day", "Week" and "Month" options in the header.
Atanas Korchev
Telerik team
 answered on 10 Dec 2008
1 answer
175 views

I have an AJAX ComboBox Control and I added an AJAX Treeviw Control inside the ComboBox Item Template. When the post back happened for the second time the ComboBox Value come up with the node text value instead of the node value.

I want to store the Selected Node Value in the ComboBox Item(0).Value and to store the selected node text to the ComboBox Item(0).text and I want them to survive postbacks.

Is this passable? How can I do it?

When I use the following statements:

comboBox.get_items().getItem(0).set_text(node.get_text());

comboBox.get_items().getItem(0).set_value(node.get_value());

 

I get an error.

 

Please I need your help.

 

Thank you.

UserControl APSX Page:

<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="MenuOptionsTree.ascx.vb" Inherits="AMS.MenuOptionsTree" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<body bottommargin="0" topmargin="0" leftmargin="0" rightmargin="0" dir=rtl>  
 <script type="text/javascript">
     function FindNode(comboBox, args)
     {
         var PassedValue = document.getElementById('<%=ValueToFind.ClientID%>').value
         if (PassedValue == 0)
         {
             comboBox.set_text(comboBox.get_items().getItem(0).get_value());
             document.getElementById('<%=NodeValue.ClientID%>').value = comboBox.get_items().getItem(0).get_value();
         }
         else if (PassedValue == -1)
         {
             comboBox.set_text("")
         }
         else
         {
             var treevw = comboBox.get_items().getItem(0).findControl("TreeMenuOptions");
             var node = treevw.findNodeByValue(PassedValue);
             if (node)
             {
                 node.select()
                 document.getElementById('<%=NodeValue.ClientID%>').value = node.get_value();
                 comboBox.set_text(node.get_text());
                 comboBox.trackChanges();
                 comboBox.get_items().getItem(0).set_value(node.get_text());
                 comboBox.commitChanges();
             }
         }
     }

     function nodeClicking(sender, args)
     {
         var comboBox = $find("<%= cmbMenuOptions.ClientID %>");
         var node = args.get_node()

         document.getElementById('<%=NodeValue.ClientID%>').value = node.get_value();

         comboBox.set_text(node.get_text());

         comboBox.trackChanges();
         comboBox.get_items().getItem(0).set_value(node.get_text());
         comboBox.commitChanges();

         comboBox.hideDropDown();
     }

     function StopPropagation(e)
     {

         if (!e) {
             e = window.event;
         }

         e.cancelBubble = true;
     }

     function OnClientDropDownOpenedHandler(sender, eventArgs)
     {
         var treevw = sender.get_items().getItem(0).findControl("TreeMenuOptions");
         var node = treevw.findNodeByValue(sender.get_items().getItem(0).get_value());
         if (node != null)
         {
             node.select();
             node.get_parent().expand();
             node.scrollIntoView();
         }
     }
  
</script>
<telerik:RadComboBox ID="cmbMenuOptions"
    Runat="server"
    Height="200px"
    Skin="Sunset"
    Width="348px"
    OnClientLoad="FindNode"
    OnClientDropDownOpened="OnClientDropDownOpenedHandler">
    <ItemTemplate>
      <div ID="TreeDiv" onclick="StopPropagation(event)" dir=rtl>
        <telerik:RadTreeView
         ID="TreeMenuOptions"
         Runat="server"
         Height="350px"
         Width="100%"
         OnClientNodeClicking="nodeClicking"
         Skin="Sunset">
            <CollapseAnimation Duration="100" Type="OutQuint" />
            <ExpandAnimation Duration="100" />
        </telerik:RadTreeView>
        </div>
    </ItemTemplate>
    <Items>
      <telerik:RadComboBoxItem Text="" />
    </Items>
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</telerik:RadComboBox>
<input id="NodeValue" value="0" runat="server" enableviewstate="true" type="hidden" />
<input id="ValueToFind" value="0" runat="server" enableviewstate="true" type="hidden" />
</body>


Code-Behind:
Public Property SelectNodeValue() As String
        Get
            Return NodeValue.Value
        End Get
        Set(ByVal value As String)
            Me.ValueToFind.Value = value
        End Set
    End Property

Ahmad Alkhiary
Top achievements
Rank 1
 answered on 10 Dec 2008
1 answer
84 views

Hi,

I am using following code to get all the rows (checkboxes) that have been selected by a user:

 

 

function GetSelectedRows()  
// get all the rows with the checkbox checked  
    var strTickets = "";  
    var grid = window["<%= RadGrid1.ClientID %>"];  
    var masterTableView = grid.MasterTableView;  
      
    for (var i=0; i<masterTableView.Rows.length; i++)  
    {              
        var cell = masterTableView.GetCellByColumnUniqueName(masterTableView.Rows[i] , "TemplateEditColumn");  
        alert("cell=" + cell);  
        var checkBox = cell.getElementsByTagName("INPUT")[0];  
        if (checkBox && checkBox.checked)  
        {  
            var cellID = grid.MasterTableView.GetCellByColumnUniqueName(masterTableView.Rows[i], "TradeTicketID");  
            strTickets = strTickets + cellID.innerHTML + ",";  
        }  
    }  
 
    return strTickets;  
      

 

Everything works fine when there is no grouping, or if the grid is grouped by one column. But when I group by two columns, it doesn't work. It fails on alert("cell=" + cell) with "cell=undefined". Any ideas?

We are using RadGrid v2.0.50727, this project was developed last year.

Thank you,
Julia

 

 

 

 

Daniel
Telerik team
 answered on 10 Dec 2008
3 answers
74 views

Dear Telerik Team,

I have a UserControl which contain an AJAX ComboBox control. When I add two instances of the same UserControl to a page they don't work very well so only one instance of the UserControl work fine.

Why is that happening? How to fix it? I needed to have two instances of the UserControl on my page.

Thank you.

Atanas Korchev
Telerik team
 answered on 10 Dec 2008
4 answers
180 views
Hi All

I have moved the RadTreeView to a UC.

How i wish that when the user clicks on a node, the event is bubbled to the main page, and then the RadGridView is bound.

At the moment in the UC, I have the following:-

protected void RadTreeView1_NodeClick(object sender, RadTreeNodeEventArgs e)
    {
        //lblError.Visible = false;
        //lblError.Text = "";
        RadTreeNode nodeEdited = e.Node;
        ViewState["nodeLevel"] = e.Node.Level;
        ViewState["FullPath"] = e.Node.FullPath;
        ViewState["Value"] = e.Node.Value;
        //pnlCrawledBuildDetailExtended.Visible = false;
        BindGridView();
    }

How can I bubble the BindGridView() to the Main Page, and bind the gridview on the main page?

Thanks for your help

Johann
Johann
Top achievements
Rank 1
 answered on 10 Dec 2008
1 answer
141 views
Hello
I have a radgrid containing 1 Mastertableview and 2 details tables. In the last detail table, I have

<

telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" />
I also have a button after the radgrid which will allow me to send email to each person in my radgrid who are selected.
When I click on that button, how can I retrieve each selected row to send email to each person.
Thank you very much

 

Myriam
Top achievements
Rank 1
 answered on 10 Dec 2008
3 answers
115 views
Hi,
is there a way to increase the width of the FormatStripper drop down menu? German text is too long and causes line breaks. Width is set to 200px in the style attribute and I can't find a way to change that programmatically.
Rumen
Telerik team
 answered on 10 Dec 2008
1 answer
146 views
I have become tired now applyinhg javascripts using radcontrols but javascript is NOT reliable at all with radcontrols....waht to do?
Georgi Tunev
Telerik team
 answered on 10 Dec 2008
1 answer
125 views
hy friends,

I ´d like to insert a Dropdownlist inside a grid (a column that I converted to an Itemtemplate) but its not working when I try to insert a new record.I think I need to insert a black record, but I dont know how.
 how can I achive this?


thanks a lot
Vlad
Telerik team
 answered on 10 Dec 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?