Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
596 views

Hello,

I have radgrid control in my page. I want hide the some rows in grid depending on the data in it. And I want to show these rows when clicking on the button which is inside the grid. I have attached the sample screenshot here.
Tsvetoslav
Telerik team
 answered on 17 Feb 2012
2 answers
68 views
I've inherited a project that is using RadGrid for data display that uses Filtering.  If I click the Filter Icon to select an option from the list, prior to entering any filter criteria, all filter options are displayed at the very top of the page in very cheesy, style-less text.  Once I add a criteria into the filter box and click the icon, the filter options display inline as desired.

The requirement is for the user to be able to change the default Filter Menu prior to entering criteria.

Anyone have an idea why that happens?


Tsvetoslav
Telerik team
 answered on 17 Feb 2012
1 answer
109 views
I have a radgrid and one of the columns is a GridButtonColumn with a ButtonType="PushButton" with the default text set to "Add". On the ItemDataBound routine I update the text value with the number of items that were added. So when the grid rebinds it now displays the number of added items. Works fine up to now.

Here is where it gets messed up. If I select a row in the grid, all the values in the column reset back to "Add". It seems that the re-rendering of the grid resets all the column values back to the defaults. If the grid is re-bound the values are back again. So it's not a data issue, it's a rendering issue on row selection.

I completely removed any code in the OnSelectedIndexChanged event, so it's nothing to do with any code in that event. It has something to do with the AllowRowSelect directive with EnablePostBackOnRowClick="true". The ItemDataBound routine is not called on row selection, is there another event I can re-set my values to? Would I have to write a routine that loops through each row and sets the proper values after the selection has been made?

I would think the the databindings should persist after a row selection.

<telerik:RadGrid ID="rg_ExportDetail" runat="server" ShowStatusBar="true" OnItemDataBound="rg_ExportDetail_ItemDataBound" OnSelectedIndexChanged="rg_ExportDetail_SelectedIndexChanged"

 

OnNeedDataSource="rg_ExportDetail_NeedDataSource" OnItemCommand="rg_ExportDetail_ItemCommand" Skin="Vista"

 

<MasterTableView TableLayout="Auto" EditMode="InPlace" AutoGenerateColumns="false" ClientDataKeyNames="ExportItemID">

 

<NoRecordsTemplate>

<div>There are no records to display</div>

</NoRecordsTemplate>

<Columns>

<telerik:GridBoundColumn DataField="ExportItemID" UniqueName="ExportItemID" Visible="false" />

<telerik:GridBoundColumn DataField="ExportDate" UniqueName="ExportDate" Visible="true" HeaderText="ExportDate" />

<telerik:GridBoundColumn DataField="Description" UniqueName="Description" Visible="true" HeaderText="Description" HeaderStyle-Width="300px" />

<telerik:GridBoundColumn DataField="ECL" UniqueName="ECL" Visible="false" HeaderText="ECL#" />

<telerik:GridBoundColumn DataField="Quantity" UniqueName="Quantity" Visible="false" HeaderText="Quantity" />

<telerik:GridBoundColumn DataField="UnitValue" UniqueName="UnitValue" Visible="false" HeaderText="Unit Value" DataType="System.Double" DataFormatString="{0:C}"/>

<telerik:GridBoundColumn DataField="TotalValue" UniqueName="TotalValue" Visible="true" HeaderText="Total Value" />

<telerik:GridButtonColumn ButtonType="PushButton" UniqueName="Consignees" text="Add" HeaderText="Consignee(s)" CommandName="AddConsignees" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="120px" />

<telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ItemStyle-HorizontalAlign="Center" ConfirmText="Removing Item"></telerik:GridButtonColumn>

</Columns>

<ItemStyle HorizontalAlign="Left" CssClass="disabledFontColorEmphasis" Wrap="false" />

<AlternatingItemStyle HorizontalAlign="Left" CssClass="disabledFontColorEmphasis"

Wrap="false" />

<HeaderStyle HorizontalAlign="Left" Wrap="false" Width="100px" />

<FilterItemStyle HorizontalAlign="Left" />

</MasterTableView>

<ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="true" >

<Selecting AllowRowSelect="True" />

</ClientSettings>

</telerik:RadGrid>

Tsvetoslav
Telerik team
 answered on 17 Feb 2012
1 answer
142 views
Hi,
In my parent page I have a grid with edit button in each row. 
I am opening edit form in RadWindow using following code. 
<script type="text/javascript">
            function OnClientClicked_PayInvoice(button, args) {
                var argument = button.get_commandArgument();
                var arguments = argument.split("#");
                var url = 'MakeOrderPayment.aspx?';
                url = url + "ID=" + arguments[0];
                radopen(url, "radWinInvoiceDetails");
                button.set_autoPostBack(false);
            }
        </script>

After clicked on save button I want to display saved message and when user close the RadWindow , the grid/page in main window should get display with updated value.

I am looking for example, If you have any code please share with me.
Thanks,
Abhi
Princy
Top achievements
Rank 2
 answered on 17 Feb 2012
1 answer
163 views
Hi,

how can i fire Javascript function when "Check All" in RadCombobox is checked.

Thanks
Princy
Top achievements
Rank 2
 answered on 17 Feb 2012
1 answer
113 views
Hi,
I have a grid, in that I have 3 GridBound Columns and 2 Grid Template columns (Dropdowns) and one other GridTemplateColumn (radButton).

On Click on this button, I want to collect the data from the Gridbound column, Grid Template column and then do some operation.
How can I do this?

<

telerik:GridTemplateColumn HeaderText="Action" ColumnEditorID="clmEd150px"> 
<HeaderStyle Width="20%" />  
<ItemStyle HorizontalAlign="Left"></ItemStyle>  
<ItemTemplate>
<telerik:RadButton ID="rdBtnDoSomeOp" runat="server" ButtonType="StandardButton" Text="Do Some Operation" Skin="Office2010Black" OnClick="rdBtnDoSomeOp_Click">

</telerik:RadButton

</ItemTemplate>

</telerik:GridTemplateColumn>  

protected

void rdBtnDoSomeOp_Click(object sender, EventArgs e)  

{

}

Thanks and Regards,
Deepika Karanth
Shinu
Top achievements
Rank 2
 answered on 17 Feb 2012
9 answers
723 views
Hi,

i know there is a setting ClickToOpen setting to allow you to choose BETWEEN the menu opening on a click, or when the mouse goes over it.

I however would like the menu to open  for BOTH a click and mouse over. th reason being that we have an intranet application that we are going to be sharing out onto the internet. Our main users will be using full IE and like the menu opening when the mouse overs. Our remote users will be using iphones and cannot use the mouse over, so the idea solution is to have both modes enabled.

Is this possible?

Mark
Top achievements
Rank 1
 answered on 17 Feb 2012
2 answers
119 views
- I have a RadRotator which has RotatorType="CoverFlowButtons", and I want it's items loop infinite like this demo http://demos.telerik.com/aspnet-ajax/rotator/examples/clientapicontrol/defaultcs.aspx (It worked with RotatorType="FromCode", but I tried and didn't success with CoverFlowButtons), can you tell me this is possible or not. Thanks!
phuc
Top achievements
Rank 1
 answered on 17 Feb 2012
2 answers
244 views

I'm trying to implement JQuery.UI Sortable with the RadListBox control. My scenario is to have a top list containing "selected" items and a bottom list containing "available" items. The user must be able to move items between the lists using both drag/drop and the built-in buttons. Also, the "selected" list can be reordered using drag/drop. I also need to handle the "transferred" and "reordered" events server-side. The results are ultimately saved to the database. Please see the attached screen.jpg for an example.

I have this all working using just the RadListBox control. But the user experience isn't very good because I'm using top/bottom lists rather than side-by-side so there isn't a good visual indicator of the new item order until after the item is dropped. I really like the way JQuery.UI Sortable works (makes room for the items as they are reordered with smooth animation) and want to implement it in this scenario. Seems like it should be simple, and it was to get the reordering to work (visually) but the control events don't fire. Basically, it appears to work but the control doesn't know anything about the new order of items when Sortable is involved.

  1. How to wire up Sortable so that RadListBox methods get called?
  2. How to get the item's index/position in list after it's dropped?


It probably just needs some JS magic to make this work and I'd appreciate any help. Thanks!!!

Current JS: 

<link href="<%: Page.ResolveUrl("~/JQuery/jquery-ui.css")%>" rel="stylesheet" type="text/css" />
 
<telerik:RadScriptBlock Id="RadScriptBlock1" runat="server">
    <script src="<%: Page.ResolveUrl("~/JQuery/jquery-ui.min.js")%>" type="text/javascript" ></script>
 
    <script type="text/javascript">
        $(function () {
            $("#TopList .rlbList").sortable();
            $("#TopList .rlbList").bind("sortupdate", function (event, ui) {
                ReorderItem(this, ui);
            });
            $("#TopList .rlbList").disableSelection();
        });
 
        function ReorderItem(event, ui) {
            var list = $find("<%= lstSelectedFiles.ClientID %>");
            var item = list.get_selectedItem();
            var index = item.get_index(); //???
            list.reorderItem(item, index);         
        };
    </script>
</telerik:RadScriptBlock>


Current RadListBox setup:

 

<div id="TopList">
    <telerik:RadListBox ID="lstSelectedFiles" runat="server"
        AllowReorder="True"
        AllowTransferOnDoubleClick="False"
        EnableDragAndDrop="true"
        SelectionMode="Multiple"
        AutoPostBackOnReorder="true"
        width="100%"
        >
        <ButtonSettings Position="Right" />
        <HeaderTemplate>
            <h2>Selected Images</h2>
        </HeaderTemplate>
        <ItemTemplate>
            <asp:Image ID="Image1" runat="server" ImageUrl='<%# DataBinder.Eval(Container, "Text")%>' />
        </ItemTemplate>
        <EmptyMessageTemplate>
            <div class="EmptyList">
                <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/BlankImage.png" />
                <br />
                Drag Images here...
            </div>
        </EmptyMessageTemplate>
    </telerik:RadListBox>
</div>
 
<div id="BottomList">
    <telerik:RadListBox ID="lstSourceFiles" runat="server"
        DataSourceID="ImageFileDS"
        DataKeyField="AssetId"
        DataValueField="AssetId"
        DataTextField="FileUrlImageSmallPadded"
        TransferToID="lstSelectedFiles"
        AllowTransfer="True"
        AllowTransferOnDoubleClick="False"
        SelectionMode="Multiple"
        ButtonSettings-ShowTransferAll="false"
        EnableDragAndDrop="true"
        AllowReorder="false"
        width="100%"
        AutoPostBackOnTransfer="true"
        CssClass="SourceList"
        >
        <ButtonSettings Position="Top"  />
        <HeaderTemplate>
            <h2>Available Images</h2>
        </HeaderTemplate>
        <ItemTemplate>
            <asp:Image ID="Image1" runat="server" ImageUrl='<%# DataBinder.Eval(Container, "Text")%>' />
        </ItemTemplate>
        <EmptyMessageTemplate>
            <div class="EmptyList">
                <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/BlankImage.png" />
                <br />
                Upload some images to work with
            </div>
        </EmptyMessageTemplate>
    </telerik:RadListBox>
</div>

 

 

KDL
Top achievements
Rank 1
 answered on 17 Feb 2012
6 answers
662 views
Is there a way to hide the drop down of the RadCombo box if no items are found during the search?

Thanks,
Duncan
Duncan
Top achievements
Rank 2
 answered on 17 Feb 2012
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?