Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
149 views
Hi, I need to access the components in the edit template of my grid in the Javascript. I saw the code below in a example in the forum, but it's not working for me. My Code:

Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated
        If (TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode) Then
            Dim script As String

            Session("inEdit") = True
            rdcbTipo1 = CType(CType(e.Item, GridEditableItem).FindControl("rdcbTipoFonte1"), RadComboBox)
            rdcbTipo1.AutoPostBack = True
            script = "client_rdcbTipo1=" & rdcbTipo1.ClientID & ";\n"
            Page.ClientScript.RegisterStartupScript(Me.GetType, "clientID", script)
           
            >>>> I tried also : RadAjaxManager1.ResponseScripts.Add(script)
        End If
End Sub

I'm using a master page, where I put >>> var client_rdcbTipo1;

In the javascript the client_rdcbTipo1 is undefined. Is there any problem with my code? How I could access the components of my edit template?

Thanks in advance,

Simón de Lizarza
Princy
Top achievements
Rank 2
 answered on 06 Feb 2009
3 answers
127 views
Some of my tooltips have tool tips which make the original tooltip dissappear. How do I keep the original tooltip visible while the second tooltip is up?

Thanks.
Tervel
Telerik team
 answered on 06 Feb 2009
5 answers
152 views
Is it possible to get the combobox to filter on server, instead of client?
Francois MARTIN
Top achievements
Rank 2
 answered on 06 Feb 2009
1 answer
95 views
Hi,

I'm just wondering if we can set the MinorTickCount to a value other than None, One, Three, and Eight? Most intervals between major ticks are a multiple of 5, 10, 20, 100, 1000 and so on giving a much reasonable value of 5 for the minor tick count.

Is this a limitation of the RadChart control? Why having only an interval of 1, 3 and 8?

Thanks,

Ely
Vladimir Milev
Telerik team
 answered on 06 Feb 2009
4 answers
172 views
What is the equivalent of the following code which does exactly what i want with the standard GridView?
<div runat="server" ID='<%# String.Concat("div", CType(Container, GridViewRow).RowIndex %>'
' content here 
</div> 

However it's a bit confusing when you work with the RadGrid.

Thanks in advance
Princy
Top achievements
Rank 2
 answered on 06 Feb 2009
1 answer
150 views
I have a grid with a master and detail table.  The master table has several rows.  When I click a row to expand the detail table, in the ItemDataBound Event I have some code that populates a dropdown in the detail table, as below

if ("ArtistCategories".Equals(e.Item.OwnerTableView.Name))  
            {  
                if (e.Item is GridEditableItem && e.Item.IsInEditMode)  
                {  
 
                    GridDataItem dataitem = e.Item.OwnerTableView.ParentItem;  
                    Hashtable values = new Hashtable();  
                    dataitem.ExtractValues(values);  
                    object Objgenre = values["Genre"];    
 
                      
                    GridEditableItem _item = (GridEditableItem)e.Item;  
                    Telerik.Web.UI.RadComboBox cb = (Telerik.Web.UI.RadComboBox)_item["ArtistCategory"].FindControl("RadComboBoxCategories");  
 
                    string genre = Objgenre.ToString();  
                    cb.DataSource = lookupmanager.CategoryByGenre(genre, this.RadComboBoxType.SelectedValue);  
                    cb.DataTextField = "Category";  
                    cb.DataValueField = "Category";  
                    cb.DataBind();  
 
                    try  
                    {  
                        Studio1DBObjects.SecondaryCategory sg = (Studio1DBObjects.SecondaryCategory)e.Item.DataItem;  
                        string category = sg.Category;  
                        int index = cb.FindItemIndexByValue(category);  
                        cb.SelectedIndex = index;  
                    }  
                    catch (Exception ex)  
                    {  
                        //  
                    }  
 
                }  
            } 

The contents of the drop down are determined by 2 values, a 'type' which is a drop down on the main page, and 'genre' which is a column in the master table in the grid.  After searching the forums, the only method I could find to obtain this value from the master table is by using a hashtable, like so

Hashtable values = new Hashtable();  
                    dataitem.ExtractValues(values);  
                    object Objgenre = values["Genre"];  

After stepping through the code, the hash table is always empty (its count is zero), yet the master table has data.  How Can I obtain the data I need from the selected row in the master table ??  Is there another way ?
Princy
Top achievements
Rank 2
 answered on 06 Feb 2009
2 answers
185 views
Hi This may be a very stupid question but can you please help me with this? I am using simple drag & drop between two treeview controls example, however I don't want to remove the source node. I have tried removing this line "sourceNode.Owner.Nodes.Remove(sourceNode)" from the code but it still seems to remove the source node when some one drag it to the second treeview.
Can some one please help?

Thanks
Atiq        
Atanas Korchev
Telerik team
 answered on 06 Feb 2009
1 answer
67 views
Hi everybody

I've been trying to update a RadGrid (with ajax) that is inside of a Tab (The RadTab has 3 tabs), the object that fires the update is a RadComboBox (with the SelectedIndexChanged method) inside of another Tab, but I can't. Some tips please. Thanks.
Shinu
Top achievements
Rank 2
 answered on 06 Feb 2009
6 answers
218 views
I have a grid that when in edit and insert mode uses a FromTemplate.  In that template I want to have a tree view that has checkboxes.  The items will load from a SQL data source, but how do I take a column when in edit mode and check the appropriate boxes based on an array item.

My database column is named "banned_sources" and will have a value like so:

Either "0" for no banned sources, or a string like "5,61,64,91,137,139,161"

The numbers in the array match the "source_id" of my datasource.  How do select the matches in my tree view if they are present in the array?

ASPX code:
<td> 
            Banned Lead Sources:</td> 
        <td> 
            <asp:SqlDataSource ID="sqlds_affiliates" runat="server"  
                ConnectionString="<%$ ConnectionStrings:Master_ConnectionString %>"  
                SelectCommand="SELECT [source_id], (CAST([source_id] AS VarChar) + '  ' + [affiliate_name]) AS AffiliateName FROM [lead_affiliates] ORDER BY [source_id]"
            </asp:SqlDataSource> 
<telerik:RadTreeView ID="tree_banned_sources" Runat="server"  
                AppendDataBoundItems="True" CheckBoxes="True"  
                DataSourceID="sqlds_affiliates" DataTextField="AffiliateName"  
                DataValueField="source_id" MultipleSelect="True"
                <CollapseAnimation Duration="100" Type="OutQuint" /> 
                <ExpandAnimation Duration="100" /> 
            </telerik:RadTreeView> 
        </td> 

Shinu
Top achievements
Rank 2
 answered on 06 Feb 2009
1 answer
97 views
I've got a grid with 5 columns. 

First column has a document type name in it. 

The last column has a button to allow you to update the version of the file on the server.

I've tried a handful of different things to be able to get the button clicked and actually get the value of the document type column for the row the button is clicked on.

(I am not pasting code for a specific reason right now.  Just too many internal pieces of information for my client and they'd be frustrated if I posted details of their project.  Also, I've not finished with my workaround yet, so I figure best to just ask the simple question and then correct the code when it's done.)

What I'm currently in the process of doing:

Creating an ImageButton imbedded in a gridtemplatecolumn. 
Set the DataValue of the gridtemplatecolumn to the name object from the table.
Set the AlternateText value to the Imagebutton to eval from the datavalue.
On the fire event, parse the AlternateText value to get the argument to send to the file upload page with the document type.

Any ideas as to whether that will actually work?
I know it's a cheat, but how do I do it without kludging it.

I'm down to just a few minor features and a few bug fixes to get this out the door.

Thanks.

Paul
Princy
Top achievements
Rank 2
 answered on 06 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?