Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
154 views
 For Each itemcollection As GridDataItem In gvUserJobMapping.Items


            If itemcollection.OwnerTableView.Name = "gvUserJobMapping" Then

            End If


Next


I want to iterate my gridviewrows and how can i access my first column value field in my grid. Because I want to iterate all the rows and keep those values in the arraylist.
Princy
Top achievements
Rank 2
 answered on 12 Jan 2011
0 answers
118 views
I am having Country,Population,website textboxes and States dropdowns in a webform.
I am saving those details into database.
And I am populating Country as parent node and States as child nodes of radtreeview.
On Nodeclick event of the Country I have to populate the population , Country , Website and the relevant States.

I tried using DataValueFied and DataTextField.
I am getting value in e.Node.Text and I am not getting anything in e. Node.Value.

Can you please provide me some sample example for this scenario?

Thanks
Sreedhar Ambati
sreedhar ambati
Top achievements
Rank 1
 asked on 12 Jan 2011
5 answers
351 views
I have switched from a singe page display to a radtabstrip with dynamically created tabs linked to radpageviews.  Outside of all of this is a radtoolbar with controls that I need to control the currently opened radpageview.

Previously I had something like this in javascript:
function DefaultRadToolBarClick(sender, args)
            {
                var button = args.get_item().get_value();
                document.getElementById("txtAction").value = button;
                switch (button)
                {
                    case "tbrRunQuery" :
                        if ( window.frames(0).document.getElementById("loadingDiv")!= null)
                        {
                            window.frames[0].showLoading(true);
                        }
                        window.frames(0).document.getElementById("txtAction").innerText = button;
                        window.frames(0).document.forms(0).submit() ;
                        window.frames(0).document.getElementById("txtAction").innerText = "" ;
                        break ;
...

What would I replace the window.frames(0).document with to get the currently open radpageview?

Here is the HTML of the pane containing the tabs and pageviews:
<telerik:RadPane ID="DefaultRadPaneCont" runat="server">
<div class="content">
<telerik:RadTabStrip ID="DefaultRadTabStrip" align="left" Width="100%" runat="server" Skin="Office2007" MultiPageID="DefaultRadMultiPage">
<TabTemplate
<div class="textWrapper">
<%#DataBinder.Eval(Container, "Text")%> 
<img style="margin-left: 5px; margin-top: 5px" src="Images/delete.gif" alt="delete" onclick="deleteTab('<%# DataBinder.Eval(Container, "Text") %>')" /> 
</div>
</TabTemplate
</telerik:RadTabStrip>
<telerik:RadMultiPage ID="DefaultRadMultiPage" runat="server">
</telerik:RadMultiPage>
 </div>
</telerik:RadPane>


Kent
Top achievements
Rank 1
 answered on 12 Jan 2011
2 answers
100 views
my edit form type uses Template.
when i click on Add New Item the template opens in insert mode,

in each item i have a linkbutton templatecolumn called "Edit" when click on it i run the code below to open the template in edit mode.
GridDataItem gdi = (GridDataItem)LinkButton1.Parent.Parent;
RadGrid1.Items[gdi.ItemIndex].Edit = true;
RadGrid1.Rebind();

If the Edit link is clicked while the template is opened in Insert Mode i get error.

Any idea how to avoid this problem?
thanks in advance
sf
Top achievements
Rank 1
 answered on 12 Jan 2011
0 answers
136 views
I am having an issue with the text in the ToolBarButton. It overflow over the boundaries of the ToolBarButton. Please see the link below to download the code.
http://cid-396be546f23b9132.office.live.com/self.aspx/Public/code.zip
Thanks,
Jason


J
Top achievements
Rank 1
 asked on 12 Jan 2011
1 answer
100 views
Hi,

I am using RadGrid within a usercontrol sitting inside a SharePoint webpart. All my other functionalitites are working fine, but I am having issues when once I scroll through couple of pages in the grid and then try to hit filter button I get an error 'null' is null or not an object. Below is my RadGrid within a user control, any help will be greatly appreciated as I don't want to give a buggy UI to my clients:

 

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
  
        <script type="text/javascript">
            function GetSelectedItems() {
                alert($find("<%= grdAllContacts.MasterTableView.ClientID %>").get_selectedItems().length);
            }
        </script>
  
    </telerik:RadCodeBlock>
  
<br />
<!-- content start -->
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
                <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="grdAllContacts" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>      
                    <telerik:AjaxSetting AjaxControlID="grdAllContacts">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="grdAllContacts" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>
            <asp:Button ID="Button2" CssClass="button" Text="Get Selected Items Count" OnClientClick="GetSelectedItems(); return false;" runat="server" />
<br />
            <telerik:RadGrid ID="grdAllContacts" Width="97%" 
             AllowPaging="True" PageSize="20" runat="server" ShowGroupPanel="false"
             OnNeedDataSource="grdAllContacts_NeedDataSource" GridLines="None"  AutoGenerateColumns="false" AllowMultiRowSelection="true">
                
              <PagerStyle Mode="NextPrev" />                
              <GroupHeaderItemStyle BorderColor="Black" Font-Bold="true"></GroupHeaderItemStyle>
  
                 <MasterTableView Width="100%" GroupLoadMode="Server" TableLayout="Fixed" AllowPaging="True" PageSize="20" AllowFilteringByColumn="true">
                <GroupByExpressions>
                    <telerik:GridGroupByExpression>
                        <SelectFields>
                            <telerik:GridGroupByField FieldAlias="FamilyName" FieldName="FamilyName"></telerik:GridGroupByField>
                        </SelectFields>
                        <GroupByFields>
                            <telerik:GridGroupByField FieldName="FamilyName"></telerik:GridGroupByField>
                        </GroupByFields>
                    </telerik:GridGroupByExpression>
                </GroupByExpressions>
                 <Columns>
                 
                         <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" />
  
                    <telerik:GridBoundColumn SortExpression="FamilyName" HeaderText="Family Name" HeaderButtonType="TextButton"
                        DataField="FamilyName" HeaderStyle-HorizontalAlign="Center" Visible="false" AutoPostBackOnFilter="true">
                         <HeaderStyle Width="15%" />
                    </telerik:GridBoundColumn>
                     
                    <telerik:GridBoundColumn SortExpression="Context" HeaderText="Contact Type" HeaderButtonType="TextButton"
                        DataField="Context">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="OrganisationName" HeaderText="Organisation Name" HeaderButtonType="TextButton"
                        DataField="OrganisationName" >
                        <HeaderStyle Width="32%" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="RoleTitle" HeaderText="Role Title" HeaderButtonType="TextButton"
                        DataField="RoleTitle" >
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Phone" HeaderText="Phone"
                        HeaderButtonType="TextButton" DataField="Phone" >
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Mobile" HeaderText="Mobile"
                        HeaderButtonType="TextButton" DataField="Mobile">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Fax" HeaderText="Fax"  AutoPostBackOnFilter="true" 
                        HeaderButtonType="TextButton" DataField="Fax">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="ID" HeaderText="ID"
                        HeaderButtonType="TextButton" DataField="ID" Visible="false">
                    </telerik:GridBoundColumn>
                </Columns>
                  
            </MasterTableView>
            <ClientSettings AllowGroupExpandCollapse="True" ReorderColumnsOnClient="false" AllowDragToGroup="false" 
                AllowColumnsReorder="false" EnableRowHoverStyle="false">
                <Selecting AllowRowSelect="True" />
                  
            </ClientSettings>
              
            </telerik:RadGrid>
Kunal
Top achievements
Rank 1
 answered on 12 Jan 2011
2 answers
161 views
I am using a Filter control that is never bound to a grid or list view.  I have a set of fields that are passed into my user control, and I iterate over those fields to build the FieldEditor controls that I need in my Filter control.  This works well for all the standard FieldEditor types, (ie. boolean, numeric, text) However, I am having trouble populating the choices for editors of type RadFilterCustomEditors.RadFilterDropDownEditor  I am using the following code called from my user controls pre render event.

Dim choices As Dictionary(Of String, String) = New Dictionary(Of String, String)()
choices.Add(
"Yes", "Yes")
choices.Add(
"No", "No")

Dim field As RadFilterCustomEditors.RadFilterDropDownEditor = New RadFilterCustomEditors.RadFilterDropDownEditor()
field.DataSourceID = "????" 'What would go here?
field.DataValueField =
"Key"                       
field.DataTextField =
"Value"

QuestionFilter.FieldEditors.Add(field)
field.FieldName = question.Id                       
field.DisplayName = question.Description

obviously this is incomplete and doesn't work.  I have tried creating a FilterChoice object with a display and value property and binding a list of those to an objectdatasource, but ran into issues there with strings being in the wrong format, and that really isn't the best implementation anyway, so I have abandoned it for the time being.

So my question is in a nutshell, how do I build a list of choices, and bind it to a RadFilterCustomEditors.RadFilterDropDownEditor at run time without being tied to a grid?
Matthew
Top achievements
Rank 1
 answered on 11 Jan 2011
2 answers
108 views
Hello.  I am attempting to manually create toolbars for my editor.

Two questions:
1)  Is there a way to force a toolbar to the second row?  We are transitioning to the telerik editor, and I would like the buttons to be as similar to our old editor as possible.

2)  I am getting extra padding at the top of the editor - see attached screenshot.  Is there a way to clear that out?

Below is my code.    Thank you.

<telerik:radeditor runat="server" ID="radEditor" AllowScripts="false" OnClientCommandExecuting="OnClientCommandExecuting"  OnClientLoad="OnClientLoad" AutoResizeHeight=false  EnableResize="false" Skin="Vista"     DialogHandlerUrl="~/Telerik.Web.UI.DialogHandler.axd">
                                <Tools>
                                       <telerik:EditorToolGroup>
                                       <telerik:EditorTool Name="Print" />
                                       <telerik:EditorTool Name="Cut" />
                                       <telerik:EditorTool Name="Copy" />
                                       <telerik:EditorTool Name="Paste" />
                                       <telerik:EditorTool Name="Undo" />
                                       <telerik:EditorTool Name="Redo" />
                                       <telerik:EditorSeparator />
                                       <telerik:EditorTool Name="Bold" />
                                       <telerik:EditorTool Name="Italic" />
                                       <telerik:EditorTool Name="Underline" />
                                       <telerik:EditorTool Name="Strikethrough" />
                                       <telerik:EditorTool Name="Superscript" />
                                       <telerik:EditorTool Name="Subscript" />
                                       <telerik:EditorSeparator />
                                       <telerik:EditorTool Name="ImageManager" />
                                       <telerik:EditorTool Name="InsertLink" />
                                   </telerik:EditorToolGroup>
                                    <telerik:EditorToolGroup>
                                     <telerik:EditorTool Name="JustifyLeft" />
                                      <telerik:EditorTool Name="JustifyCenter" />
                                       <telerik:EditorTool Name="JustifyRight" />
                                        <telerik:EditorTool Name="JustifyFull" />
                                          
                                         <telerik:EditorSeparator />
                                           
                                         <telerik:EditorTool Name="InsertUnorderedList" />
                                         <telerik:EditorTool Name="InsertOrderedList" />
                                         <telerik:EditorTool Name="Indent" />
                                         <telerik:EditorTool Name="Outdent" />
                                     </telerik:EditorToolGroup>
                                </Tools>
                               </telerik:radeditor>
Angie
Top achievements
Rank 1
 answered on 11 Jan 2011
8 answers
320 views
hi my dear friends :
i am so confused for setting the width and height of DIV and FIELDSET inside A RadWindow....!?
when i browse my radwindow in firefox with this code :
setTimeout(function() { GetRadWindow().autoSize(true) }, 500); 
every thing is ok in ie 8 - but in firefox i have scrolls bars !

how can i remove them?

my width and height of div and fieldset are like :
    <style type="text/css"
        html, body, form 
        { 
            padding: 0; 
            margin: 0; 
            height: 100%; 
            background-color: #f2f2de; 
        } 
        fieldset 
        { 
            height: 581px; 
        } 
        * + html fieldset 
        { 
            height: 585px; 
            width: 840px; 
        } 
    </style> 

<div style="width: 850px; height: 600px;"


how can i fix this problem ?
Rusty
Top achievements
Rank 1
 answered on 11 Jan 2011
3 answers
109 views

I am having trouble accessing the value typed into the textbox on click of a submit button. the control is found however the text property is always empty. Please assist.

Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click 
  
For Each item As RadListBoxItem In lbAssignedComponents.Items 
   Dim tbxPageComponentName As TextBox = item.FindControl("tbxPageComponentName") 
Next
  
End Sub

<telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1"
    <telerik:RadListBox runat="server" ID="lbAvailableComponents" Height="200px" Width="342px" TransferMode="Copy" AllowTransfer="true" AllowTransferDuplicates="true" TransferToID="lbAssignedComponents" AutoPostBackOnTransfer="true"
        <ItemTemplate
            Component: <%# DataBinder.Eval(Container, "Text")%><br /> 
        </ItemTemplate
    </telerik:RadListBox
    <telerik:RadListBox runat="server" ID="lbAssignedComponents" Height="200px" Width="342px" AllowReorder="true" AllowDelete="true" AllowTransfer="false"
        <ItemTemplate
            Component: <%# DataBinder.Eval(Container, "Text")%><br /> 
            Unique Name: <asp:TextBox ID="tbxPageComponentName" runat="server"></asp:TextBox
        </ItemTemplate
    </telerik:RadListBox
</telerik:RadAjaxPanel>
Ryan
Top achievements
Rank 1
 answered on 11 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?