Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
99 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
88 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
128 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
83 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
269 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
95 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
1 answer
80 views
Hi I have a RadGrid control showing three levels of detail  ie a RadGrid with two detail tables

Level One --> account, name
Level Two ----> service, details
Level Three ------> service item, usage, date...

I need to allow download of just the selected detail level from the RadGrid.

I can Export either the entire Level One Grid or all the expanded grid fields but not the selected data. Exporting the etire grid gives me an Out of Memory Error with 4Gb RAM

Here's my ASPX
<mastertableview autogeneratecolumns="False" datakeynames="AccountId" datasourceid="SqlDataSource1"
        groupsdefaultexpanded="False"><telerik:CommandItemSettings ShowExportToExcelButton="true" />
         
        <DetailTables>
            <telerik:GridTableView runat="server" DataKeyNames="StatementId" DataSourceID="SqlDataSource2"
                Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                Font-Underline="False" >
                <DetailTables>
                    <telerik:GridTableView runat="server" DataSourceID="SqlDataSource3" Font-Bold="False"
                        Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"
                        GroupsDefaultExpanded="False" ShowFooter="True" ShowGroupFooter="True" AllowMultiColumnSorting="True"
                        GridLines="None">
                         
                        <ParentTableRelation>
                            <telerik:GridRelationFields DetailKeyField="StatementId" MasterKeyField="StatementId" />
                        </ParentTableRelation>
                        
                        <AlternatingItemStyle BackColor="White" Font-Bold="False" Font-Italic="False" Font-Overline="False"
                            Font-Strikeout="False" Font-Underline="False" Wrap="True" />
                        <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" Wrap="True" />
                        <FooterStyle BackColor="Yellow" Font-Bold="False" Font-Italic="False" Font-Overline="False"
                            Font-Strikeout="False" Font-Underline="False" Wrap="True" />
                    </telerik:GridTableView>
                </DetailTables>
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="AccountId" MasterKeyField="AccountId" />
                </ParentTableRelation>
                <CommandItemSettings ExportToPdfText="Export to Pdf" />
                <ExpandCollapseColumn Visible="True">
                </ExpandCollapseColumn>
            </telerik:GridTableView>
        </DetailTables>
        <ParentTableRelation>
            <telerik:GridRelationFields DetailKeyField="AccountId" MasterKeyField="AccountId" />
        </ParentTableRelation>
         
        <ExpandCollapseColumn Visible="True">
        </ExpandCollapseColumn>
        <Columns>
            <telerik:GridBoundColumn DataField="ACCOUNTID" DataType="System.Int32" HeaderText="ACCOUNTID"
                SortExpression="ACCOUNTID" UniqueName="ACCOUNTID">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ACCOUNTREF" HeaderText="ACCOUNTREF" SortExpression="ACCOUNTREF"
                UniqueName="ACCOUNTREF">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="CUSTOMERID" DataType="System.Int32" HeaderText="CUSTOMERID"
                SortExpression="CUSTOMERID" UniqueName="CUSTOMERID">
            </telerik:GridBoundColumn>
        </Columns>
    </mastertableview>

Here's the export code on the button.

protected void Button4_Click(object sender, System.EventArgs e)
        {
            //ConfigureExport();
            RadGrid1.Rebind();
            RadGrid1.MasterTableView.HierarchyDefaultExpanded = true;
            //RadGrid1.MasterTableView.DetailTables[0].HierarchyDefaultExpanded = true;
            RadGrid1.ExportSettings.IgnorePaging = true;
            RadGrid1.ExportSettings.ExportOnlyData = true;
            RadGrid1.ExportSettings.FileName = "RadGridExportToCSV";
            RadGrid1.ExportSettings.OpenInNewWindow = true;
 
            RadGrid1.MasterTableView.ExportToCSV();
        }


I've seen a post of someone who had a similar issue but I've not seen a solution anywhere. I'm assuming I might have to use some sort of event capture and loop accordingly?

Thanks
Daniel
Telerik team
 answered on 11 Jan 2011
2 answers
110 views
Hi,

I need to find the column index in the RadGrid that was clicked for sorting. I should be able to have my logic under radGrid_ItemComand when e.CommandName = "Sort"

The reason is my grid is dynamically created and i dont know what my colums are. So at least if I can find the clicked column number then I can implement the rest of the logic.

Thanks!
Duneel
Duneel
Top achievements
Rank 2
 answered on 11 Jan 2011
3 answers
132 views
Hi,

We are building a site using sitefinity.

We store all the user credentials and access rights in SAP currently, how can I use it with new sitefinity site, so that we do not have to create new users in sitefinity and provide them permissions to view pages/content and the existing users can login to sitefinity site and access the site according to their defined permissions in SAP.

Can I please get a starting guidance on this?

Thank you,
Jay Mehta.
Ivan Dimitrov
Telerik team
 answered on 11 Jan 2011
2 answers
84 views
I'm using RadMenu in DNN and am looking for some help on implementing related menus:
http://demos.telerik.com/aspnet-ajax/menu/examples/relatedmenus/defaultcs.aspx

The site is running DotNetNuke Community Edition v 5.02.01.

Thank you!
Jon
Top achievements
Rank 1
 answered on 11 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?