Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
314 views

I have selected the 'Show Add New Record Button' in the command item setting options. Can the button be formatted? ie change size, color. Or can the font size of the text be bigger?

Thank you in advance,

Jim

Vessy
Telerik team
 answered on 11 Oct 2017
2 answers
481 views
I am trying to bind a radgrid after a button click event using Javacript ...here the code below ... 


aspx page: on page load this is empty

 

<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" >

 

 

<MasterTableView>

 

 

<Columns>

 

 

 

<

 

telerik:GridTemplateColumn >

 

 

 

 

 

<HeaderStyle CssClass="header" Width="5%" Height="7%" />

 

 

 

 

 

<HeaderTemplate>

 

 

 

 

 

<asp:CheckBox ID="cbSelectAll" runat="server" onClick="checkedAll(this);"></asp:CheckBox>

 

 

 

 

 

</HeaderTemplate>

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

 

<asp:CheckBox ID="chkBox" AutoPostBack="false" runat="server" ></asp:CheckBox>

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<

 

telerik:GridBoundColumn UniqueName="SalesNo" DataField="SalesNo" HeaderText=" Sales Number" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" >

 

 

<HeaderStyle CssClass="header" />

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

javacript:

//results is data returned from a web service call using ajax

 

function

 

PopulateSalesGrid(results) {

 

 

 

 

 

var rgGrid  = $find("<%= RadGrid1.ClientID %>").get_masterTableView();

 

rgGrid.set_dataSource(results); // here i get error value cannot be null

rgGrid.dataBind();

 

 

}

** I would perfer not to have the grid populated on page load.

I also tried binding the radgrid on page load (code behind) and hiding it before button clicking event .... and showing if after the click event. But the issue here is ... when you cllick on the 'checked All' checkbox it gets all the values from the previous (page load) databind and not the values from the PopulateSalesGrid function.

Any ideas how to fix this?

thanks!!

Anders
Top achievements
Rank 1
 answered on 11 Oct 2017
3 answers
159 views

For some reason my grid exhibits strange behavior. On first sort grid sorts as expected, but on second it just shows busy sign.

My source is following:

On Load:

    Session("grdPorts") = dtAlternatePorts

OnNeedDataSource

    grdPorts.DataSource = Session("grdPorts")

And html:

 <telerik:RadGrid ID="grdPorts" runat="server" style="margin-top:23px; margin-left:10px;margin-right:5px;"
                                        Width="440px" skin="WebBlue"
                                        ShowFooter="false"
                                        AllowSorting="true"
                                        OnNeedDataSource="OnNeedDataSource">      
                                <ClientSettings Scrolling-AllowScroll ="true" Scrolling-ScrollHeight="705px" />                    
                                <MasterTableView GroupLoadMode="Client" AutoGenerateColumns="False" HeaderStyle-Font-Bold="true">
                                    <HeaderStyle BackColor="#6D8DAD" ForeColor="White"/>
                                    <ItemStyle CssClass="InnerItemStyle"/>
                                    <AlternatingItemStyle CssClass="InnerAlernatingItemStyle" BackColor="#E3E1E1"/>                                  

                                    <Columns>

                                    <telerik:GridBoundColumn DataField="WiserPortDesc" HeaderText="Port" HeaderStyle-HorizontalAlign="Center"  
                                                                ItemStyle-Width="280px" ItemStyle-HorizontalAlign="left"/>

                                    <telerik:GridBoundColumn DataField="curval" HeaderText="Value<br/>($M)" HeaderStyle-HorizontalAlign="Center"
                                                             SortExpression="curval"
                                                             ItemStyle-HorizontalAlign="Right"
                                                             ItemStyle-Width="80px" ItemStyle-CssClass="label_SS_8" DataFormatString="{0:N3}"/>                                      

                                    <telerik:GridBoundColumn DataField="Tons" HeaderText="Volume<br/>(ktons)" HeaderStyle-HorizontalAlign="Center"
                                                             SortExpression="Tons" ItemStyle-HorizontalAlign="Right"
                                                             ItemStyle-Width="80px" ItemStyle-CssClass="label_SS_8" DataFormatString="{0:N3}"/>

                                    
                                </Columns>

                                <NoRecordsTemplate>
                                    <div style="padding: 5px">
                                        No records available.
                                    </div>
                                </NoRecordsTemplate>

                            </MasterTableView>

                         </telerik:RadGrid>

Thank you

Vessy
Telerik team
 answered on 11 Oct 2017
3 answers
125 views

Hello,

i have a problem when i initialize a radNavigation server side ; 

i have this radNavigation on my aspx page :

<telerik:RadNavigation ID="rnFacturation" runat="server" Skin="Black" DataFieldID="ID" DataTextField="Text" DataNavigateUrlField="Url" DataFieldParentID="ParentID">
</telerik:RadNavigation>

 

and i fill it server side like this :

siteData.Add(New SiteDataItem(menu.Id, Nothing, menu.Nom, url))
...

siteData.Add(New SiteDataItem(sousMenu.Id, menu.Id, sousMenu.Nom, url))

...

rnFacturation.DataSource = siteData
rnFacturation.DataBind()

 

Under Chrome, the RadNavigation has every Nodes i have inserted into it. In IE, the Nodes are only under the hamburger button and the style is very strange!

 

Any idea of the problem ?

 

thanks in advance for the help.

Fabien
Top achievements
Rank 1
 answered on 11 Oct 2017
4 answers
182 views
I'd like to persist the column display settings for my grid to a database.  I'm using the header context menu to allow the users to show/hide fields, but am having trouble figuring out how to capture which are visible.  I've placed a button at the top of my page for them to click.  When I inspect the columns after post-back, the column display settings are not present.  Is there a way to do this?

Thanks!
DogBizPro
Top achievements
Rank 1
 answered on 11 Oct 2017
0 answers
121 views
I'm trying to set the inital deplay time setting on the control but it won't take affect, i'm not sure why. Am I setting it incorrectly?

Application.Master: 

        <!-- Ajax Manager -->
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" 
            DefaultLoadingPanelID="defaultLoadingPanel"
            InitialDelayTime="50000"
            MinDisplayTime="50000">
        </telerik:RadAjaxManager>

        <!-- Default Loading Panel -->
        <telerik:RadAjaxLoadingPanel ID="defaultLoadingPanel"
            runat="server"
            BackgroundPosition="Center"
            IsSticky="false"
            CssClass="MyModalPanel" 
            InitialDelayTime="50000"
            MinDisplayTime="50000"
            >
        </telerik:RadAjaxLoadingPanel>

Page.aspx:

    <telerik:RadAjaxManagerProxy runat="server" ID="radAjaxProxy">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="cmdViewAccount">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlContent" LoadingPanelID="defaultLoadingPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
Kessy
Top achievements
Rank 1
 asked on 10 Oct 2017
3 answers
514 views
Good evening everyone,

I'm working with data source that returns a business object containing several properties of type enum.  Is there a recommended way of binding such properties to GridDropDownColumn for displaying and editing?  So far, adding values to the control programmatically via ItemDataBound seems to be very tedious and inefficient.  Pointers or some guidelines on how to work with enums and the RadGrid would be excellent.

Thanks

        \Steve
Prem
Top achievements
Rank 1
 answered on 10 Oct 2017
9 answers
416 views

Dear Telrrik,

 

I am trying to put custom skin for RadSpellCheck, even I gave enable embed skin false and uploaded the skin CSS file and image in the theme folder, I am not getting the applied skin properly. Please see the attachments for more information

 
pelase find the list of below images

http://www.hrdpower.com/downloads/spell/Spell%20Address%20List%20in%20Solution%20Explorer.JPG
http://www.hrdpower.com/downloads/spell/Spell%20Half%20Visible.JPG
http://www.hrdpower.com/downloads/spell/Spell%20link%20address%20has%20to%20be%20addressed%20in%20%20Master%20Page.JPG
http://www.hrdpower.com/downloads/Spell%20Source%20Code.JPG


 

Regards,

Vinod

Harikrishnan
Top achievements
Rank 1
 answered on 10 Oct 2017
0 answers
72 views
Hi,
I want to use the attachment feature in a radGrid. I have all the attachment in a dedicated directory, location of files is stored in database. can you please provide some sample example code to handle download attachment. Thanks in advance!
abc
Top achievements
Rank 1
 asked on 10 Oct 2017
0 answers
119 views
<MasterTableView DataKeyNames="Id" CommandItemDisplay="Top"  IsFilterItemExpanded="false" HierarchyLoadMode="Conditional">
            <CommandItemTemplate>
                <div class="GridCommandItemRow">
                    <%--Override RPAStyles width = 65% --%>
                    <div class="GridCommandItemLabel" style="width:40%">
                        <asp:Label runat="server" meta:resourcekey="lblBuildingCharacteristics" />
                    </div>
                    <%--Override RPAStyles width = 25% --%>
                    <div class="GridCommandItemButtons" style="width:50%">

                        <%--Buttons in their own GridCommandItemButton div are inserted float right, i.e. reverse order--%>
                        <div class="GridCommandItemButton">
                            <maui:RadButton 
                                runat="server" 
                                ID="btnSetCurrentOrderBuildings" 
                                BackColor="Transparent"
                                BorderStyle="None"
                                ButtonType="LinkButton"
                                ForeColor="White"
                                OnClick="btnSetCurrentOrderBuildings_OnClick"
                                Text="<%$ Resources:RpaControlCaptions, SetCurrentOrder %>" >
                                <Icon PrimaryIconCssClass="rgRefresh" />
                            </maui:RadButton>
                        </div>

                        <div class="GridCommandItemButton">                                                                 
                            <maui:RadButton 
                                runat="server" 
                                ID="btnEditSketch" 
                                BackColor="Transparent"
                                BorderStyle="None"
                                ButtonType="LinkButton"
                                ForeColor="White"
                                Enabled="<%# RPAController.CurrentSiteSketch != null && RPAController.CanEdit%>" 
                                CommandName="EditSketch"
                                Text="<%$ Resources:RpaControlCaptions, btnEditSketch_ToolTip %>" >
                                <Icon PrimaryIconCssClass="rgEdit" />
                            </maui:RadButton>
                        </div>

                        <div class="GridCommandItemButton">    
                            <maui:RadButton 
                                runat="server" 
                                ID="btnApplyTemplate" 
                                BackColor="Transparent"
                                BorderStyle="None"
                                ButtonType="LinkButton"
                                ForeColor="White"
                                Enabled="<%# RPAController.CurrentAppraisalSite.CanAddBuildings && RPAController.CanEdit  %>" 
                                CommandName="ApplyTemplate"
                                Text="<%$ Resources:RpaControlCaptions, btnApplyTemplate %>" >
                                <Icon PrimaryIconUrl="/skins/GovernBlue/Maui/Button/prefs_selected.gif" />
                            </maui:RadButton>
                        </div>

                        <div class="GridCommandItemButton">                                                   
                            <maui:RadButton 
                                runat="server" 
                                ID="btnAddBuilding" 
                                BackColor="Transparent"
                                BorderStyle="None"
                                ButtonType="LinkButton"
                                ForeColor="White"
                                Enabled="<%# RPAController.CurrentAppraisalSite.CanAddBuildings && RPAController.CanEdit %>" 
                                Text="<%$ Resources:RpaControlCaptions, btnAddNew_ToolTip %>" >
                                <Icon PrimaryIconCssClass="rgAdd" />
                            </maui:RadButton>
                        </div>

                        <div class="GridCommandItemButton">                                                   
                            <maui:RadButton 
                                runat="server" 
                                ID="btnPrint"
                                BackColor="Transparent"
                                BorderStyle="None"
                                ButtonType="LinkButton"
                                ForeColor="White"
                                Enabled="<%# RPAController.CanEdit %>" 
                                CommandName="PrintReport" 
                                Text="<%$ Resources:RpaControlCaptions, btnPrint %>">
                                <Icon PrimaryIconCssClass="iconReport" />
                            </maui:RadButton>
                        </div>
                    </div>
                </div>
            </CommandItemTemplate>
            <FooterStyle Font-Bold="true" />
            <Columns>
                <telerik:GridDragDropColumn HeaderStyle-Width="18px">
                </telerik:GridDragDropColumn>

                <maui:GridBoundColumn UniqueName="BuildingName" DataField="BuildingName" HeaderText="<% $Resources: dtgBuildingMain_BuildingName %>" />
                <maui:GridBoundColumn UniqueName="ImprovementTypeDescr" DataField="ImprovementTypeDescr" HeaderText="<% $Resources: dtgBuildingMain_ImprovementTypeDescr %>" />
                <maui:GridBoundColumn UniqueName="EffectiveYear" DataField="EffectiveYear" DataType="System.Int16" HeaderStyle-HorizontalAlign="Right"
                    ItemStyle-HorizontalAlign="Right" HeaderText="<% $Resources: dtgBuildingMain_EffectiveYear %>"
                    FooterStyle-HorizontalAlign="Right" FooterText="<% $Resources: dtgBuildingMain_Total %>" />
                <maui:GridBoundColumn UniqueName="DefaultSize" DataField="DefaultSize" DataType="System.Decimal" DataFormatString="{0:N2}"
                    HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" HeaderText="<% $Resources: dtgBuildingMain_Area %>"
                    FooterStyle-HorizontalAlign="Right" Aggregate="Sum" />
                <maui:GridBoundColumn UniqueName="AttachedFeaturesCount" DataField="AttachedFeatures.Count" DataType="System.Int32"
                    HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" HeaderText="<% $Resources: dtgBuildingMain_AttFeat %>" />
                <maui:GridBoundColumn UniqueName="RelatedFeaturesCount" DataField="RelatedFeatures.Count" DataType="System.Int32"
                    HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" HeaderText="<% $Resources: dtgBuildingMain_RelFeat %>" />
                <maui:GridBoundColumn UniqueName="RelationshipsCount" DataField="Relationships.Count" DataType="System.Int32"
                    HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" HeaderText="<% $Resources: dtgBuildingMain_RelLand %>" />
                <maui:GridTemplateColumn UniqueName="Actions" AllowFiltering="false" Groupable="false">
                    <ItemTemplate>
                        <maui:RadButton runat="server" ID="btnEditBuilding" Enabled="<%# RPAController.CanEdit %>" CssClass="rgEdit" CommandName="EditBuilding" Image-EnableImageButton="true" ButtonType="LinkButton" />
                        <maui:RadButton runat="server" ID="btnBuildingCopy" Enabled="<%# RPAController.CanEdit %>" CssClass="iconCopy" Image-EnableImageButton="true" ButtonType="LinkButton" />
                        <maui:RadButton runat="server" ID="btnBuildingMove" Enabled="<%# RPAController.CanEdit %>" CssClass="iconForward" Image-EnableImageButton="true" ButtonType="LinkButton" />
                        <maui:RadButton runat="server" ID="btnNotes_dtgBuildingMain" Enabled="<%# RPAController.CanEdit %>" CssClass="iconNotes" Image-EnableImageButton="true" ButtonType="LinkButton" CommandName="ViewNotes" />
                        <maui:RadButton runat="server" ID="btnPromoteBuilding" CommandName="Promote" Style="vertical-align:middle" Width ="14" Height="16" ButtonType="LinkButton" Image-EnableImageButton="true" Image-ImageUrl="~/skins/GovernBlue/Maui/Button/up_hover.gif" />
                        <maui:RadButton runat="server" ID="btnDeleteBuilding" Enabled="<%# RPAController.CanEdit %>" CssClass="rgDel" CommandName="Delete" Image-EnableImageButton="true" ButtonType="LinkButton" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Right" />
                </maui:GridTemplateColumn>
            </Columns>
            <NestedViewTemplate>
                <maui:RadTabStrip ID="tsBuildingDetail" runat="server" Align="Left" MultiPageID="mpBuildingDetail" SelectedIndex="0">
                    <Tabs>
                        <maui:RadTab Text="<% $Resources: tsBuildingDetail_SizeRecords %>" PageViewID="pvBuildingDetailSizes" />
                        <maui:RadTab Text="<% $Resources: tsBuildingDetail_BuildingCharacteristics %>" PageViewID="pvBuildingDetailUDFs" />
                        <maui:RadTab Text="<% $Resources: tsBuildingDetail_AdjustmentsAndDepreciation %>" PageViewID="pvBuildingDetailAdj" />
                        <maui:RadTab Text="<% $Resources:RpaControlCaptions, TabSituses %>" PageViewID="pvBuildingDetailSituses" />
                    </Tabs>
                </maui:RadTabStrip>
                <maui:RadMultiPage ID="mpBuildingDetail" runat="server" SelectedIndex="0">
                    <maui:RadPageView ID="pvBuildingDetailSizes" runat="server" CssClass="pageView">
                        <div style="margin-top: 2px; margin-left: 2px; margin-right: 2px">
                            <maui:Label ID="Label1" runat="server" Text="<% $Resources: tsBuildingDetail_BuildingSizes %>" /><br />
                            <maui:RadGrid ID="dtgBuildingSizes" runat="server" AllowPaging="true" AllowSorting="true" AllowFilteringByColumn="true" ShowFooter="true"
                                AutoGenerateColumns="false" EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true" AllowCustomPaging="true" PageSize="5"
                                OnNeedDataSource="dtgBuildingSizes_NeedDataSource" OnDetailTableDataBind="RadGrid1_DetailTableDataBind">
                                <MasterTableView DataKeyNames="Id"  IsFilterItemExpanded="false">
                                    <Columns>
                                        <maui:GridBoundColumn UniqueName="SizeTypeDescr"  DataField="SizeTypeDescr" HeaderText="<% $Resources: dtgBuildingSizes_SizeType %>" />
                                        <maui:GridBoundColumn UniqueName="Size" DataField="Size" DataType="System.Decimal" DataFormatString="{0:N2}"
                                            ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right" HeaderText="<% $Resources: dtgBuildingSizes_Size %>" />
                                    </Columns>
                                </MasterTableView>

                            </maui:RadGrid>
                        </div>
                    </maui:RadPageView>
                    <maui:RadPageView ID="pvBuildingDetailUDFs" runat="server" CssClass="pageView">
                        <ucRPAUserDefinedFields:RPAUdfControl runat="server" ID="ucBuildingUDFs" ReadOnly="true" />
                    </maui:RadPageView>
                    <maui:RadPageView ID="pvBuildingDetailAdj" runat="server" CssClass="pageView">
                        <ucAdj:AdjControl ID="ucAdjustments" runat="server" IsPopupMode="False" EditMode="ReadOnly" />
                    </maui:RadPageView>
                    <maui:RadPageView ID="pvBuildingDetailSituses" runat="server" CssClass="pageView">
                        <ucRPASituses:RPASitusGridControl runat="server" ID="ucBuildingSituses" IsEditable="false" />
                    </maui:RadPageView>
                </maui:RadMultiPage>
            </NestedViewTemplate>
        </MasterTableView>
Ashok
Top achievements
Rank 1
 asked on 09 Oct 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?