Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
121 views
Hello,
I have an issue with Client binding and Vertical scrolling
When I am using regular binding with <asp:SqlDataSource ID="SqlDataSource1"  it works fine ( please see image 1) I have special column for scrolling . Once I am using  Client binding like :
 tableView.set_dataSource(result);
 tableView.dataBind();
I am getting no special column for vertical scroll and than I have many rows and scroll appears it moves all information left (see image number 2)

Please advise !!!


Pavlina
Telerik team
 answered on 09 Dec 2010
1 answer
64 views
i want to add Special jewish holiday Setting in Schedular with different Color and Header.

How Can I set?
Veronica
Telerik team
 answered on 09 Dec 2010
1 answer
86 views
Hi,

Is there a drag and drop facility available for the RadUpload control ? Similar to the one available in your silverlight control.

Thanks,
Aash.
Yana
Telerik team
 answered on 09 Dec 2010
3 answers
96 views
Why is this still decorating checkboxes!?!?!?!?! I want my client-side events back!!!!

<telerik:RadFormDecorator ID="uxTelerikFormDecorator" runat="server" Skin="Outlook"
    DecoratedControls="Buttons,Fieldset,GridFormDetailsViews,Label,RadioButtons,Scrollbars,Textarea,Textbox,SELECT,ValidationSummary,Zone"
    ControlsToSkip="CheckBoxes" EnableRoundedCorners="true" />

This is on localhost: I have shift-refreshed the page; I have stopped the Development Server and restarted debugging; no luck.
Iana Tsolova
Telerik team
 answered on 09 Dec 2010
1 answer
139 views
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using BusinessLogic;
using System.Collections.Generic;
using System.Data.SqlClient;
using Microsoft.ApplicationBlocks.Data;
using Telerik.Web.UI;
  
  
public partial class Designers : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);
        manager.AjaxSettings.AddAjaxSetting(manager, rdDesigner);
        manager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(RadAjaxManager1_AjaxRequest);  
  
    }
    protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
    {
        if (e.Argument == "Rebind")
        {
            rdDesigner.MasterTableView.SortExpressions.Clear();
            rdDesigner.MasterTableView.GroupByExpressions.Clear();
            rdDesigner.Rebind();
        }
        else if (e.Argument == "RebindAndNavigate")
        {
            rdDesigner.MasterTableView.SortExpressions.Clear();
            rdDesigner.MasterTableView.GroupByExpressions.Clear();
            rdDesigner.MasterTableView.CurrentPageIndex = rdDesigner.MasterTableView.PageCount - 1;
            rdDesigner.Rebind();
        }
    }
    protected void rdDesigner_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
    {
        try
        {
            //int Designerid = Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["DesignerId"].ToString());
  
        }
        catch (Exception ex)
        {
  
            throw ex;
        }
  
    }
    protected void rdDesigner_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
        try
        {
            if (e.Item is Telerik.Web.UI.GridDataItem)
            {
  
                ImageButton editButton = (ImageButton)e.Item.FindControl("EditButton");
                editButton.Attributes["onclick"] = String.Format("return ShowEditForm('{0}','{1}');", e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["DesignerId"], e.Item.ItemIndex);
            }
            //if (e.Item is Telerik.Web.UI.GridDataItem)
            //{
            //ImageButton editButton = (ImageButton)e.Item.FindControl("EditButton");
            //editButton.Attributes["onclick"] = String.Format("return ShowEditForm('{0}','{1}');", e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["DesignerId"], e.Item.ItemIndex);
  
            //}
        }
        catch (Exception ex)
        {
  
            throw ex;
        }
  
    }
    protected void rdDesigner_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        try
        {
            DataSet ds = SqlHelper.ExecuteDataset(Globals.ConnectionString, CommandType.StoredProcedure, "getDesigners", null);
            rdDesigner.DataSource = ds;
            //ViewState["DataSetCustomer"] = ds;
        }
        catch (Exception ex)
        {
  
            throw ex;
        }
    }
  
    // protected void EditButton_Onclick(object sender, EventArgs e)
    // {
    //   try
    // {
  
    // }
    //catch (Exception ex)
    //{
  
    //  throw ex;
    //}
    // }
}
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Designers.aspx.cs" MasterPageFile="~/MasterPage.master"
    Inherits="Designers" %>
  
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="cntBody" ContentPlaceHolderID="Content" runat="Server">
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
        <Windows>
            <telerik:RadWindow ID="UserListDialog" runat="server" Title="Editing record" Height="300px"
                Width="300px" Left="150px" ReloadOnShow="true" ShowContentDuringLoad="false"
                Modal="true" />
        </Windows>
    </telerik:RadWindowManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rdDesigner" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rdDesigner" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <%-- <script type="text/javascript">
        Telerik.Web.UI.RadWindow.prototype.oldClose = Telerik.Web.UI.RadWindow.prototype.close;
        Telerik.Web.UI.RadWindow.prototype.close = function(arg) {
        if (this.get_name() == "Wardrobe") {
            top.location.reload();
            // var res = confirm("Are you sure you want to close RadWindow");
            //if (res) 
            this.oldClose(arg);
        }
        else {
            this.oldClose(arg);
        }
    
        }
       function ShowEditForm(id) 
        {
        window.radopen("ManageDesigners.aspx?UID=" + id, "UserListDialog");
        return false;
        }           
        function ShowInsertForm() 
        {
         window.radopen("ManageDesigners.aspx", "UserListDialog");
         return false;
        }
        function RowDblClick(sender, eventArgs) {
        window.radopen("ManageDesigners.aspx?UID=" + eventArgs.getDataKeyValue("DesignerId"), "UserListDialog");
        }
        function GetRadWindow() {
        var oWindow = null;
        if (window.radWindow) oWindow = window.radWindow;
        else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
        return oWindow;
        }
        </script>--%>
  
        <script type="text/javascript">
                function ShowEditForm(id, rowIndex) {
                     
                   // var grid = $find("<%= rdDesigner.ClientID %>");
                   // var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();
                   // grid.get_masterTableView().selectItem(rowControl, true);
  
                    window.radopen("ManageDesigners.aspx?UID=" + id, "UserListDialog");
                    return false;
                }
                function ShowInsertForm() {
                    window.radopen("ManageDesigners.aspx", "UserListDialog");
                    return false;
                }
                function RowDblClick(sender, eventArgs) {
                    window.radopen("ManageDesigners.aspx?UID=" + eventArgs.getDataKeyValue("DesignerId"), "UserListDialog");
                }
                function refreshGrid(arg)
                {
                    if (!arg) {
                        $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
                    }
                    else {
                        $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate");
                    }
                }
                
  
        </script>
  
    </telerik:RadCodeBlock>
    <asp:Button ID="btnDesigner" runat="server" Text="Add Designer" OnClientClick="return ShowInsertForm()"
        Visible="True" />
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadGrid ID="rdDesigner" runat="server" AutoGenerateColumns="False" AllowPaging="True"
        AllowSorting="True" GridLines="None" Height="100%" OnItemCreated="rdDesigner_ItemCreated"
        PageSize="10" OnItemCommand="rdDesigner_ItemCommand" OnNeedDataSource="rdDesigner_NeedDataSource">
        <MasterTableView DataKeyNames="DesignerId" ClientDataKeyNames="DesignerId" EditMode="InPlace">
            <RowIndicatorColumn>
                <HeaderStyle Width="20px" />
            </RowIndicatorColumn>
            <ExpandCollapseColumn>
                <HeaderStyle Width="20px" />
            </ExpandCollapseColumn>
            <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
            <Columns>
                <telerik:GridTemplateColumn UniqueName="TemplateColumn1">
                    <ItemTemplate>
                        <asp:ImageButton ID="EditButton" runat="server" ImageUrl="~/Images/edit.gif" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn DataField="DesignerName" HeaderText="Name">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DesignerDescription" HeaderText="Description">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DisplayOrder" HeaderText="Display Order">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Status" HeaderText="Status">
                </telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="headerPlaceHolder">
    <style type="text/css">
        .style1
        {
            height: 12;
            width: 97%;
        }
        .style2
        {
            height: 215;
            width: 97%;
        }
        .style3
        {
            height: 9;
            width: 97%;
        }
    </style>
</asp:Content>
these are my parent.cs and Aspx file
and
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using BusinessLogic;
using System.IO;
using Microsoft.ApplicationBlocks.Data;
using Telerik.Web.UI;
using System.Data.SqlClient;
  
public partial class ManageDesigners : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack == false)
        {
            if (Request.QueryString["UID"] != null)
            {
                imgBanner.Visible = true;
                imgLogo.Visible = true;
                lblError.Visible = false;
                int aspnetUserId = Convert.ToInt32(Request.QueryString["UID"].ToString());
                Users user = new Users();
                DataSet ds = user.getDesigner(aspnetUserId);
                DataTable Dt = ds.Tables[0];
                txtDescription.Text = Dt.Rows[0]["DesignerDescription"].ToString();
                txtDesignerName.Text = Dt.Rows[0]["DesignerName"].ToString();
                txtDisplayOrder.Text = Dt.Rows[0]["DisplayOrder"].ToString();
                ddlStatus.SelectedValue = Dt.Rows[0]["Status"].ToString();
                string Bannerfolder = MapPath("~/DesignerBanner/");
                DirectoryInfo BannerDir = new DirectoryInfo(Bannerfolder);
                imgBanner.ImageUrl = Bannerfolder + Dt.Rows[0]["BannerImage"].ToString();
                imgBanner.DataBind();
                string logoFolder = MapPath("~/DesignerLogo/");
                DirectoryInfo LogodDir = new DirectoryInfo(logoFolder);
                imgLogo.ImageUrl = logoFolder + Dt.Rows[0]["LogoImage"].ToString();
                imgLogo.DataBind();
                btnAdd.Text = "Update";
            }
        }
    }
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        try
        {
            if (Request.QueryString["UID"] != null)
            {
  
                Users user = new Users();
                Int32 DesignerId = Convert.ToInt32(Request.QueryString["UID"].ToString());
                imgBanner.Visible = true;
                imgLogo.Visible = true;
                string filename = Convert.ToString(System.IO.Path.GetFileNameWithoutExtension(fuBannerImage.FileName) + "_Banner");
                string fileExtention = Convert.ToString(System.IO.Path.GetExtension(fuBannerImage.FileName));
                string bannerImage = filename + fileExtention;
                string filelogoname = Convert.ToString(System.IO.Path.GetFileNameWithoutExtension(fuLogoImage.FileName) + "_Logo");
                string filelogoextention = Convert.ToString(System.IO.Path.GetExtension(fuLogoImage.FileName));
                string LofoFile = filelogoname + filelogoextention;
                int DisplayMember = Convert.ToInt32(txtDisplayOrder.Text);
                string status = ddlStatus.SelectedItem.Text;
                bool Screename = Convert.ToBoolean(1);
                fuBannerImage.SaveAs(Server.MapPath("~/DesignerBanner/") + bannerImage);
                fuLogoImage.SaveAs(Server.MapPath("~/DesignerLogo/") + LofoFile);
  
                user.UpdateDesigners(DesignerId, txtDesignerName.Text, bannerImage, LofoFile, txtDescription.Text, DisplayMember, status, Screename);
                //Reset();
            }
            else
            {
                imgBanner.Visible = false;
                imgLogo.Visible = false;
                Users user = new Users();
                string filename = Convert.ToString(System.IO.Path.GetFileNameWithoutExtension(fuBannerImage.FileName) + "_Banner");
                string fileExtention = Convert.ToString(System.IO.Path.GetExtension(fuBannerImage.FileName));
                string bannerImage = filename + fileExtention;
                string filelogoname = Convert.ToString(System.IO.Path.GetFileNameWithoutExtension(fuLogoImage.FileName) + "_Logo");
                string filelogoextention = Convert.ToString(System.IO.Path.GetExtension(fuLogoImage.FileName));
                string LofoFile = filelogoname + filelogoextention;
                int DisplayMember = Convert.ToInt32(txtDisplayOrder.Text);
                string status = ddlStatus.SelectedItem.Text;
                bool Screename = Convert.ToBoolean(1);
                fuBannerImage.SaveAs(Server.MapPath("~/DesignerBanner/") + bannerImage);
                fuLogoImage.SaveAs(Server.MapPath("~/DesignerLogo/") + LofoFile);
  
                user.AddDesigners(txtDesignerName.Text, bannerImage, LofoFile, txtDescription.Text, DisplayMember, status, Screename);
                //Reset();
            }
            //ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CloseAndRebind();", true);  
        }
        catch (Exception ex)
        {
  
            throw ex;
        }
    }
  
    private void Reset()
    {
        try
        {
            txtDescription.Text = string.Empty;
            txtDesignerName.Text = string.Empty;
            txtDisplayOrder.Text = string.Empty;
            ddlStatus.SelectedIndex = -1;
        }
        catch (Exception ex)
        {
  
            throw ex;
        }
    }
    protected void txtDesignerName_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string DesignerName = txtDesignerName.Text;
            Users user = new Users();
            DataSet dsDesigner = user.getCheckDesigner(DesignerName);
            DataTable dtDesigner = dsDesigner.Tables[0];
            if (dtDesigner.Rows.Count > 0)
            {
                lblError.Visible = true;
                txtDesignerName.Text = string.Empty;
            }
            else
            {
                lblError.Visible = false;
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
}
And ASpx file
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ManageDesigners.aspx.cs"
    Inherits="ManageDesigners" %>
  
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
    <link href="includes/syd.css" rel="stylesheet" type="text/css" />
  
   <script language="javascript" type="text/javascript">
          function CloseAndRebind(args) {
                GetRadWindow().BrowserWindow.refreshGrid(args);
                GetRadWindow().close();
            }
  
            function GetRadWindow() {
                var oWindow = null;
                if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)
  
                return oWindow;
            }
  
            function CancelEdit() {
                GetRadWindow().close();
            }
  
    </script>
  
</head>
<body style="background-color: #C1C1C1">
    <form id="Form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Sitefinity"
        DecoratedControls="All"  />
    <table width="100%">
        <tr>
            <td style="width: 30%">
            </td>
            <td style="width: 15%">
                Designer Name
            </td>
            <td style="width: 25%">
                <asp:UpdatePanel ID="upDesigner" runat="server">
                    <ContentTemplate>
                        <asp:TextBox ID="txtDesignerName" runat="server" OnTextChanged="txtDesignerName_TextChanged"
                            AutoPostBack="True"></asp:TextBox>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
            <td style="width: 30%">
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <asp:Label ID="lblError" runat="server" ForeColor="Red" Text="Designer Already In List"
                            Visible="False"></asp:Label>
                        <asp:RequiredFieldValidator ID="rfvtxtDesignerName" runat="server" ErrorMessage="*"
                            ControlToValidate="txtDesignerName"></asp:RequiredFieldValidator>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                Banner Image
            </td>
            <td>
                <asp:Image ID="imgBanner" runat="server" Height="50px" Width="100px" Visible="false" />
                <br />
                <asp:FileUpload ID="fuBannerImage" runat="server" />
            </td>
            <td>
                 </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                Logo Image
            </td>
            <td>
                <asp:Image ID="imgLogo" runat="server" Height="50px" Width="100px" Visible="false" />
                <br />
                <asp:FileUpload ID="fuLogoImage" runat="server" />
            </td>
            <td>
                 </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                Description
            </td>
            <td>
                <asp:TextBox ID="txtDescription" runat="server" Style="width: 181px" TextMode="MultiLine"
                    Height="50px" Width="196px"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="rfvDescription" runat="server" ErrorMessage="*" ControlToValidate="txtDescription"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                Display order
            </td>
            <td>
                <asp:TextBox ID="txtDisplayOrder" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="*"
                    ControlToValidate="txtDisplayOrder"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                Status
            </td>
            <td>
                <asp:DropDownList ID="ddlStatus" runat="server" Width="130px">
                    <asp:ListItem Value="1">Active</asp:ListItem>
                    <asp:ListItem Value="0">InActive</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td>
                   
            </td>
        </tr>
    </table>
    <table border="0" cellspacing="0" cellpadding="0" style="width: 100%; vertical-align: top">
        <tr>
            <td align="center" style="vertical-align: top;">
                <asp:Button ID="btnAdd" Text="Add" runat="server" TabIndex="15" EnableViewState="False"
                    OnClick="btnAdd_Click" />
                <input type="button" onclick="CloseAndRebind()" value="Cancel" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>


And I m try to reload my radDrid After Managedesigner.aspx window Close but Its not happening please help me
Veli
Telerik team
 answered on 09 Dec 2010
1 answer
75 views
Necesito conectar un Radgrid con un webservice tanto para listar, consultar, agregar, modificar y para borrar, cual seria la mejor forma de hacerlo.

Gracias.
Iana Tsolova
Telerik team
 answered on 09 Dec 2010
2 answers
312 views

Okay, so I have a RadGrid that is being filled with data.  I have an edit column.  I click the edit column, change a record, and hit update.  It posts back to the page, and goes back to the radgrid, only the update didn't happen. 

1. My first assumption was that I forgot to set it up so that radgrid would refresh, so I check the data table in the SQL database, only to find that the update simply didn't happen, so...

2. I check the ObjectDataSource; yup, all parameters exist.

3. I check the SQL to make sure the update is correct.  Yup, the update is correct.

So in essence, all my code is correct, it's Radgrid that is not working.  The question is, why?  If anyone has a clue, please let me know.  It's probably something that tired eyes are merely overlooking.  I think I lost a little more of my hair over this one...lol. 

...so here's the relevant .aspx code;

<telerik:RadGrid ID="RecentReviewsGrid" runat="server" 
    AllowAutomaticUpdates="True" AllowPaging="True" AllowSorting="True" 
    AutoGenerateColumns="False" DataSourceID="dsTransactionReview" GridLines="None" 
    HorizontalAlign="Center" PageSize="20">
    <mastertableview datakeynames="TransactionID" 
    datasourceid="dsTransactionReview" headerstyle-horizontalalign="Center">
        <commanditemsettings exporttopdftext="Export to Pdf" />
        <rowindicatorcolumn>
            <HeaderStyle Width="20px" />
        </rowindicatorcolumn>
        <expandcollapsecolumn>
            <HeaderStyle Width="20px" />
        </expandcollapsecolumn>
        <Columns>
            <telerik:GridBoundColumn 
                DataField="TransactionID" 
                DataType="System.Int32" 
                HeaderText="TransactionID" 
                ReadOnly="True" 
                SortExpression="TransactionID" 
                UniqueName="TransactionID" 
                Visible="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn 
                DataField="OrderID" 
                DataType="System.Int32" 
                HeaderText="OrderID" 
                SortExpression="OrderID" 
                UniqueName="OrderID">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn 
                DataField="OrderDate" 
                DataType="System.DateTime" 
                HeaderText="OrderDate" 
                SortExpression="OrderDate" 
                UniqueName="OrderDate" 
                Visible="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn 
                DataField="CreatedBy" 
                HeaderText="CreatedBy" 
                SortExpression="CreatedBy" 
                UniqueName="CreatedBy">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn 
                DataField="CategoryType" 
                HeaderText="CategoryType" 
                SortExpression="CategoryType" 
                UniqueName="CategoryType">
            </telerik:GridBoundColumn>
            <telerik:GridCheckBoxColumn 
                DataField="IsEntryCorrect" 
                DataType="System.Boolean" 
                HeaderStyle-Width="50px" 
                HeaderText="Correct Code?" 
                ItemStyle-Width="50px" 
                SortExpression="IsEntryCorrect" 
                UniqueName="IsEntryCorrect">
                <HeaderStyle Width="50px" />
                <ItemStyle Width="50px" />
            </telerik:GridCheckBoxColumn>
            <telerik:GridCheckBoxColumn 
                DataField="Suitable" 
                DataType="System.Boolean" 
                HeaderStyle-Width="50px" 
                HeaderText="Suitable?" 
                ItemStyle-Width="50px" 
                SortExpression="Suitable" 
                UniqueName="Suitable">
                <HeaderStyle Width="50px" />
                <ItemStyle Width="50px" />
            </telerik:GridCheckBoxColumn>
            <telerik:GridBoundColumn 
                DataField="CorrectCode" 
                HeaderText="Correct Code" 
                SortExpression="CorrectCode" 
                UniqueName="CorrectCode">
            </telerik:GridBoundColumn>
            <telerik:GridCheckBoxColumn 
                DataField="NeedCoached" 
                DataType="System.Boolean" 
                HeaderStyle-Width="50px" 
                HeaderText="Need Coached?" 
                ItemStyle-Width="50px" 
                SortExpression="NeedCoached" 
                UniqueName="NeedCoached">
                <HeaderStyle Width="50px" />
                <ItemStyle Width="50px" />
            </telerik:GridCheckBoxColumn>
            <telerik:GridBoundColumn 
                DataField="Comments" 
                HeaderText="Comments" 
                SortExpression="Comments" 
                UniqueName="Comments">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn 
                DataField="DateReviewed" 
                DataType="System.DateTime" 
                HeaderText="Review Date" 
                SortExpression="DateReviewed" 
                UniqueName="DateReviewed">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn 
                DataField="Reviewer" 
                HeaderText="Reviewer" 
                SortExpression="Reviewer" 
                UniqueName="Reviewer">
            </telerik:GridBoundColumn>
            <telerik:GridEditCommandColumn UniqueName="EditCommand">
            </telerik:GridEditCommandColumn>
        </Columns>
        <HeaderStyle HorizontalAlign="Center" />
    </mastertableview>
</telerik:RadGrid>
  
<asp:ObjectDataSource ID="dsTransactionReview" runat="server" 
    DeleteMethod="Delete" 
    OldValuesParameterFormatString="{0}" 
    SelectMethod="GetData" 
    TypeName="Pan_App.PanDataTableAdapters.Tink_CoachingTableAdapter" 
    UpdateMethod="Update">
    <DeleteParameters>
        <asp:Parameter Name="TransactionID" Type="Int32" />
    </DeleteParameters>
    <UpdateParameters>
        <asp:Parameter Name="OrderID" Type="Int32" />
        <asp:Parameter Name="OrderDate" Type="DateTime" />
        <asp:Parameter Name="CreatedBy" Type="String" />                        
        <asp:Parameter Name="CategoryType" Type="String" />
        <asp:Parameter Name="IsEntryCorrect" Type="Boolean" />
        <asp:Parameter Name="Suitable" Type="Boolean" />
        <asp:Parameter Name="CorrectCode" Type="String" />
        <asp:Parameter Name="NeedCoached" Type="Boolean" />
        <asp:Parameter Name="Comments" Type="String" />
        <asp:Parameter Name="DateReviewed" Type="DateTime" />                            
        <asp:Parameter Name="Reviewer" Type="String" />
        <asp:Parameter Name="TransactionID" Type="Int32" />
    </UpdateParameters>
</asp:ObjectDataSource>

I think that about covers it.  Here's the Update command for SQL:
UPDATE    TableName
SET              
    OrderID = @OrderID, 
    OrderDate = @OrderDate, 
    CreatedBy = @CreatedBy, 
    CategoryType = @CategoryType, 
    IsEntryCorrect = @IsEntryCorrect, 
    Suitable = @Suitable, 
    CorrectCode = @CorrectCode, 
    NeedCoached = @NeedCoached, 
    Comments = @Comments, 
    DateReviewed = @DateReviewed, 
    Reviewer = @Reviewer
WHERE     (TransactionID = @TransactionID)
seems straight-forward enough...any clue would be appreciated.

Tsvetoslav
Telerik team
 answered on 09 Dec 2010
1 answer
151 views
I need some help ith one o the demos I am trying to use.
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx

I have created a very similar version except that I am using a pop up window instead and 2 ascx user control forms which just allows the user to enter all info and then edit some info.

The first problem is: with this code behind in the RadGrid1_PreRender event.
if (!this.IsPostBack)
{
this.RadGrid1.MasterTableView.Items[1].Edit = true;
this.RadGrid1.MasterTableView.Rebind();
}

I get this error when my page loads.
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Now I am using a hierarchy grid which is pullong data from the same db.

The second issue I am having is the Insert and Update button in the user control form .ascx file. I have this code for the update button which is directly from the demo.
    <asp:Button ID="btnUpdate" Text="Update" runat="server" CommandName="Update" Visible='<%# !(DataItem is Telerik.Web.UI.GridInsertionObject) %>' Font-Size="0.9em" />
</td>
<td>
    <asp:Button ID="btnCancel" runat="server" Text="Cancel" CausesValidation="false" CommandName="Cancel"
        Font-Size="0.9em" />

For some reason the DataItem is not liked and I am getting this web page request error when I go to edit a record.
Error: Sys.WebForms.PageRequestManagerServerErrorException: c:\test\Web Projects\Sites\Industries VS2008\ Industries\Board\Controls\Admin\EmailSettingsUpdate.ascx(172): error CS0103: The name 'DataItem' does not exist in the current context

Can anyone shed some light here?

Thanks


Tsvetoslav
Telerik team
 answered on 09 Dec 2010
1 answer
99 views
I'm wondering if it's possible to show/hide (set visible to true or false) nested panel items in the panelbar based on a combobox, etc selection in the first panelitem?

Example, a panelbar with 10 total panelitems contained in it.  First panelitem has a combobox.  User selected a value from combobox and only certain subsequent panelitems show, the rest get hidden.

Is this possible?  Is it at all possible to do this in jquery by getting the id of the parent object and then walking down to the appropriate child level?
Shinu
Top achievements
Rank 2
 answered on 09 Dec 2010
7 answers
131 views
I have some issues with Point Chart of your Ajax components. As you can see on my attachment, in a point chart, changing the point size loses it's center on the axes.

Also how can i disable or collapse the visibilty of the coordinate plate, axes of y=0 and x=0 ??

Thank you...
Evgenia
Telerik team
 answered on 09 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?