Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
471 views
I have a radgrid on my page. I want to move selected row up/down. There are some solutions I found. But in given example

sectionRowIndex is always -1. It is not working for IE*. Any other suggestion?

http://www.telerik.com/community/code-library/aspnet-ajax/grid/move-rows-up-down-using-radgrid-for-asp-net-ajax-prometheus.aspx

Thanks in advance
Meera
Top achievements
Rank 1
 answered on 02 Mar 2012
0 answers
64 views
This can be closed
Web Services
Top achievements
Rank 2
 asked on 01 Mar 2012
3 answers
112 views
hi

I have this Stored Proc and my grid is empty and no error. I have tested the proc and is returning me the result but not the grid.

How should i go about it? Thanks

Create Proc test
as
DECLARE @query VARCHAR(4000)
DECLARE @years VARCHAR(2000)
SELECT  @years = STUFF((SELECT DISTINCT
      '],[' + ltrim(Dyear)
                        FROM    Product2
                        ORDER BY '],[' + ltrim(Dyear)
                        FOR XML PATH('')
      ), 1, 2, '') + ']'
      

SET @query =
'SELECT * FROM
(
 SELECT prodId,Dyear,amount
 FROM Product2
)t
PIVOT (SUM(amount) FOR Dyear
IN ('+@years+')) AS pvt'

EXECUTE (@query)

Richard
Top achievements
Rank 1
 answered on 01 Mar 2012
2 answers
77 views
Greetings Telerik Community,

I am currently and successfully using the code block below to turn an edit column into a delete column. I do this because my customer wants in-line add and delete but no edit. My issue now is I need to do this for a column that is nested 1 level deep in a hierarchical grid. The column name is "EditColumn2". The problem is this column doesn't appear to exist when the PreRender is called and throws an exception. My guess is it is created on the fly when the expand arrow is clicked. Which event can I use to add a similar code block to so I can apply the same logic to turn an editboundcolumn into a delete column for the nested table?

protected void GridPreRender(object sender, EventArgs e)
{
    foreach (GridDataItem item in MaintGrid.MasterTableView.Items)
    {
        ImageButton btn = (ImageButton)item["EditColumn"].Controls[0];
        btn.CommandName = "Delete";
        btn.ToolTip = "Delete";
        btn.ImageUrl = "~/Stylesheets/Images/Delete3.gif";
        btn.OnClientClick = "javascript:if(!confirm('Are you sure you wish to delete this record?')){return false;}";
    }
}
Mike
Top achievements
Rank 1
 answered on 01 Mar 2012
0 answers
59 views
Hello,

I am using client-side binding grid, so all my columns are gridtemplatecolumn type and filled from web-service.
One of the columns is a result of some calculation.

<telerik:GridTemplateColumn HeaderStyle-CssClass='GridHeaderGreen ra' ItemStyle-CssClass='ra'
    HeaderText="Start day throughput" SortExpression="START_DAY_DATA.IO_PER_SECOND">
    <itemtemplate>
        <asp:Label ID="StartPerSecond" runat="server" />
    </itemtemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderStyle-CssClass='GridHeaderGreen ra' ItemStyle-CssClass='ra'
    HeaderText="End day throughput" SortExpression="END_DAY_DATA.IO_PER_SECOND">
    <itemtemplate>
        <asp:Label ID="EndPerSecond" runat="server" />
    </itemtemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderStyle-CssClass='GridHeaderGreen ra' ItemStyle-CssClass='ra'
    HeaderText="Throughput growth">
    <itemtemplate>
        <asp:Label ID="PerSecondDelta" runat="server" />
    </itemtemplate>
</telerik:GridTemplateColumn>


When I put SortExpression="(END_DAY_DATA.IO_PER_SECOND - START_DAY_DATA.IO_PER_SECOND)" into third column - I am getting the exception when trying to sort by this column.

I can't believe I can't solve this problem in a more elegant way than writing something like:
SELECT
  END_DAY_DATA.IO_PER_SECOND,
  START_DAY_DATA.IO_PER_SECOND
  END_DAY_DATA.IO_PER_SECOND - START_DAY_DATA.IO_PER_SECOND
........
and putting SortExpression="3" for third column! :(

UPDATE: Lack of time for experiments: so, I've used the last approach: SortExpression="3" :)
Alexander
Top achievements
Rank 1
 asked on 01 Mar 2012
1 answer
102 views
We have telerik license of version 2009.3.1314.35.

At one page, we have used radcombobox with ondemand rendering as below,

<telerik:RadComboBox ID="ddlEmployee" runat="server" Width="250px" Height="100px"
 EmptyMessage="Select employee " EnableLoadOnDemand="True" EnableVirtualScrolling="true"
OnItemsRequested="RadComboBox1_ItemsRequested" DataTextField="Name" DataValueField="EmpNo"
Skin="WindowsXP" OffsetX="2" AllowCustomText="True" EnableEmbeddedSkins="False"
EnableAjaxSkinRendering="False" EnableEmbeddedBaseStylesheet="False" EnableItemCaching="True"
ShowMoreResultsBox="True">
</telerik:RadComboBox>


My requirement is to enable on demand functionality for employee list. The objective is, at page load I should be able to set selectedvalue item to employee combbox and also to achieve on demand functionality in it

The above scenario works fine if I dont set selectedvalue item to combobox in page load.

My observation while debugging.
The problem with RadCombobox  is that if we bind the RadCombobox on page load, and try to click in combobox text area RadComboBox1_ItemsRequested is not get fired. However, if start writing something in RadCombobox text area RadComboBox1_ItemsRequested is get fired.

Please help us to achieve this functionality in combobox.

Thanks in advance.
Ivana
Telerik team
 answered on 01 Mar 2012
2 answers
78 views
I need to perform a postback on drag selection.  I currently use

OnMouseUp="GridMouseUp(this, event)" on the RadGrid element to call

function GridMouseUp(sender, e) {
    setTimeout(function () {
        var grid = $find(window.gridId);
        if (grid != null && grid.get_masterTableView().get_selectedItems().length > 0) {
            __doPostBack(window.gridUniqueId);
        }
    }, 0);
}

This works for the drag select case but also does postbacks when clicking on the filter textboxes which I do not want.  Is there any way in client code to detect OnMouseUp of a Drag select action?
David Cowan
Top achievements
Rank 1
 answered on 01 Mar 2012
0 answers
97 views
We want to use all the great AJAX features on the grid for sorting, paging, grouping, etc.  Let's assume a user opens a page in our application with an AJAX-enabled grid and sorts on several columns and pages within the dataset several pages.  Now the user double clicks a record which results in a navigation to a different page for more detail.  Now, the user wants to go back to the grid so they click the Back button in the browser.  I want to make sure my user returns back to page 2 with the appropriate sorting criteria applied.  Does the Telerik grid place entries in the browser history that record the sequence of events (sorting and paging) prior to drilling down to the different page?    Is this sort of functionality built-in to the grid so we don't have to worry about maintaining some session state on the server?
David
Top achievements
Rank 2
 asked on 01 Mar 2012
3 answers
148 views
Hello,

I'm trying to use the OrgChart for a tournament table layout. This means that you go from many items to fewer items. I know it is (for now) not yet supported to set the orientation from left to right but i can work around this and use top to bottom. To allow 2 items to melt into 1, i use grouping. This only works for one level though. as soon as the top level is halved, i need the second level to group 2 items together.
So i go from 8 items to 4items to 2 items to 1. This is in my opinion not possible with the current OrgChart.

multiple parents would be a great feature and would solve my problem.

Do you have any idea on when this feature might be introduced? Or do you have a workaround using another control or multiple groupings?

Thank you,

Phill
Peter Filipov
Telerik team
 answered on 01 Mar 2012
1 answer
114 views
Hi,

I am trying to solve a very simple thing but somehow not able to get it working. 

I have a RadComboBox and radtreeview as one of its items. Now, I want to enable user to select only the leaf node. I have marked "Postback" attribute to false if the node is not leaf. so it solves the purpose of firing an event. 

Now , what is happening is, when user clicks parent node, it expands the node but then disappears. so user again have to click the combo box to select. 

Is there anyway i can disable the disappearing of radtreeview in combo box ? 

I have attached some screenshot and my code. I want my dropdown list to look like Pic-2 when i click the parent node. Currently it looks like Pic-1 after i click the parent node. 

Code : OnClientNodeClicking

 var node = eventArgs.get_node();
    if (node.get_level() != 2) {
        node.expand();
return; }

Please help.
Plamen
Telerik team
 answered on 01 Mar 2012
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?