Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
143 views
Hi,

I have followed the example from here (http://www.telerik.com/community/code-library/aspnet-ajax/combobox/radcombobox-advanced-multiple-selection.aspx) and although the checkboxes are displayed and allow multiple selections, my combobox text is now empty. 

I am manually binding the combobox using the following:

Dim dt As DataTable  
dt = ListProjects()  
cbox.Items.Clear()  
For Each row As DataRow In dt.Rows  
    Dim item As New RadComboBoxItem()  
    item.Text = row("Name").ToString  
    item.Value = row("ID").ToString  
    cbox.Items.Add(item)  
Next 

This is getting called in PageLoad.  If I take out the Item Template it displays all my entries fine, but obviously without the checkbox.  Do I need to do something different in this scenario?

David Penny
David Penny
Top achievements
Rank 2
 answered on 18 Feb 2009
1 answer
141 views
Hi,

I'm using a ScriptManager to call a webservice method. I have a button and I'm using onClientClick to call a javascript method that will call the web service as I need to make a check before the postback occurs.

I have tested my page on IE and it works fine but it doesn't work on Firefox 2 and Safari on Windows.

Any leads?

Thanks.
Atanas Korchev
Telerik team
 answered on 18 Feb 2009
2 answers
166 views
I must not be smart enough to figure this out. I have tried every combination of things I can think of.

I am using a dataset to populate a grid (datasource = dataset). This grid has an edit button using forms which works fine. I can easily get the new values when form is updated, but I can't seem to figure out how to get the original value. 

I have tried the savedoldvalues property of the grideditableitem but no values exist. I have tried this in both the item command event and the updatecommand event.

I have tried to save the values in a session variable at the itemdatabound event but can't seem to get the values.

        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" GridLines="None">  
            <MasterTableView CommandItemDisplay="TopAndBottom" AllowSorting="True">  
                <RowIndicatorColumn> 
                    <HeaderStyle Width="20px" /> 
                </RowIndicatorColumn> 
                <ExpandCollapseColumn> 
                    <HeaderStyle Width="20px" /> 
                </ExpandCollapseColumn> 
                <Columns> 
                    <telerik:GridDateTimeColumn DataField="DATE" DataFormatString="{0:yyyy-MM-dd}" HeaderText="Date" 
                        UniqueName="DATE">  
                    </telerik:GridDateTimeColumn> 
                    <telerik:GridBoundColumn DataField="REFNO" HeaderText="Ref #" UniqueName="REFNO">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="AMOUNT" HeaderText="Amount" UniqueName="AMOUNT">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="REIMBPER" HeaderText="Reimbursement%" UniqueName="REIMBPER">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="REIMBAMT" HeaderText="Reimbursement Amount" UniqueName="REIMBAMT">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridEditCommandColumn> 
                    </telerik:GridEditCommandColumn> 
                    <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="column1">  
                    </telerik:GridButtonColumn> 
                </Columns> 
                <EditFormSettings> 
                    <EditColumn UniqueName="EditCommandColumn1">  
                    </EditColumn> 
                </EditFormSettings> 
            </MasterTableView> 
            <FilterMenu EnableTheming="True">  
                <CollapseAnimation Duration="200" Type="OutQuint" /> 
            </FilterMenu> 
        </telerik:RadGrid> 
 

I have wasted such an incredible amount of time on this can someone help?

Steve
Steve
Top achievements
Rank 1
 answered on 18 Feb 2009
2 answers
319 views
Hello,
I am trying to get a dropdown in Edit form as a template.
Firstly I have a RadGrid in that there is a dropdown.I binded that successfully.
Upto here there is no problem.But now I have a Edit template form which opens on click of update button.
Here I have two textbox and a combo as a template.I want to show all values in Edit combo that are present in grids combo.I can fetch that again from a database.But the selected value should be same as Grid's combo's selected value.
How to do that.I tried by findcontrol method.I am getting correct combo from edit form.
But when I bind that to database I am not getting.
Thanks in advance,
-Mahesh
Mahesh
Top achievements
Rank 1
 answered on 18 Feb 2009
1 answer
70 views
Hi,

When i add Rad tooltip to the aspx file, it renders it as

"<div id="rttFMLANotes" style="display:none;">
 <!-- 2008.2.1001.20 -->
                                                    <input id="rttFMLANotes_ClientState" name="rttFMLANotes_ClientState" type="hidden" />"
Because of this, i get an error message when i submit the page. Do you know how to get rid of this part..
<!-- 2008.2.1001.20 -->
                                                    <input id="rttFMLANotes_ClientState" name="rttFMLANotes_ClientState" type="hidden" />". 

Thanks
-Viji.

Svetlina Anati
Telerik team
 answered on 18 Feb 2009
1 answer
182 views
I have been reading through the threads on use of RadScheduler in dnn. I have downloaded the example dnn module 080623_SchdulerDNNSample.zip and intend to play around with this. I did notice that this example uses an XML data source. I also see instructions in the help section on a tutorial for creating a dnn module using the scheduler as an example http://www.telerik.com/help/aspnet-ajax/how-to-create-dnn-module-telerik-ajax-controls3.html . This help section use a sql data provider which is my desired approach. I have a few questions though and some of them might be kind of dumb as I'm somewhat new to this environment :-)

The xml file in the xml data source example dnn module defines some example resources, users, and appointments. This seems self explanatory. The tutorial using the sql data source talks to creating a table to store appointments and defining the appropriate columns for managing appointments but doesn't mention any kind of setup for resources and users. Does anything additional have ot be done here?

Also, I am curious as to how the module could be linked to actual dnn users. What I really want is for "users" in the Rad Scheduler context to be "users" in the dnn context. That is can RadScheduler be configured to pick up registered dnn users as users for the purpous of RadScheduler and have it pick up the appropriate fields from the dnn user profile tables. To that end it would be ideal if it could also pick up selected users, maybe by roles, as resources.

My scenario here is that I want to set up an appointment system where I have a number of providers (essentialy resources) and clients of those providers (users). I want to be able to create appointments where I am scheduling an individual user with a provider. An example might be a doctors office, although the scenario is quite common. Since I also want these users to be able to login to the dnn site using the normal dnn mechanisms and view their private appointments, and also have appointment schedulers be able to login and have a role where they can schedule these appointments, it would be great if if I could somehow link the dnn users with RadScheduler. It seems like the control itself is more than capable of providing the functionality I need, although I'm not entirley sure yet about the concept of permissions and limiting views based on credentials etc. however, the abilit yto fully integrate with dnn users I'm really not sure about.

Does anyone have any experience or advice on how to best approach the scenario I'm trying to implement? It seems like this would be a very common thing but like most folks that have looked it doesn't seem as if there is a good dnn appointment soltuion out there.
Peter
Telerik team
 answered on 18 Feb 2009
2 answers
115 views
Hi Guys

I have an issue with the combobox only in IE7.

I have 2 combos on a page ,one of the combos sits in the MasterPage and the the other sits in a sub page.
The problem is that SelectedIndexChanged event does not fire for the combo on the subpage, but this only happens in IE7.
The event fires in FF and chrome. The combos have been setup the same way.

The combo in the masterpage fires events no problem in all browsers.I have one script manager in the master page.
 
I am using Version=2008.3.1125.20

Any help would be great!

Darren
Top achievements
Rank 1
 answered on 18 Feb 2009
7 answers
366 views
I am dragging and droping nodes between two telerik treeviews.  I notice when I hover over an item in the dropping treeview it highlights the node where i want to drop.  Is there a way to indicate to the user when they move the dragged node over top of the white area to show a circle with a slash through it like Visual studio does when droping controls on to the design for an area that you are not allowed to drop an item onto?

Yana
Telerik team
 answered on 18 Feb 2009
1 answer
137 views


Hello All,

                I am using a auto complete rad combo box to display the data .I want that the combo box should show "SELECT" as the default value but I am not able to do with Rad Combo Box.Please anyone can help me with this.The Rad Combo Box is not showing anything,it is blank.

As in simple combo box we can give the selected value but in this Rad Combo Box there is no such property as Selected Value.
I am stuck up with this problem.



Thank You in Advance
Regards,
Ritzie
Princy
Top achievements
Rank 2
 answered on 18 Feb 2009
0 answers
99 views
I am dragging items between the nodes. I am getting the error if i swap two nodes on the same level. could any one help me. The sample code is here. I have tested with 3 levels of nodes

 

 
    <script language="javascript" type="text/javascript">  
 
                function onNodeDropping(sender, args)  
                {             
                    var dest = args.get_destNode();  
                    if (dest)  
                    {   
                            clientSideEdit(sender, args);  
                            args.set_cancel(true);  
                            return;  
                      
                        //dropOnTree(args);  
                    }  
                    else  
                    {   
                        dropOnHtmlElement(args);  
                    }  
                }  
                  
      
                function clientSideEdit(sender, args)  
                {  
                    if(isValidDrop(sender,args)==false)  
                    {  
                        args.set_cancel(true);  
                          
                        return;  
                    }     
var destinationNode = args.get_destNode();                      
    if(destinationNode)     
    {                    
        var firstTreeView = $find('trvOne');     
        var secondTreeView = $find('trvOne');     
         
        firstTreeView.trackChanges();     
       // secondTreeView.trackChanges();     
        var sourceNodes = args.get_sourceNodes();     
          
            var sourceNode = sourceNodes[0];     
            sourceNode.get_parent().get_nodes().remove(sourceNode);                          
                 
            //if(args.get_dropPosition() == "over") destinationNode.get_nodes().add(sourceNode);                                                           
            //if(args.get_dropPosition() == "above")  insertBefore(destinationNode, sourceNode);     
            //if(args.get_dropPosition() == "below")  insertAfter(destinationNode, sourceNode);     
            insertBefore(destinationNode, sourceNode);    
            //sourceNode.clone();  
 
        destinationNode.set_expanded(true);     
 
        firstTreeView.commitChanges();     
        //secondTreeView.commitChanges();     
    }     
 
                }  
                  
                function insertBefore(destinationNode, sourceNode)  
                {  
                    var destinationParent = destinationNode.get_parent();  
                    var index = destinationParent.get_nodes().indexOf(destinationNode);  
                    destinationParent.get_nodes().insert(index, sourceNode);  
                }  
                  
                function insertAfter(destinationNode, sourceNode)  
                {  
                    var destinationParent = destinationNode.get_parent();  
                    var index = destinationParent.get_nodes().indexOf(destinationNode);  
                    destinationParent.get_nodes().insert(index+1, sourceNode);  
                }                 
 
                  
                function isValidDrop(sender, args)  
                {  
                  
                    var tree = $find('trvOne');  
                    var sourceNode = args.get_sourceNode();  
                    var destinationNode = args.get_destNode();        
                      
                    var sourceNodeLevel;  
                    var destinationNodeLevel;  
                    sourceNodeLevel=getNodeLevel(sourceNode);  
                    destinationNodeLevel=getNodeLevel(destinationNode);  
                      
                    if(sourceNodeLevel==destinationNodeLevel)  
                        return true;  
                    else      
                        return false;  
                    /*                
                    if(!sourceNode.get_parent())  
                    {  
                        args.set_cancel(true);  
                        tree._clearDrag();  
                        return false;  
                    }  
                    if(sourceNode.get_parent() && !(sourceNode.get_parent().get_parent()))  
                    {  
                        args.set_cancel(true);  
                        tree._clearDrag();  
                        return false;  
                    }  
                    if(sourceNode.get_parent() && sourceNode.get_parent().get_parent() && !(sourceNode.get_parent().get_parent().get_parent()))  
                    {  
                        args.set_cancel(true);  
                        tree._clearDrag();  
                        return false;  
                    }  
                    */  
                      
                }  
                  
                  
                function getNodeLevel(node)  
                {  
                    var FirstParent;  
                    var SecondParent;  
                    var ThirdParent;  
                      
                    var Level;  
                      
                    FirstParent=node.get_parent();  
                    if(FirstParent)  
                        SecondParent=FirstParent.get_parent();  
                    if(SecondParent)  
                        ThirdParent=SecondParent.get_parent();  
                      
                    if(ThirdParent)  
                        Level=3;  
                    else if(SecondParent)  
                        Level=2;  
                    else if(FirstParent)  
                        Level=1;  
 
                                  
                    return Level;  
                      
                }  
                  
                function dropOnHtmlElement(args)  
                {                     
                    var target = args.get_htmlElement();  
                      
                    if (target.tagName == "SELECT" && target.id=='lstShortCut')  
                    {  
                  
                        if(getNodeLevel(args.get_sourceNode())!=3)  
                        {  
                            args.set_cancel(true);  
                            return;  
                        }  
                              
                        target.style.cursor = "default";  
                        //target.value = args.get_sourceNode().get_text();        
                          
                        var sourceNodeValue=args.get_sourceNode().get_value();  
                        for(var i=0;i<target.options.length;i++)  
                        {  
                            if(target.options[i].value==sourceNodeValue)  
                            {  
                                args.set_cancel(true);  
                                return true;  
                            }  
                        }                         
                          
                        var newnewOpt = new Option( args.get_sourceNode().get_text(), args.get_sourceNode().get_value(), true, false);  
                        target.options[target.options.length] = newOpt;  
                      
                        args.set_cancel(true);  
                        return true;  
                    }                                     
                }  
                  
                  
                  
              
 
    </script> 
 
 
<radT:RadAjaxManager ID="RadAjaxManager1" runat="server">  
                                                    <AjaxSettings> 
                                                            <radT:AjaxSetting AjaxControlID="trvOne">  
                                                                <UpdatedControls> 
                                                                    <radT:AjaxUpdatedControl ControlID="trvOne" /> 
                                                                </UpdatedControls> 
                                                            </radT:AjaxSetting> 
                                                        </AjaxSettings> 
                                                    </radT:RadAjaxManager> 
                                        <radT:RadTreeView ID="trvOne" runat="server"   
                                            EnableViewState="true" SingleExpandPath="true" EnableDragAndDrop="true" OnClientNodeDropping="onNodeDropping"   Height="350px">  
 

 

 

 

 

 

Heamraj
Top achievements
Rank 1
 asked on 18 Feb 2009
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?