Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
112 views

Hi All,

Is there a way to adjust the order that items enter the more (hamburger) menu?  

At the moment they enter in the order that they appear in the list (complicated in my case because I am using a float right for some elements)

In the below example 1 is left floated while 2 - 6 are right floated

1           2 3 4 5 6

When creating them I have to add them in this sequence

5 4 3 2 

Because of that 2 is first into the more menu.  I would like the order of the more menu to be the same as the displayed order.  I suppose one way would be to work out a way to not need the right float and then they would shuffle into the more menu in the right order.

Regards

Jon

Jon
Top achievements
Rank 1
 answered on 22 Jun 2016
1 answer
745 views

I have two grids, that when I try to filter or sort, I get the error Object Reference Not set to an instance of an object. It doesn't seem to make it back to the server side code, or at least not where I'm expecting, from as far as I can tell. I put breakpoints all over the place and none ever hit.

I've compared the markup for these grids to several others that are working and fail to see any difference. I should mention these are both on the same page inside of a RadTabPanel.

Here is the full text of the inner exception:

Inner exception message: Object reference not set to an instance of an object. Exception message: Exception of type 'System.Web.HttpUnhandledException' was thrown. [6/17/2016 4:30:54 PM] 
 
Error Details:
6/17/2016 4:30:54 PM...Inner Exception 
Exception Message: Object reference not set to an instance of an object.
Exception Stack: 
 at Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument)
 at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Exception Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Exception Stack: 
 at System.Web.UI.Page.HandleError(Exception e)
 at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 at System.Web.UI.Page.ProcessRequest()
 at System.Web.UI.Page.ProcessRequest(HttpContext context)
 at ASP.pages_home_aspx.ProcessRequest(HttpContext context) in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\wtu\d747c192\fbb86567\App_Web_rfsuwzi4.1.cs:line 0
 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
 at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 

 

Here the markup for the first Grid that fails:

<telerik:RadGrid ID="rgPendingAssignment"
    runat="server"
    MasterTableView-HeaderStyle-CssClass="radGridLargest"
    AllowPaging="True"
    AllowSorting="True"
    AutoGenerateColumns="False"
    CellSpacing="0"
    PageSize="25"
    ClientSettings-AllowColumnsReorder="false" ClientSettings-Resizing-AllowColumnResize="false" ClientSettings-Scrolling-UseStaticHeaders="true"
    EnableLinqExpressions="False"
    ExportSettings-ExportOnlyData="false" ExportSettings-IgnorePaging="true" ExportSettings-OpenInNewWindow="true" ExportSettings-HideStructureColumns="true"
    GridLines="None"
    GroupingSettings-CaseSensitive="false" MasterTableView-AllowMultiColumnSorting="false" MasterTableView-AllowNaturalSort="false" AllowFilteringByColumn="true" MasterTableView-CommandItemDisplay="Top"
    MasterTableView-CommandItemSettings-ShowAddNewRecordButton="false"
    MasterTableView-CommandItemSettings-ShowRefreshButton="false"
    MasterTableView-CommandItemSettings-ShowExportToCsvButton="false"
    MasterTableView-CommandItemSettings-ShowExportToExcelButton="true" ExportSettings-Excel-Format="Xlsx"
    MasterTableView-CommandItemSettings-ShowExportToPdfButton="true" ExportSettings-Pdf-AllowCopy="true" ExportSettings-Pdf-AllowPrinting="true" ExportSettings-Pdf-AllowModify="true"
    MasterTableView-CommandItemSettings-ShowExportToWordButton="true" ExportSettings-Word-Format="Docx"
    MasterTableView-PagerStyle-PagerTextFormat="{4} Page {0} of {1}, rows {2} to {3} of {5}"
    MasterTableView-PagerStyle-Position="TopAndBottom" MasterTableView-PagerStyle-PageButtonCount="10" MasterTableView-PagerStyle-EnableAllOptionInPagerComboBox="false"
    MasterTableView-TableLayout="Fixed">
    <MasterTableView>
        <SortExpressions>
            <telerik:GridSortExpression FieldName="SOLDIER" SortOrder="Ascending" />
        </SortExpressions>
        <NoRecordsTemplate>
            <asp:Label ID="Label1" Text="No Records Found" runat="server" />
        </NoRecordsTemplate>
        <Columns>
            <telerik:GridBoundColumn DataField="CaseId" UniqueName="CASEID" Display="false" />
            <telerik:GridHyperLinkColumn UniqueName="Soldier" HeaderText="Soldier" DataTextField="Soldier" AutoPostBackOnFilter="true"
                DataNavigateUrlFields="CASEID" DataNavigateUrlFormatString="~/CaseAssignment/{0}" ShowFilterIcon="false"  CurrentFilterFunction="Contains" DataType="System.String" />
            <telerik:GridBoundColumn UniqueName="SSN" HeaderText="SSN" DataField="SSN" ShowFilterIcon="false"
                DataType="System.String" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" />
            <telerik:GridBoundColumn UniqueName="losingWTU" HeaderText="Losing WTU" DataField="losingWTU" ShowFilterIcon="false" AutoPostBackOnFilter="true" />
            <telerik:GridBoundColumn UniqueName="GAININGWTU" HeaderText="Gaining WTU" DataField="GAININGWTU" ShowFilterIcon="false" AutoPostBackOnFilter="true" />
            <telerik:GridBoundColumn UniqueName="GAININGCOMPANY" HeaderText="Gaining Company" DataField="GAININGCOMPANY" ShowFilterIcon="false" AutoPostBackOnFilter="true" />
            <telerik:GridBoundColumn UniqueName="AcceptedBy" HeaderText="Accepted By" DataField="AcceptedBy" ShowFilterIcon="false" AutoPostBackOnFilter="true" />
            <telerik:GridDateTimeColumn UniqueName="AcceptedOn" HeaderText="Date Accepted" DataField="AcceptedOn" ShowFilterIcon="false"
                DataFormatString="{0:dd MMM yyyy}" DataType="System.DateTime" AutoPostBackOnFilter="true" />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

The markup for the second grid that isn't working:

<telerik:RadGrid ID="rgTransfers"
    runat="server"
    OnItemCreated="rg_popup_ItemCreated"
    OnItemDataBound="rgTransfers_ItemDataBound"
    CssClass="radGridLargest"
    AllowPaging="True"
    AllowSorting="True"
    AutoGenerateColumns="False"
    CellSpacing="0"
    PageSize="25"
    ClientSettings-AllowColumnsReorder="false" ClientSettings-Resizing-AllowColumnResize="true" ClientSettings-Scrolling-UseStaticHeaders="true"
    EnableLinqExpressions="False"
    ExportSettings-ExportOnlyData="false" ExportSettings-IgnorePaging="true" ExportSettings-OpenInNewWindow="true" ExportSettings-HideStructureColumns="true"
    GridLines="None"
    GroupingSettings-CaseSensitive="false" MasterTableView-AllowMultiColumnSorting="false" MasterTableView-AllowNaturalSort="false" AllowFilteringByColumn="true" MasterTableView-CommandItemDisplay="Top"
    MasterTableView-CommandItemSettings-ShowAddNewRecordButton="false"
    MasterTableView-CommandItemSettings-ShowRefreshButton="false"
    MasterTableView-CommandItemSettings-ShowExportToCsvButton="false"
    MasterTableView-CommandItemSettings-ShowExportToExcelButton="true" ExportSettings-Excel-Format="Xlsx"
    MasterTableView-CommandItemSettings-ShowExportToPdfButton="true" ExportSettings-Pdf-AllowCopy="true" ExportSettings-Pdf-AllowPrinting="true" ExportSettings-Pdf-AllowModify="true"
    MasterTableView-CommandItemSettings-ShowExportToWordButton="true" ExportSettings-Word-Format="Docx"
    MasterTableView-PagerStyle-PagerTextFormat="{4} Page {0} of {1}, rows {2} to {3} of {5}"
    MasterTableView-PagerStyle-Position="TopAndBottom" MasterTableView-PagerStyle-PageButtonCount="10" MasterTableView-PagerStyle-EnableAllOptionInPagerComboBox="false"
    MasterTableView-TableLayout="Fixed">
    <MasterTableView >
        <SortExpressions>
            <telerik:GridSortExpression FieldName="SOLDIER" SortOrder="Ascending" />
        </SortExpressions>
        <NoRecordsTemplate>
            <asp:Label ID="Label1" Text="No Records Found" runat="server" />
        </NoRecordsTemplate>
        <Columns>
            <telerik:GridTemplateColumn UniqueName="SELECTACTION" ShowFilterIcon="false" DataField="CASEID"
                SortExpression="CASEID" HeaderText="Select Action" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true"
                HeaderStyle-Width="120px">
                <ItemTemplate>
                    <asp:DropDownList ID="ddlSelectAction" runat="server">
                        <asp:ListItem Text="--Select Action--" Value="" />
                        <asp:ListItem Text="Accept Transfer" Value="ACCEPT" />
                        <asp:ListItem Text="Cancel Transfer" Value="CANCEL" />
                    </asp:DropDownList>
                    <asp:HiddenField ID="tranferCaseId" runat="server" Value='<%# Eval("CASEID") %>' />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn Display="false" DataField="CASETRANSFERID" UniqueName="CASETRANSFERID" />
            <telerik:GridTemplateColumn UniqueName="SOLDIER" ShowFilterIcon="false" DataField="SOLDIER"
                SortExpression="SOLDIER" HeaderText="Soldier" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true">
                <ItemTemplate>
                    <asp:LinkButton ID="lnkBtnName" runat="server" Text='<%# Eval("SOLDIER") %>' CommandArgument='<%# Eval("CaseId") %>' />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn HeaderText="SSN" DataField="SSN" UniqueName="SSN" ShowFilterIcon="false"
                DataType="System.String" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" HeaderStyle-Width="47px" />
            <telerik:GridBoundColumn HeaderText="Losing WTU" DataField="LOSINGWTU" UniqueName="LOSINGWTU" ShowFilterIcon="false"
                DataType="System.String" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" />
            <telerik:GridBoundColumn HeaderText="Losing CO" DataField="LOSINGCO" UniqueName="LOSINGCO" ShowFilterIcon="false"
                DataType="System.String" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" />
            <telerik:GridBoundColumn HeaderText="Gaining WTU" DataField="GAININGWTU" UniqueName="GAININWTU" ShowFilterIcon="false"
                DataType="System.String" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" />
            <telerik:GridBoundColumn HeaderText="Gaining CO" DataField="GAININGCO" UniqueName="GAININGCO" ShowFilterIcon="false"
                DataType="System.String" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" />
            <telerik:GridDateTimeColumn HeaderText="Date Initiated" DataField="DATEINITIATED" UniqueName="DATEINITIATED" DataFormatString="{0:dd MMM yyyy}" ShowFilterIcon="false"
                DataType="System.DateTime" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" HeaderStyle-Width="100px" />
            <telerik:GridDateTimeColumn HeaderText="Record Start Date" DataField="PROGRAMSTARTDATE" UniqueName="PROGRAMSTARTDATE" DataFormatString="{0:dd MMM yyyy}" ShowFilterIcon="false"
                DataType="System.DateTime" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" HeaderStyle-Width="115px" />
        </Columns>
        <CommandItemTemplate>
            <div class="formRowNoBorder">
                <div class="floatLeft">
                    <asp:LinkButton runat="server" ID="lbCancel" CssClass="silverButton" OnClick="btnCancel_Click"><span>Cancel</span></asp:LinkButton>
                    <asp:LinkButton runat="server" ID="lbSave" CssClass="silverButton" CommandName="Save" OnClick="btnSave_Click"><span>Save</span></asp:LinkButton>
                </div>
            </div>
        </CommandItemTemplate>
    </MasterTableView>
</telerik:RadGrid>

 

 

 

 

 

 

 

 

Eyup
Telerik team
 answered on 22 Jun 2016
15 answers
423 views
Hi,

I have an ImageEditor which I would one to allow user to draw on the image and save it as a new image.
But with my below code, once I click on the pencil, it seems like the pencil is not working as I am unable to draw.
I only have code on the aspx page as I do not know what code to put in aspx.cs page as the demo did not put any code.
Can anyone help and let me know how can I do the above using ImageEditor?

Thank you

--ASPX--
<telerik:RadImageEditor ID="RadImageEditor1" runat="server" ImageUrl="..\image\canvas.png"
CanvasMode="Yes" >
<Tools>
<telerik:ImageEditorToolGroup>
<telerik:ImageEditorTool CommandName="Save" />
<telerik:ImageEditorTool CommandName="Undo" />
<telerik:ImageEditorTool CommandName="Pencil" IsToggleButton="true" />
</telerik:ImageEditorToolGroup>
</Tools>
</telerik:RadImageEditor>
Marin Bratanov
Telerik team
 answered on 22 Jun 2016
8 answers
448 views
Hy fellas,

I need to add a button to a gridview like an insert or delete button. This button will be called "Copy and Paste" and whenever I click this button the same line of the gridview (with the same data) will be added as a new record to the gridview. How can I achive this?

Thanks a lot
Eyup
Telerik team
 answered on 22 Jun 2016
2 answers
89 views

Hi, I have a RadFilter that I am trying to add an expression to on the form load. The idea is that when someone clicks a hyperlink on a different page, they are redirected to a different page and the radfilter is set up for them with the data they clicked (in this specific case, it would Select Amends and put in the appropriate value.

I just want to mention that this code works exactly how I need it to when It is inside of a button click event on the page that gets redirected to.

The following is called in my page_load:

        pnlSearch.Visible = False
        pnlAdvanced.Visible = True

        Dim amendsByExpression = New RadFilterContainsFilterExpression("Amends")
        amendsByExpression.Value = Session("Search_Text")
        rfAdvancedSearch.RootGroup.AddExpression(amendsByExpression)
        rfAdvancedSearch.FireApplyCommand()

 

Why does the code above work when its encapsulated inside of a linkbutton click event, but not in the page load? How can I make it work in the Page Load?

Eyup
Telerik team
 answered on 22 Jun 2016
1 answer
217 views

Hello,

I would like to use the RadNumericTextBox as a way to change the quantity of items in a cart.

How can pass the OrderItemId to the back-end C# for logic to happen?

 

<telerik:RadNumericTextBox OnTextChanged="QuantityChanged"  runat="server" Width="30" MinValue="1"
                                 Visible='<%# AllowEditQuantity(Eval("Item.ProdType"), Eval("Show.EventType")) %>'
                                 Value='<%# decimal.Parse(Eval("Item.Quantity").ToString())%>'
                                 CommandArgument='<%#Eval("Item.OrderItemId") %>'>
                                 <ClientEvents OnValueChanged="squareValue"/>
                                <NumberFormat DecimalDigits="0" />
                             </telerik:RadNumericTextBox>

 

Viktor Tachev
Telerik team
 answered on 22 Jun 2016
1 answer
140 views

Is there a way to move the drop down arrow in a RadGrid GridBoundColumn from the first position to the last position in the row? I don't even see where that is generated in the RadGrid code.

Here is the code

<telerik:RadGrid Skin="CustomSkin" EnableEmbeddedSkins="False" ID="dgSearchUsers"
runat="server" EnableAJAX="True" AllowFilteringByColumn="False" AllowSorting="True"
OnNeedDataSource="dgSearchUsers_NeedDataSource" AutoGenerateColumns="False">
<MasterTableView DataKeyNames="UserId" HierarchyLoadMode="Client" AllowPaging="True" PageSize="25">
<PagerStyle HorizontalAlign="Center" CssClass="grdPagerStyle" Mode="NextPrevAndNumeric" >
</PagerStyle>
<DetailTables>
<telerik:GridTableView AutoGenerateColumns="false" DataKeyNames="PlayerId" Name="PlayerDetails"
Width="96%" AllowPaging="False" AllowFilteringByColumn="false">
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="UserId" MasterKeyField="UserId"></telerik:GridRelationFields>
</ParentTableRelation>
<Columns>
<telerik:GridBoundColumn HeaderText="Player First Name" DataField="PlayerFirstName"
UniqueName="PlayerFirstName">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Player Last Name" DataField="PlayerLastName"
UniqueName="PlayerLastName">
</telerik:GridBoundColumn>
</Columns>
</telerik:GridTableView>
</DetailTables>
<Columns>
<telerik:GridTemplateColumn HeaderText="" UniqueName="Select" AllowFiltering="False">
<ItemTemplate>
<asp:CheckBox ID="chkSelect" runat="server" Checked='<%# DataBinder.Eval(Container.DataItem,"IsSelected")%>'>
</asp:CheckBox>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn HeaderText="User First Name" DataField="UserFirstName" UniqueName="UserFirstName">
<ItemStyle HorizontalAlign="Left" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="User Last Name" DataField="UserLastName" UniqueName="UserLastName">
<ItemStyle HorizontalAlign="Left" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="User Name" DataField="UserName" UniqueName="UserName">
<ItemStyle HorizontalAlign="Left" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Email" DataField="Email" UniqueName="Email">
<ItemStyle HorizontalAlign="Left" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn Display="false" HeaderText="UserId" DataField="UserId" UniqueName="UserId">

</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<HeaderStyle Width="200px" />
<GroupingSettings CaseSensitive="false" />
<ClientSettings AllowExpandCollapse="True">
<Resizing EnableRealTimeResize="false" AllowColumnResize="false"></Resizing>
</ClientSettings>
</telerik:RadGrid>

 

Eyup
Telerik team
 answered on 22 Jun 2016
1 answer
180 views
I am making an SVG map with mouseover on provinces showing reports and visualized data. One of it was a Donut Chart, this is not a big deal of data we're loading so I think this is not the cause and the overall experience is not laggy so I think it is by design by Telerik for it to have 1 sec delay before load transition animation. I need to display the donut chart faster without delay because of the nature of my project without turning off the transition animation. Is it possible?
Stamo Gochev
Telerik team
 answered on 22 Jun 2016
2 answers
669 views
Greetings,

I have a problem in the following code:

<telerik:GridTemplateColumn>
    <ItemTemplate>
        <asp:HiddenField ID="HiddenFieldIdParticipant" runat="server" Value='<%#Eval("idUtilisateur")%>' />
    </ItemTemplate>
</telerik:GridTemplateColumn>


code behind:

HiddenField HiddenFieldIdParticipant = GridDisplayOldRDV.FindControl("HiddenFieldIdParticipant") as HiddenField;


This is not working i don't get anything in my hiddenfield
Does anyone know why ?
Thx in advance!
ali haririan
Top achievements
Rank 1
 answered on 21 Jun 2016
1 answer
94 views

Hi,

We've used default skin, we've requirement to change its default arrow image with search image. Currently same classes are applied on all comboboxes when we change arrow image class than these changes are affected on all comboboxes. We need to change arrow image only in one combobox by using its default skin. How we change that like showing in attached snapshot? Any example would be appreciated.

 

Thanks

Peter Milchev
Telerik team
 answered on 21 Jun 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?