Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
661 views
How do I had a RadTextBox via JavaScript?
Princy
Top achievements
Rank 2
 answered on 03 Nov 2011
1 answer
136 views
I am using RadGrid and GridCheckboxColumn. I would like to know if instead of headertext I can give a small checkbox and wire up to a Javascript which would do select all/unselect all.

Can some one guide me please?
Princy
Top achievements
Rank 2
 answered on 03 Nov 2011
1 answer
110 views
I feel sure this is very straightforward but I am just not getting it.

I have a grid column and code behind as a test approach like this:

<telerik:GridTemplateColumn DataField="Category" HeaderText="CatID" 
            SortExpression="Category" UniqueName="Category">
            <EditItemTemplate>
                  
                <telerik:RadComboBox ID="RadComboBox1" Runat="server">
                </telerik:RadComboBox>
                  
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="CategoryLabel" runat="server" Text='<%# Eval("Category") %>'></asp:Label>
            </ItemTemplate>
            <HeaderStyle Width="150px" />
        </telerik:GridTemplateColumn>
  
  
Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs)
        If (TypeOf e.Item Is GridEditableItem) AndAlso (e.Item.IsInEditMode) Then
            Dim edititem As GridEditableItem = DirectCast(e.Item, GridEditableItem)
            Dim RCB1 As RadComboBox = DirectCast(edititem("Category").Controls(0), RadComboBox)
  
            Dim item1 As New RadComboBoxItem()
            item1.Text = "BibleStudy"
            item1.Value = "Bible Study"
            RCB1.Items.Add(item1)
  
        End If
  
    End Sub

But the item does not show up in the combo box, and there are no error messages. 

What am I doing wrong?

Thanks for some pointers...

Clive
Shinu
Top achievements
Rank 2
 answered on 03 Nov 2011
1 answer
133 views
I am trying to add Dropdownlist to each row of a radGrid in the ItemTemplate dynamically. So basically when the radGrid loads I want to add DropDOwnList to each row and add certain data to it based on the id created. How would I go about doing that?


Thanks!
Shinu
Top achievements
Rank 2
 answered on 03 Nov 2011
1 answer
72 views
Can I retreive the value used for the aggregate and place it inside of a literal?  I would like to display the aggregate on a another place in the page.  Thanks
Princy
Top achievements
Rank 2
 answered on 03 Nov 2011
3 answers
139 views
Hello,

I would like to know if it is possible to create "one-way" ajax request?

Example of the scenario:
By clicking a button, web page send an email... there is no GUI changes on the page.

Currently I use RadAjaxManager with following syntax:
manager.AjaxSettings.AddAjaxSetting(btnSendEmail, btnSendEmail);

As you can see, in order to AddAjaxSetting, I need to specify AjaxTrigger control and AjaxifiedCntrol (in this case they are the same controls).

But I was wondering if I could only specify AjaxTrigger control, without specifying a control that is being updated?

I'm looking to improve page responsiveness to "one-way" ajax requests...
Valera
Top achievements
Rank 1
 answered on 02 Nov 2011
1 answer
88 views
Based on sample application given by Telerik team i prepared one sample application using vs2008.And this working well in vs2008.But when i tried to develop using vs 2010,container events are not firing.I used same code which one is working in vs 2008.But giving Problam in vs 2011.First time when we start application only one control is calling.when i tried to update an Item,Container not firing.Can any one Help me pleasethanks in advance.
Peter
Telerik team
 answered on 02 Nov 2011
5 answers
193 views
Hello,

If a GridClientSelectColumn column is included in a RadGrid that is bound client side, and the number of rows bound on the client exceeds the initial PageSize value, the check boxes are rendered in that column for the additional rows using a naming convention for the ids that can cause conflicts if multiple grids are included on the page and are bound in the same manner.  The problem is compounded if RadFormDecorator is used after data binding to ensure that the new check boxes have a style that is consistent with the other controls on the page, in that clicking a check box on one grid may result in the check box of the same ordinal row of another grid to be checked, instead, because they share the same id.

Specifically, the naming convention used for the ids of the new check boxes is "[row number]_SelectCheckBox" which means that two grids that have both bound data client side may each have check boxes with the same id.  The rendered id should include another component, such as the id of the grid, itself, to ensure the uniqueness of the id of each check box.

To replicate this issue, add two RadGrid controls to a page and include a GridClientSelectColumn in each.  Set the "PageSize" to 1 to minimize the amount of unnecessary HTML rendered on the server and transmitted to the client, and set "AllowPaging" to false.  Now, include logic to bind data to each of these grids, client side, where the number of items bound is greater than one.  View the IDs of the rendered check boxes using something like FireBug and note that the ids of new check boxes are the same in both grids.

To exacerbate the example, set "AllowScroll" to true and "ScrollHeight" to 200px, bind 100 rows to each grid client side (simulating a list box, effectively), and then call RadFormDecorator's decorate client method, passing the grid's element as the element parameter.  As a user of the page, don't touch the first grid, but instead scroll to the bottom of the second grid and click a check box.  What you will encounter is that after clicking the check box the screen scrolls down REALLY FAR to where the check box of the same id in the first grid resides, but which is not visible since the clipping overflow is hidden.  If you then go back to the first grid and scroll to the bottom of the list, you will find that the last check box of the first grid is now checked, while the check box you attempted to check in the second grid is not checked.

Please note that I don't want to set the initial "PageSize" arbitrarily high as a work around, because that will render too much HTML initially.  I am using several RadGrid controls on a single page as list boxes, since the client side API of RadGrid is so beautifully robust and flexible allowing me to do some really nice things that would be very challenging to do with RadListBox.  I'm sure I can get around the issue by rendering my own check boxes in a template column and forcing a special "check all" check box to be rendered in the header cell for that column, but I would like to avoid that hassle if possible.
Bradford
Top achievements
Rank 2
 answered on 02 Nov 2011
6 answers
251 views
Hello,
I need to make the AccessKey cause a click event on the tab associated with the key.  It does put a focus line around the tab, but it doesn't appear that any of the events fire for that.  I currently have to then hit the Enter key to cause a click event to occur.  How can I accomplish this using the RadTabStrip client API without resorting to some global keyboard code to catch the AccessKeys?  My current code is below (sorry, but the Format Code Block button put in some extra stuff).  I am using Q2 2011 sp1.  Thanks!
Michael

<P><script language="javascript" type="text/javascript"><BR
function mainTabSelected(sender, args) {<BR>    var tab =
eventArgs.get_tab();<BR>    tab.click();<BR
}<BR></script></P>
<P><telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0"
AutoPostBack="true" CausesValidation="false" ClickSelectedTab="true"
OnClientTabSelected="mainTabSelected"><BR
<Tabs><BR>    <telerik:RadTab ID="TabCampaignSetup"
Value="CampaignEdit" Text="<u>C</u>ampaign Setup" runat="server"
AccessKey="C" SelectedIndex="0"  /><BR>   
<telerik:RadTab ID="TabMassSubscription" Value="CampaignMassSubscriptions"
Text="<u>A</u>dd Subscriptions" runat="server" AccessKey="A"
SelectedIndex="1" /><BR>    <telerik:RadTab
ID="TabRemoveSubscriptions" Value="CampaignRemoveSubscriptions"
Text="<u>S</u>ubscriptions" runat="server" AccessKey="S"
SelectedIndex="2" /><BR>    <telerik:RadTab
ID="TabContactHistory" Value="CampaignContactHistory"
Text="C<u>o</u>ntacts" runat="server" AccessKey="O"
SelectedIndex="4" /><BR>    <telerik:RadTab
ID="TabCampaignHistory" Value="CampaignHistory"
Text="<u>H</u>istory" runat="server" AccessKey="H" SelectedIndex="3"
/><BR>  </Tabs><BR></telerik:RadTabStrip><BR></P>
Michael
Top achievements
Rank 1
 answered on 02 Nov 2011
5 answers
121 views
Hi,

Background:
in my asp.net 4.0 app (ajaxified) I reload content of tree on every postback.

Scenario:
2 users load same tree. First two items are ItemA and ItemB, so, user1 right clicks and deletes ItemA, his view is refreshed and he can see that there is no more ItemA. User2 thinks that he doesn't like ItemA he sees (in his already outdated view), right clicks -> Delete and instead of deleting nonexistent ItemA, ItemB gets deleted, because underneath tree was reloaded in Page_Load and context menu's index remained same, but node changed.

I get referenced node id to delete in
protected void tvProjectElements_ContextMenuItemClick(object sender, RadTreeViewContextMenuEventArgs e) {    }
from e.Node.Value

Suggestion:
Maybe for current (or in general) use case context menus should reference to nodes not by index, but by some internal "node-context menu (item) key"? Or this could be configurable, like setting custom key (most likely same as using custom attributes) or fetch node's DataValueField, anyway, to make them correspond to each other.

Possible workaround:
When I will get back to solving this issue, probably I will give a try to fix this using custom attributes (e.MenuItem.Attributes), setting those in data bound event for each nodes' context menu and checking in ContextMenuItemClick by comparing to e.Node.Value value.

Thanks :)
Plamen
Telerik team
 answered on 02 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?