Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
197 views
When you assign session value null, it is not cleared, there climbs value "WebResource.axd", as if once again set to null, it will display "Telerik.Web.UI.WebResource.axd" and is not removed until the session does not die?
Egor
Top achievements
Rank 1
 answered on 24 Nov 2010
2 answers
77 views
Hi there,

I am using the RadScheduler, and would like to use the Sitefinity skin.  However, the Sitefinity skin's context menu styles are not ideal as they do not provide visual feedback when the user hovers over an item.  My question is can I use the RadStylesheetManager to specify that some styles should be drawn from one skin but some from another?  IE, all the styles for the Sitefinity skin EXCEPT the Menu styles, which should come from say Web20?  I understand that I can create my own skin by copying an existing skin, but I'd prefer to avoid this as I'd like to use the CDN if possible.

Is what I'm after possible?

Thanks for your help.

Matthew
Matthew
Top achievements
Rank 1
 answered on 24 Nov 2010
1 answer
322 views
I am using ASP.NET AJAX v2010.2.929.35.

I have a RadGrid on a page, using EditMode=Popup. I have two separate GridTemplateColumns, both contain a separate RadComboBox (RadComboBoxSport and RadComboBoxPositionCategory). What I am trying to accomplish is this: in Edit or Insert mode, when you choose an item from RadComboBoxSport (OnSelectedIndexChanged) it will grab the SelectedValue of RadComboBoxSport, and call ItemsRequested() on RadComboBoxPositionCategory and pass in the selected value to the server side code (protected void RadComboBoxPositionCategory_ItemsRequested). Based on the value chosen in RadComboBoxSport , it will update the values in RadComboBoxPositionCategory accordingly.

This all works very well in INSERT/ADD mode, but when it comes to editing an existing record it fails update the values in RadComboBoxPositionCategory at all, it leaves the values that were there when the edit popup window appeared.  I believe the issue may be related to a mixture of this post and this post (I've tried attaching the event handler in the ItemCreated method but it did not work).

I have stepped through the code on the server side, specifically the method  and I have found that RadComboBoxPositionCategory_ItemsRequested (this is combo box # 2) has DIFFERENT RadComboBox.UniqueID's passed in to it. When in INSERT/ADD mode, the ComboBox has a UniqueID of:
ctl00$ctl00$MasterMainContent$MainContent$ucSetupPosition$RadGrid1$ctl00$ctl02$ctl03$RadComboBoxPositionCategory

but when in Edit mode the UniqueID is:
ctl00$ctl00$MasterMainContent$MainContent$ucSetupPosition$RadGrid1$ctl00$ctl11$RadComboBoxPositionCategory

So it seems like the RadComboBoxPositionCategory isn't being updated during EDIT mode because it is actually a different RadComboBox that is generated at runtime maybe? Regardless, I can't get it to update the values. The code executes just fine in the RadComboBoxPositionCategory_ItemsRequested method, and focus returns back to the second combo box, but values are not updated.

I have included some key snippets of code for you.

ASPX:
<script type="text/javascript">
    // Must hard code IDs due to Telerik quirkiness
    var radComboPosCatID = 'RadComboBoxPositionCategory';
    function RadComboBoxSport_SelectedIndexChanged(sender, eventArgs) {
        var comboSport = eventArgs.get_item();
        var comboPosCat = GetRadComboBoxFromPage(radComboPosCatID);
        if (comboPosCat != null && comboSport.get_value() > 0) {
            comboPosCat.clearSelection();
            // Fire off call to refresh Position Category dropdown
            comboPosCat.requestItems(comboSport.get_value(), false); // false=clear items
        }
    }
 
    function RadComboBoxPositionCategory_ItemsRequested(sender, eventArgs) {
        //TODO: Resolve issue where, if Grid is in Edit mode (vs. insert mode), this method will not fire
        // and dropdown will not update!
        var comboPosCat = sender;
        comboPosCat.set_text(sender.get_items().getItem(0).get_text());
        if (sender.get_items().get_count() > 0) {
            comboPosCat.showDropDown();
        }
    }
</script>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="WebBlue" />
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
    <asp:Label id="StatusMessage" runat="server" CssClass="errorText" />
    <telerik:RadGrid ID="RadGrid1" runat="server"
        AllowPaging="True"
        AllowSorting="True"
        AutoGenerateColumns="false"
        Skin="WebBlue"
        OnNeedDataSource="RadGrid1_NeedDataSource"
        OnUpdateCommand="RadGrid1_UpdateCommand"
        OnInsertCommand="RadGrid1_InsertCommand"
        OnDeleteCommand="RadGrid1_DeleteCommand"
        OnItemDataBound="RadGrid1_ItemDataBound">
        <PagerStyle
            VerticalAlign="Bottom"
            Mode="NextPrev" />
        <ClientSettings Scrolling-AllowScroll="true" />
        <MasterTableView
            EditMode="PopUp"
            DataKeyNames="PositionId,SportId,PositionCategoryId"
            CommandItemDisplay="Top">
            <EditFormSettings
                CaptionFormatString="Edit Position"
                InsertCaption="Add Position"
                PopUpSettings-Modal="false"
                EditColumn-ButtonType="ImageButton" />
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton">
                        <HeaderStyle Width="30px" />
                        <ItemStyle Width="30px" HorizontalAlign="Center" />
                    </telerik:GridEditCommandColumn>
                    <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"
                        ConfirmDialogType="Classic" ConfirmText="Are you sure you want to delete?">
                        <HeaderStyle Width="30px" />
                        <ItemStyle Width="30px" HorizontalAlign="Center" />
                    </telerik:GridButtonColumn>
                    <telerik:GridTemplateColumn UniqueName="Sport" SortExpression="Sport.Name" HeaderText="Sport" DataField="Sport.Name">
                        <ItemTemplate>
                            <asp:Label ID="lblSport" runat="server" Text='<%# Eval("Sport.Name") %>' />
                        </ItemTemplate>
                        <EditItemTemplate>
                            <telerik:RadComboBox runat="server" ID="RadComboBoxSport" AutoPostBack="true" OnClientSelectedIndexChanged="RadComboBoxSport_SelectedIndexChanged" />
                            <asp:RequiredFieldValidator runat="server" ID="rfvSport" ControlToValidate="RadComboBoxSport" InitialValue="Select..." Text="*" />
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>                   
                    <telerik:GridTemplateColumn UniqueName="PositionCategory" SortExpression="PositionCategory.CategoryName" HeaderText="Position Category" DataField="PositionCategory.CategoryName">
                        <ItemTemplate>
                            <asp:Label ID="lblPositionCategory" runat="server" Text='<%# Eval("PositionCategory.CategoryName") %>' />
                        </ItemTemplate>
                        <EditItemTemplate>
                            <telerik:RadComboBox runat="server" ID="RadComboBoxPositionCategory" EmptyMessage="Select a sport first..." OnClientItemsRequested="RadComboBoxPositionCategory_ItemsRequested" OnItemsRequested="RadComboBoxPositionCategory_ItemsRequested" />
                            <asp:RequiredFieldValidator runat="server" ID="rfvPositionCategory" ControlToValidate="RadComboBoxPositionCategory" InitialValue="Select..." Text="*" />
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>                   
                    <telerik:GridTemplateColumn UniqueName="PositionName" SortExpression="Name" HeaderText="Position Name" DataField="Name">
                        <ItemTemplate>
                            <div></div>
                            <asp:Label ID="lblPositionName" runat="server" Text='<%# Eval("Name") %>' />
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox runat="server" ID="txtPositionName" Text='<%# Bind("Name") %>' />
                            <asp:RequiredFieldValidator runat="server" ID="rfvPositionName" ControlToValidate="txtPositionName" Text="*" />
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn ReadOnly="true" UniqueName="LastUpdatedDate" SortExpression="LastUpdatedDate" HeaderText="Last Updated" DataField="LastUpdatedDate" DataFormatString="{0:g}" AllowSorting="false" />
                </Columns>
        </MasterTableView>
    </telerik:RadGrid>
</telerik:RadAjaxPanel>

Code-behind:
protected void Page_Load(object sender, EventArgs e)
{
 
}
 
#region Grid Events
 
protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    PositionCollection positions = new PositionCollection();
    positions = PositionBuilder.RetrieveList();
    RadGrid1.DataSource = positions;
}
 
protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
    try
    {
        if (e.Item is GridEditableItem && e.Item.IsInEditMode)
        {
            GridEditableItem item = e.Item as GridEditableItem;
 
            #region Sport Dropdown
            // Bind values to Sport dropdown list in edit/insert mode
            RadComboBox ddlSport = item.FindControl("RadComboBoxSport") as RadComboBox;
            SetSportOptions(ddlSport);
            // If in "Add" mode, ItemIndex == -1. We only want to load value in edit mode
            if (item.ItemIndex != -1)
            {
                int sportId = 0;
                Int32.TryParse(item.OwnerTableView.DataKeyValues[item.ItemIndex]["SportId"].ToString(), out sportId);
                ddlSport.SelectedValue = sportId.ToString();
 
                #region Position Category Dropdown
                // Bind values to Position Category dropdown list in edit mode ONLY if sportId is available
                if (sportId > 0)
                {
                    RadComboBox ddlPosCats = item.FindControl("RadComboBoxPositionCategory") as RadComboBox;
                    SetPositionCategoryOptions(ddlPosCats, sportId);
                    if (item.ItemIndex != -1)
                    {
                        int postCatid = 0;
                        Int32.TryParse(item.OwnerTableView.DataKeyValues[item.ItemIndex]["PositionCategoryId"].ToString(), out postCatid);
                        ddlPosCats.SelectedValue = postCatid.ToString();
                    }
                }
                #endregion
            }
            #endregion
 
        }
    }
    catch (Exception ex)
    {
        StatusMessage.Text = "Error: " + ex.Message;
        e.Canceled = true;
    }
}
 
protected void RadGrid1_UpdateCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
    try
    {
        // Clear out status message
        StatusMessage.Text = String.Empty;
 
        // Get the GridEditableItem of the RadGrid    
        GridEditableItem editedItem = e.Item as GridEditableItem;
 
        // Get the primary key value using the DataKeyValue   
        int positionId = Convert.ToInt32(editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["PositionId"]);
 
        string positionName = (editedItem.FindControl("txtPositionName") as TextBox).Text;
        int sportId = Convert.ToInt32((editedItem.FindControl("RadComboBoxSport") as RadComboBox).SelectedValue);
        int posCatId = Convert.ToInt32((editedItem.FindControl("RadComboBoxPositionCategory") as RadComboBox).SelectedValue);
 
        // Update value in table
        if (positionId > 0 && !String.IsNullOrEmpty(positionName) && sportId > 0 && posCatId > 0)
        {
            if (!PositionBuilder.Update(positionId, positionName, posCatId, sportId, DateTime.UtcNow, Page.UserId))
            {
                StatusMessage.Text = "Unable to update value. Please try again.";
                e.Canceled = true;
            }
            else
            {
                StatusMessage.Text = "Successfully updated value!";
            }
        }
 
        // Redraw grid
        RadGrid1.Rebind();
    }
    catch (Exception ex)
    {
        StatusMessage.Text = "Unable to update record. Reason: " + ex.Message;
        e.Canceled = true;
    }
}
 
protected void RadGrid1_InsertCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
    try
    {
        // Clear out status message
        StatusMessage.Text = String.Empty;
 
        GridEditFormInsertItem insertedItem = (GridEditFormInsertItem)e.Item;
 
        string positionName = (insertedItem.FindControl("txtPositionName") as TextBox).Text;
        int sportId = Convert.ToInt32((insertedItem.FindControl("RadComboBoxSport") as RadComboBox).SelectedValue);
        int posCatId = Convert.ToInt32((insertedItem.FindControl("RadComboBoxPositionCategory") as RadComboBox).SelectedValue);
 
        if (!String.IsNullOrEmpty(positionName) && sportId > 0 && posCatId > 0)
        {
            Position newPos = PositionBuilder.Add(positionName, posCatId, sportId, DateTime.Now, Page.UserId, DateTime.Now, Page.UserId);
            if (newPos.PositionId <= 0)
            {
                StatusMessage.Text = "Unable to insert record. Please try again.";
                e.Canceled = true;
            }
            else
            {
                StatusMessage.Text = "Successfully inserted record!";
            }
        }
    }
    catch (Exception ex)
    {
        StatusMessage.Text = "Unable to insert record. Reason: " + ex.Message;
        e.Canceled = true;
    }
}
 
protected void RadGrid1_DeleteCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
    try
    {
        int positionId = Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["PositionId"]);
 
        //TODO: SOFT DELETE
    }
    catch (Exception ex)
    {
        StatusMessage.Text = "Unable to delete record. Reason: " + ex.Message;
        e.Canceled = true;
    }
}
 
#endregion
 
#region ComboBox
 
protected void RadComboBoxPositionCategory_ItemsRequested(object source, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)
{
    try
    {
        //e.Text returns the value of the text parameter set on the client-side
        RadComboBox combo = (RadComboBox)source;
        combo.Items.Clear();
        int sportId = Convert.ToInt32(e.Text);
 
        SetPositionCategoryOptions(combo, sportId);
    }
    catch
    {
        // Do nothing
    }
}
 
#endregion
 
#region Dropdown Helpers
 
public void SetSportOptions(RadComboBox comboBox)
{
    RadComboBoxItemCollection items = new RadComboBoxItemCollection(comboBox);
    comboBox.Items.Add(new RadComboBoxItem("Select...", 0.ToString()));
 
    try
    {
        SportCollection sports = SportBuilder.RetrieveList(String.Empty, "Name ASC");
        foreach (Sport sport in sports)
        {
            comboBox.Items.Add(new RadComboBoxItem(sport.Name, sport.SportId.ToString()));
        }
    }
    catch
    {
        // Do nothing
    }
}
 
private void SetPositionCategoryOptions(RadComboBox comboBox, int sportId)
{
    RadComboBoxItemCollection items = new RadComboBoxItemCollection(comboBox);
    comboBox.Items.Add(new RadComboBoxItem("Select...", 0.ToString()));
    comboBox.SelectedValue = 0.ToString();
 
    try
    {
        PositionCategoryCollection posCats = PositionCategoryBuilder.RetrieveList(
            String.Format("SportId={0}",sportId), "CategoryName ASC");
        foreach (PositionCategory cat in posCats)
        {
            comboBox.Items.Add(new RadComboBoxItem(cat.CategoryName, cat.PositionCategoryId.ToString()));
        }
    }
    catch
    {
        // Do nothing
    }
}
 
#endregion

Any ideas on how I can get this second combobox to update on the client side while in Edit mode?
Kalina
Telerik team
 answered on 24 Nov 2010
6 answers
192 views
The text area populates, and combo indicates there are several items but I can't get the list to drop down.  A web service is attatched to combo by way of ObjectDataSource.

asp.net;
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" height="200px"
     width="95%">
     <telerik:RadComboBox ID="RadComboSearch" Runat="server" AutoPostBack="True"
         EmptyMessage="Type your search query here;" Height="98%"
         ShowDropDownOnTextboxClick="True" ShowMoreResultsBox="True"
         Text="Enter Search Criteria" Width="100%" AllowCustomText="True"
         EnableVirtualScrolling="True" MarkFirstMatch="True"
         DataSourceID="MyWebServices" DataValueField="StringResult" DataTextField="StringResult"
         EnableAutomaticLoadOnDemand="True" ItemsPerRequest="10"
         >
     </telerik:RadComboBox>
     <asp:ObjectDataSource ID="MyWebServices" runat="server" SelectMethod="SearchBoxResult"
   
         TypeName="NVSS_Manual.Lookup" >
         <SelectParameters>
             <asp:ControlParameter ControlID="RadComboSearch" Name="SearchString"
                 PropertyName="Text" Type="String" />
         </SelectParameters>
     </asp:ObjectDataSource>
 </telerik:RadAjaxPanel>

The data provider is a method on the page that calls a web service and converts the dataset to a datatable

public DataTable SearchBoxResult(string SearchString)
{
    DataTable ReturnValue = null;
    NVSS_ManualWebService.NVSS_Manual_WebService ws = new NVSS_ManualWebService.NVSS_Manual_WebService();
    DataSet ds =ws.Search_BoxResult();
    ReturnValue = ds.Tables[0];
    return ReturnValue;
}

The web service is simply plugs some values into a dataset for purpose of demonstration;

...
[WebMethod]
    public DataSet Search_BoxResult()
    {
        DataSet ds = new DataSet();
        DataTable dt = new DataTable();
        DataColumn dc=new DataColumn("StringResult", Type.GetType("System.String"));
        dt.Columns.Add(dc);
        ds.Tables.Add(dt);
 
        dt.Rows.Add("Appendicitus");
        dt.Rows.Add("aaa1");
        dt.Rows.Add("aaa3");
        dt.Rows.Add("aaa2");
        return ds;
    }
...

see also attached.

Would be grateful for any ideas.  Thank you.
John
Top achievements
Rank 1
 answered on 24 Nov 2010
2 answers
213 views
For version 2010.2.826.40. I have set a radlistbox so it will alternate every other row background with a different color.  Doing that caused the side effect that the mouse over color doesn't change as would be the case in the list box's default behavior.

protected void Load_ManualWithFoundContent(string SearchResult)
        {
            WebServiceProxy wsp = new WebServiceProxy();
            DataSet ManualsWithSearchResults = wsp.GetServicesHandle.Search_ManualTitlesResult(SearchResult);
            DataTable dt = ManualsWithSearchResults.Tables[0];
            DataRowCollection drc = dt.Rows;
 
            RadListBoxItemCollection rlbic = RadList_ManualsWithFoundContent.Items;
 
            int i = 0;
            foreach (DataRow dr in drc)
            {
                RadListBoxItem rlbi = new RadListBoxItem(dr["ManualName"].ToString(), dr["pKey"].ToString());
                rlbi.BackColor = i++ %2 ==0 ? Color.WhiteSmoke : Color.White;
                 
                rlbic.Add(rlbi);
            }
        }

My thought on this is I need to add a handler client side for mouse over?
function RadList_ManualsWithFoundContent_OnClientMouseOver(sender, evenArgs) {
  ...???set item color???...   
}
Not sure how to do this (looking through client side api).

Thanks in advance
John
Top achievements
Rank 1
 answered on 24 Nov 2010
6 answers
299 views
How do I change the cursor in the radgrid when drag with some checking?

I'm able to use document.body.style.cursor= "hand", but the row does apply.

Thanks in advance.
Dimo
Telerik team
 answered on 24 Nov 2010
5 answers
136 views
Is it possible to display text under each pictures in coverflow mode?
jc mag
Top achievements
Rank 1
 answered on 24 Nov 2010
2 answers
143 views
Hi,
I am using two tables in a data set. I need to bind these two tables in two different rad charts.
Is it possible ?
If so can you please explain the steps to achieve this ?
Antony
Top achievements
Rank 1
 answered on 24 Nov 2010
1 answer
198 views
I have requirement in web project to be able to load a word document, edit it and save it back to the server.

Will RadEditor allow me to do it?
How can an load the word document in RadEditor?
Only option I saw was to export the content of RadEditor to PDF or RTF. Is there an option to save the contents as word document?

Please let me know ASAP.
msoor 
Rumen
Telerik team
 answered on 24 Nov 2010
1 answer
81 views
I have the RadGrid with drag and drop function and context menu. When I select multiple rows and right click, the context menu shown and the "no access" cursor is also appear (change of "no access" cursor is in ongriddragstarted event).

How do I stop triggering the OnRowDragStarted when right click on the selected multiple rows? Thanks!!

aspx:
<%@ Page Language="C#" AutoEventWireup="true" Codebehind="Default.aspx.cs" Inherits="Default" %>
  
<html>
<head runat="server">
    <title></title>
    <style type="text/css">
    .noAccessCursor, .noAccessCursor *
    {
        cursor:url('noaccess.cur'), default !important;
    }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager" runat="server" />
        <telerik:RadScriptBlock runat="server" ID="ScriptBlock">
  
            <script type="text/javascript">
            function gridRowContextMenu(sender, args)
            {
                // remove the cursor cause but the onrowdragstarted
                Sys.UI.DomElement.removeCssClass(document.documentElement, "noAccessCursor");
                  
                var evt = args.get_domEvent();
                if(evt.target.tagName == "INPUT" || evt.target.tagName == "A") 
                    return;
                      
                var menu = $find("<%= ContextMenu1.ClientID %>");
                  
                menu.show(evt);
  
                //evt.cancelBubble = true;
                //evt.returnValue = false;
  
                //if (evt.stopPropagation)
                //{
                //    evt.stopPropagation();
                //    evt.preventDefault();
                //} 
            }
  
            var destTaxonomyID;
            //var expandedNodes = [];
            function gridRowDropping(sender, args) 
            {
                args.set_cancel(true);
                alert("Dropped");
                  
                // reset the cursor to default
                Sys.UI.DomElement.removeCssClass(document.documentElement, "noAccessCursor");
            }
  
            function gridRowDragStarted(sender, args)
            {
                Sys.UI.DomElement.addCssClass(document.documentElement, "noAccessCursor");
            }
            </script>
  
        </telerik:RadScriptBlock>
        <telerik:RadContextMenu ID="ContextMenu1" runat="server" Skin="Vista">
            <Items>
                <telerik:RadMenuItem Text="Menu 1" />
                <telerik:RadMenuItem Text="Menu 2" />
            </Items>
            <Targets>
                <telerik:ContextMenuControlTarget ControlID="GridDocument" />
            </Targets>
        </telerik:RadContextMenu>
        <telerik:RadGrid ID="Grid1" runat="server" AutoGenerateColumns="False" Skin="Vista"
            AllowPaging="True" AllowSorting="True" AllowMultiRowSelection="true" GridLines="None"
            Width="100%" Height="345px" BorderWidth="0px" OnRowDrop="Grid1_RowDrop">
            <PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric" />
            <MasterTableView DataKeyNames="ID" ClientDataKeyNames="ID" TableLayout="Fixed">
                <Columns>
                    <telerik:GridBoundColumn DataField="Title" HeaderText="Title" UniqueName="Title">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings EnableRowHoverStyle="True" AllowRowsDragDrop="true">
                <Selecting AllowRowSelect="True"></Selecting>
                <ClientEvents OnRowContextMenu="gridRowContextMenu" OnRowDropping="gridRowDropping"
                    OnRowDragStarted="gridRowDragStarted" />
                <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                <Resizing AllowColumnResize="True" EnableRealTimeResize="true" ClipCellContentOnResize="true">
                </Resizing>
            </ClientSettings>
        </telerik:RadGrid>
    </form>
</body>
</html>

using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
  
public partial class Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            DataTable tb = new DataTable();
            tb.Columns.Add("ID");
            tb.Columns.Add("Title");
  
            for (int i = 0; i < 10; i++)
            {
                DataRow row = tb.NewRow();
                row["ID"] = i;
                row["Title"] = "Title " + i;
                tb.Rows.Add(row);
            }
  
            Grid1.DataSource = tb;
            Grid1.DataBind();
        }
    }
  
    protected void Grid1_RowDrop(object sender, GridDragDropEventArgs e)
    {
  
    }
}
Dimo
Telerik team
 answered on 24 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?