Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
95 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
682 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
108 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
221 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
631 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
0 answers
85 views
Hey folks...

For the life of me I can't figure out what I'm doing wrong here.  I have an autocomplete combobox, databound by a LINQ datasource.  I am retrieving 2 fields, userName and userID and using them for the text field and value field respectively.  I get the list of usernames populating the combobox just fine but I'm unable to access the userID no matter what I've tried, using both a button click to get selectedvalue and the selecteditemchanged event of the combo box.  Clearly I'm missing something here... or I should have just taken a break a few hours ago ;)

Any advice would be greatly appreciated!


Paul


EDIT... Neverrrrrrrrrmind.  I think I got it sorted out.  Among other things I hadn't noticed that the indexchanged event handler wasn't registered in the aspx page, don't know why and I'm surprised it didn't throw an exception but nope.  A good lesson in learning when to take a break.
Paul
Top achievements
Rank 1
Iron
 asked on 16 Feb 2012
6 answers
204 views
How can I catch control's event in GridTemplateColumn?
here is what I got:
------------------------------------------------------------------------------------------------------------------------------------------
<telerik:RadGrid Width="800px" ID="rgTest" runat="server" GridLines="None" AutoGenerateColumns="false" 
            AllowSorting="true" PageSize="3" onneeddatasource="rgTest_NeedDataSource" 
            ondeletecommand="rgTest_DeleteCommand" onitemcommand="rgTest_ItemCommand">
        <HeaderContextMenu EnableImageSprites="True"></HeaderContextMenu>
        <MasterTableView>
                <Columns>
                <telerik:GridBoundColumn DataField="ProductID" HeaderText="ID"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ProductName" HeaderText="Product Name"></telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="Số lượng" InitializeTemplatesFirst="false" UniqueName="templatecolumns">
                    <ItemTemplate>
                    <div>
                        <telerik:RadNumericTextBox DataType="System.int16" value='<%#  int.Parse(Eval("Quantity").ToString()) %>' runat="server"></telerik:RadNumericTextBox>
                    </div>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridButtonColumn Text="delete" CommandName="Delete" Reorderable="true"></telerik:GridButtonColumn>
                </Columns>
                <RowIndicatorColumn><HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn><HeaderStyle Width="20px"></HeaderStyle>
                </ExpandCollapseColumn>
            </MasterTableView>
        </telerik:RadGrid>
---------------------------------------------------------------------------------------------------------------------------------------------------
This is my Grid:
[IMG]http://i1068.photobucket.com/albums/u450/bl4ir121/RadGrid1.png[/IMG]

I want when I edit quantity in a NumericTextBox of Quantity column, it will occur event and I can get value of this NumericTextbox to update list what I save in Session["ListProduct"].
Tan
Top achievements
Rank 1
 answered on 16 Feb 2012
3 answers
86 views
Hi,

In my company we have multiple web sites (internal and external). And we use our custom skin created from one of your skins. Currently we have the same set of the css files and the images in each of our applications. I am wondering if it's possible to have them in the separate project and attach it to the solution.

Any suggestions are very appreciated.

Thank you,
Tatiana
Richard
Top achievements
Rank 1
 answered on 16 Feb 2012
1 answer
331 views
Is it possible to replace the checkboxes in a checkbox column with dropdown lists or any other control that gives more than just the "on/off" option?

I want most of the functionality of the checkbox column in that I have data that has a hierarchical relationship and if the parent item is checked, all the child items should be checked as well.   However, I need to be able to choose from more than just "on/off" as provided by the checkbox, I need to be able to select from 3 choices, hence the desire to replace the checkbox with another control such as a dropdown list.

I created a template column with a dropdown list control in it and figured-out how to set the dropdown list's value on databind.  However, I'm at a loss as to how to get the dropdown lists in the child rows to change to the same value as the parent.  I added a "SelectedIndexChanged" event handler to the dropdown list, but when that fires, I am able to work with the dropdown list that fired the event, but I don't have access to the treelist control and it's rows, so I don't know how to find the dropdown lists in the child rows.

So far, I've been manipulating the tree list control via server side code (C#) since this is a low traffic Intranet site, so posting back to the server isn't a big issue and I'm hoping that will speed-up my ability to deliver a working solution.

Any suggestions?
Todd
Top achievements
Rank 1
 answered on 16 Feb 2012
4 answers
152 views
Hi,

I have a RadGrid binded to a DataTable and I have a DeleteButton on each row that fires DeleteCommand event. But how can I get my current row values inside the DeleteCommand event?

Thanks
Casey
Top achievements
Rank 1
 answered on 16 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?