Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
139 views
Hello,

      I have several input text on a form . All of them I can use inside a
      javascript thru the $find function.  Unfortunately, controls that
      I have inside a usercontrol are not accessible .

      How can I access this user control inserted on my form ?

      Here is what I have.

      <%@ Register src="../item.ascx" tagname="item" tagprefix="user" %>

      <user:item id="useritem" runat=server  />

      <telerik:radtextbox id="phone" runat="server" />

      <script type="text/javascript">
          var phone = $find("%= phone.ClientID");  //..... this one works
          var user   =  $find("%= user.ClientID");  // ... does not work user is inside the useritem control.

     </script>

      I am using version 2009.2.831  (the last update)

      Thanks
Joao, 
Joao Araujo
Top achievements
Rank 1
 answered on 10 Sep 2009
2 answers
91 views
When my radgrid loads I want my GridClientSelectColumn already selected. I need to have all rows selected from the start. How do I do that in VB.Net?
Mark
Top achievements
Rank 1
 answered on 10 Sep 2009
8 answers
1.3K+ views
Hello,

I get this after an exception in an ajax callback (using RadAjaxManager) when I try to redirect to an error page using
Ajax redirect.
My code
            if ( IsInAsyncPostBack && ( AjaxManager != null ) )  
            {  
                if ( url.StartsWith("~/") )  
                    url     =   ResolveClientUrl(url);  
                AjaxManager.Redirect(url);  
            }  
            else  
                Response.Redirect(url,endResponse);  
 

May be ajaxmanager should not get Page.Response but HttpContext.Current.Response ?

May be the idea of redirecting using ajax during a call back is bad ?
In this case how to incorporate ajax in my general errors manager which redirects to a standard error page.


Thanks for help
CS
Mira
Telerik team
 answered on 10 Sep 2009
1 answer
48 views
hi
i upgraded my telerik version from 2008 to 2009.2 sp1

but my datagrid office2007 skin and anothers skins has some changes

colors, sizes , borders , grouping panel color ...

plz visit this picture:

http://img14.imageshack.us/i/theme2l.jpg/

Dimo
Telerik team
 answered on 10 Sep 2009
1 answer
177 views
Hi All,

Dynamically,I created RadDock and added an html table of 2 cells with 50% width for each.In the first cell i addel an asp.net label and asp.net textbox in the second one with100% width for each control.
In the default masterpage of sharepoint,it works fine while in another masterpage(inside sharepoint like BlueBand.master or customized one) the textbox right border becomes outside the raddock.It seems that it adds the default padding and border-width to its width because if i remove the padding and put the border width 0px then i see that the textbox becomes in the RadDock Content.
But I need the borders and the padding,also i can't put the textbox width 99% or 98%.

Is this behavior of textbox inside the RadDock an normal behavior ?

Any Help is really appreciated. 

Regards,
Ahmad
Pero
Telerik team
 answered on 10 Sep 2009
3 answers
145 views
I have XP Pro, SP3, Visual Studio 2008, SP1, IE 8, Current release of Telerik

When Child Items are initially displayed, as expected, all items are left aligned, having the same width.

When I roll the mouse over the top level parent:
- The width of both the parent and child menu items increase by about 9 pixels and overflows out of the containing
   "div" tag.

When I roll the mouse over a child menu item, its width expands another 9 pixes on the left giving the width of the child menu item being approximately 9 pixels larger than all other child menu items.

BTW, you have a very nice product. Just bought this a coupl of days ago.
  
Paul
Telerik team
 answered on 10 Sep 2009
1 answer
146 views
I have a Listbox on my page which I add RadListBoxitems to on page.load , however when I try read these items from a button.click event they disappear. I can add the items back on page.load but this wont solve the problem as the items the user selected are lost. I guess this is more of an ASP.NET issue but I am stumped as to how I should solve it (I enabled viewstate and presistclientchanges but with no luck).

aspx code:
 <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
        </telerik:RadScriptManager> 
        <telerik:RadListBox ID="RadListBox1" runat="server" Style="left: 0px; top: 0px" EnableViewState="true" 
            ButtonSettings-ShowTransferAll="False" CheckBoxes="True"
            <ButtonSettings ShowTransferAll="False" /> 
        </telerik:RadListBox> 
        <asp:Button ID="submitBtn" runat="server" Text="Submit" /> 

code behind:
  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 
        If Not Page.IsPostBack Then 
            populateUserListing() 
 
        End If 
    End Sub 
 
    Protected Sub submitBtn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles submitBtn.Click 
          
        For i As Integer = 0 To RadListBox1.Items.Count - 1 
            If RadListBox1.Items(i).Checked Then 
                'do actions here 
            End If 
        Next 
          
  
    End Sub 
 
 
    Sub populateUserListing() 
  
        For i As Integer = 0 To item.Count - 1 
            Dim dummyListItem As New RadListBoxItem("xxx", "xxx") 
            RadListBox1.Items.Add(dummyListItem) 
  
        Next 
 
    End Sub 

Thanks



Genady Sergeev
Telerik team
 answered on 10 Sep 2009
1 answer
105 views
Hello,

I'm not sure if this question has been asked before, but anyway;

I have an ObjectDataSource that I want to bind to a Grid. The objects in the data source has one property that is a list, and I would like all of the items in that list to become their own columns. Lets pretend it looks like this:

public class Foo
{
   public int Id { get; set; }
   public string X { get; set; }
   public List<Bar> Bars { get; set; }
}

public class Bar
{
   public int Id { get; set; }
   public string Y { get; set; }
}

If my data source has a collection of Foo objects, can I make the grid show columns for the following values?
Foo.Id, Foo.X, Foo.Bars[0].Y, Foo.Bars[1].Y, ..., Foo.Bars[n].Y

Thanks a lot!
Tsvetoslav
Telerik team
 answered on 10 Sep 2009
5 answers
165 views
Okay,

What I'm trying to do is this ... I'm trying to create a radpanel dynamically depending on the data, but when the user hovers on the second level items, I'm trying to show some imagebuttons that allow the user to quickly perform operations on that item.

So, here's the panel before the user hovers:

Category A (open)
- Item 1
- Item 2
- Item 3
Category B (closed until clicked 'FullExpandItem')

When a user hovers over Item 1 - show this:

Category A (still open)
- Item 1        +  X
- Item 2
- Item 3
Category B (still closed)

An item template that I'll need is something like this:
<ItemTemplate> 
<div class="floatbox" onmouseout="onMouseOut(this)" onmouseover="onMouseOver(this)"
   <%# Eval("Text") %> 
   <asp:ImageButton ID="addImgBtn" runat="server" OnPreRender="addImgBtn_PreRender" title='<%# Eval("ID") %>' ImageUrl="~/Images/Add.png" style="display:none; visibility: hidden;" /> 
   <asp:ImageButton ID="openImgBtn" runat="server" OnPreRender="openImgBtn_PreRender" title='<%# Eval("ID") %>' ImageUrl="~/Images/Open.png" style="display:none; visibility: hidden;" /> 
</div> 
<ItemTemplate> 

the code for one of the image buttons does this: (right now, i'm just alerting what the ID is and the command, but I will be opening a radwindow to a page and set the ID=whatever in the querystring so I can dynamically show the data for that specific item.
Protected Sub addItemBtn_PreRender(ByVal sender As ObjectByVal e As EventArgs) 
        Dim addItemBtn As ImageButton = CType(sender, ImageButton) 
        If addItemBtn IsNot Nothing Then 
            addItemBtn.Attributes("onclick") = "alert('add: " & addItemBtn.Attributes("title") & "'); return false;" 
        End If 
    End Sub 

with the following javascript:
function onMouseOut(lblCtrl) { 
            if (lblCtrl !== null) { 
                if (lblCtrl.children.length > 2) { 
                    for (i = 1; i < lblCtrl.children.length; i++) 
                    { 
                        var imgCtrl = lblCtrl.children[i]; 
                        if (imgCtrl !== null) { 
                            imgCtrl.style.display = 'none'
                            imgCtrl.style.visibility = 'hidden'
                        } 
                    } 
                } 
            } 
        } 
        function onMouseOver(lblCtrl) { 
            if (lblCtrl !== null) { 
                if (lblCtrl.children.length > 2) { 
                    for (i = 1; i < lblCtrl.children.length; i++) 
                    { 
                        var imgCtrl = lblCtrl.children[i]; 
                        if (imgCtrl !== null) { 
                            imgCtrl.style.display = 'block'
                            imgCtrl.style.visibility = ''
                        } 
                    } 
                } 
            } 
        } 

Curious thing happens if I set that to the item template though - my items (the ones that have that inline hover menu) appear for every item (obviously, since there is no checking for which level (level = 1)) but that the regular databound items ALSO get put there.

What's a potentially correct way to go about this? I simply want to be able to specify what is in the second level items so I can put my inline hover menu there.

Help!
Kori
Yana
Telerik team
 answered on 10 Sep 2009
2 answers
114 views
I want to dynamic to create a RadListbox with javascript , just like follows:

//for example: 
var oListBox = CreateListBox(); 
body.append(oListBox); 


Or how can I dynamic to get the RadListBox id in client side ?

for example , I have 10 RadListBox controls in the page, and their id is "listbox1, listbox2,listbox3...." , I want to loop these RadListbox,   I cannot use $find() , because my RadListBox are in the masterpage(or usercontrol page) , how can I do that ?

thanks!
Winson qiu
Top achievements
Rank 1
 answered on 10 Sep 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?