Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
149 views
Hi all,

I have two RadListBox(s) that transfer to each other. Both are populated using <ItemTemplate> and DataBind() with database data from code behind.

When I transfer one item to another, the row appears in the respective RadListBox but it does not show data. I've attached a picture with a side by side before and after.

Can anyone let me know what I'm doing wrong?

Code as below

<telerik:RadPageView ID="RadPageView_Visitor_Authentication" runat="server">
                 
            <br />
 
            <asp:Table runat="server" CssClass="form_table">
 
 
                <asp:TableRow runat="Server">
                         
                    <asp:TableCell runat="server" CssClass="form_label_center">
                        <asp:Label ID="Label_Available_Terminals" runat="server" Text="Available Terminals:"
                        CssClass="form_span"></asp:Label>
                    </asp:TableCell>
 
                </asp:TableRow>
 
                <asp:TableRow runat="Server">
 
                    <asp:TableCell runat="server" CssClass="form_label_center">
                        <telerik:RadListBox runat="server" ID="RadListBox_Available_Terminals" Height="150px" Width="300px"
                        AllowTransfer="true" TransferToID="RadListBox_Authenticate_Terminals"
                        OnTransferring="Authenticating_Terminals_Transferring"
                        AutoPostBackOnTransfer="true">
                             
                            <HeaderTemplate>
                                <table width="100%">
                                    <tr>
                                        <td width="20%">
                                            <asp:Label ID="Label7" runat="server" Text="Admin"></asp:Label>
                                        </td>
                                        <td width="80%">
                                            <div align="left">
                                                <asp:Label ID="Label8" runat="server" Text="Terminal - Location"></asp:Label>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </HeaderTemplate>
 
 
 
                            <ItemTemplate>
 
                            <table width="100%">
                                <tr>
                                    <td width="20%">
                                        <asp:CheckBox runat="server" ID="chk_admin" Checked="false"
                                         Enabled="false"/>
                                    </td>
                                    <td width="80%">
                                        <div align="left">
                                            <asp:Label runat="server" ID="Label_Terminal_Details_1">
                                                <%# DataBinder.Eval(Container, "Attributes['Terminal_String']") %>
                                            </asp:Label>
 
                                            <asp:Label runat="server" ID="Label_Terminal_Nitgen_ID_1" Visible="false">
                                                <%# DataBinder.Eval(Container, "Attributes['Terminal_Nitgen_ID']")%>
                                            </asp:Label>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                         
                        </ItemTemplate>
 
                        <FooterTemplate>
                        <br />
                        </FooterTemplate>
 
                            <ButtonSettings Position="Bottom" HorizontalAlign="Center"/>
                        </telerik:RadListBox>
                    </asp:TableCell>
 
                </asp:TableRow>
 
 
                <asp:TableRow runat="Server">
 
                    <asp:TableCell runat="server" CssClass="form_td_center">
 
                        <span class="form_span">
                            <asp:Literal ID="Literal_Visitor_Name_Terminal" runat="server"></asp:Literal>
                         
                            <asp:Label ID="Label_Authentication_On" runat="server" Text=" Can Authenticate On:"></asp:Label>
                        </span>
 
                    </asp:TableCell>
 
                </asp:TableRow>
 
 
                <asp:TableRow runat="Server">
 
                    <asp:TableCell runat="server" CssClass="form_td_center">
                        <telerik:RadListBox runat="server" ID="RadListBox_Authenticate_Terminals" Height="120px" Width="300px">
                        <HeaderTemplate>
                            <table width="100%">
                                <tr>
                                    <td width="20%">
                                        <asp:Label ID="Label1" runat="server" Text="Admin"></asp:Label>
                                    </td>
                                    <td width="80%">
                                        <div align="left">
                                            <asp:Label ID="Label2" runat="server" Text="Terminal - Location"></asp:Label>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </HeaderTemplate>
 
                        <ItemTemplate>
 
                            <table width="100%">
                                <tr>
                                    <td width="20%">
                                        <asp:CheckBox runat="server" ID="chk_admin" Checked="false"
                                         OnCheckedChanged="User_Terminal_Admin_check_changed"
                                         AutoPostBack="True" />
                                    </td>
                                    <td width="80%">
                                        <div align="left">
                                            <asp:Label runat="server" ID="Label_Terminal_Details">
                                                <%# DataBinder.Eval(Container, "Attributes['Terminal_String']") %>
                                            </asp:Label>
 
                                            <asp:Label runat="server" ID="Label_Terminal_Nitgen_ID" Visible="false">
                                                <%# DataBinder.Eval(Container, "Attributes['Terminal_Nitgen_ID']")%>
                                            </asp:Label>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                         
                        </ItemTemplate>
 
                        </telerik:RadListBox>  
                    </asp:TableCell>
 
                </asp:TableRow>
 
            </asp:Table>
             
             
     
                 
 
        </telerik:RadPageView>



Code Behind:

//Get All Terminals
                TD_Cmd = TDConnection.CreateCommand();
                TD_Cmd.CommandText = "EXECUTE " + SQL_Customer_Connection.Product_Name + "_sp_Terminal_List " +
                    "@Param_Customer_ID_Ref = @Param_Customer_ID_Ref1, " +
                    "@Param_Company_ID_Ref = @Param_Company_ID_Ref1";
 
                TD_Cmd.Parameters.Add(new SqlParameter("@Param_Customer_ID_Ref1",
                    (string)HttpContext.Current.Session["User_Belongs_To_Customer_Ref_ID"]));
                TD_Cmd.Parameters.Add(new SqlParameter("@Param_Company_ID_Ref1",
                    (string)HttpContext.Current.Session["User_Belongs_To_Company_Ref_ID"]));
 
                TD_DR = TD_Cmd.ExecuteReader();
 
 
                while (TD_DR.Read())
                {
                    RadListBoxItem new_item = new RadListBoxItem();
 
                    new_item.Attributes.Add("Terminal_String",
                        (string)TD_DR["Terminal_Name"] + " - " + (string)TD_DR["Terminal_Location"]);
                    new_item.Attributes.Add("Terminal_Nitgen_ID", (Convert.ToInt32(TD_DR["Nitgen_Terminal_ID_Ref"])).ToString());
 
                    RadListBox_Available_Terminals.Items.Add(new_item);
                    RadListBox_Available_Terminals.DataBind();
 
                }
 
 
                TD_DR.Close();
 
 
                //Get List of Terminals that this visitor can authenticate on
                TD_Cmd = TDConnection.CreateCommand();
                TD_Cmd.CommandText = "EXECUTE " + SQL_Customer_Connection.Product_Name + "_sp_Terminal_User_Authentication_List " +
                    "@Param_Customer_ID_Ref = @Param_Customer_ID_Ref1, " +
                    "@Param_Company_ID_Ref = @Param_Company_ID_Ref1, " +
                    "@Param_User_ID = @Param_User_ID1";
 
                TD_Cmd.Parameters.Add(new SqlParameter("@Param_Customer_ID_Ref1",
                    (string)HttpContext.Current.Session["User_Belongs_To_Customer_Ref_ID"]));
                TD_Cmd.Parameters.Add(new SqlParameter("@Param_Company_ID_Ref1",
                    (string)HttpContext.Current.Session["User_Belongs_To_Company_Ref_ID"]));
                TD_Cmd.Parameters.Add(new SqlParameter("@Param_User_ID1",
                    Label_Visitor_ID1.Text));
 
                TD_DR = TD_Cmd.ExecuteReader();
 
                while (TD_DR.Read())
                {
                    RadListBoxItem new_item = new RadListBoxItem();
                    new_item.Attributes.Add("Terminal_String",
                        (string)TD_DR["Terminal_Name"] + " - " + (string)TD_DR["Terminal_Location"]);
                    new_item.Attributes.Add("Terminal_Nitgen_ID", (Convert.ToInt32(TD_DR["Nitgen_Terminal_ID_Ref"])).ToString());
 
                    RadListBox_Authenticate_Terminals.Items.Add(new_item);
                    RadListBox_Authenticate_Terminals.DataBind();
 
                    if (Convert.ToInt32(TD_DR["User_Priv"].ToString()) == 1)
                    {
                        //Master User
                        CheckBox current_checkbox = new_item.FindControl("chk_admin") as CheckBox;
                        current_checkbox.Checked = true;
                    }
                }
 
                RadListBox_Authenticate_Terminals.DataBind();
 
 
 
...........
Dimitar Terziev
Telerik team
 answered on 20 Apr 2011
1 answer
250 views
Hi,

i have a grid width a GridNumericColumn,  when i edit and i insert a value with comma like "12,12" and press update button on grid
i have
Format of the input string is not correct
"11,12" is not a Valid Decimal Value.

 I must use dot for separate thousand, and comma for decimal digits.

 from db i bind a list of Decimal Value, and when i edit if i use the comma for decimal digit got the Format of the input string is not correct.
the grid column.
<telerik:GridNumericColumn    NumericType="Currency" DataField="Canone"
                            FilterControlAltText="Filter Canone column" HeaderText="Canone" DecimalDigits="2"                           
                            SortExpression="Canone" UniqueName="Canone"
                            FilterImageUrl="../App_Themes/ICTTheme/immagini/u58.png">
                        </telerik:GridNumericColumn>

the radgrid is bind to ObjectDataSource, and Select Method return a list of custom object, Canone Field is Decimal.
Tsvetina
Telerik team
 answered on 20 Apr 2011
1 answer
96 views

I have a requirement to calculate grid's cell value when a user changes another cell's value in the grid. Is there any client side events that may help me to do that in Rad Grid for AJAX.

Requirement :(Please refer attached image). 

A wireframe has been attached to further explain the issue. As you can see in the image,  when a user clicks "add multi pack button", a second row is created in the grid. When user enters the pack size in first cell of second row, it should calculate the gross cost as shown in picture.
 
I haven’t been able to achieve that with the grid client side events. I was looking for something similar to “lostfocus” in the telerik grid view.

Thank you for the Help
Linsemon
Shinu
Top achievements
Rank 2
 answered on 20 Apr 2011
3 answers
74 views
I have a radgrid in my MVC view and I have a radgrid that I bind to as described in the Telerik documentation using ViewData.  I'd like to sort the radgrid but am having trouble figuring out how to do so.  Is there a demo or forum post I missed?  Any help would be appereciated.

Thanks,

Matt
Iana Tsolova
Telerik team
 answered on 20 Apr 2011
3 answers
120 views
Hi

I have seen this article here http://www.telerik.com/community/forums/aspnet-ajax/treeview/radtreeview-client-side-scrollintoview-for-selected-node-question.aspx where you are able to scroll the selected node to the top which is great.

Is it also possible to scroll a node to the top from its OnClientNodeExpanded event? 

I have tried attaching the scrollToNode code to the OnClientNodeExpanded event but it never scrolls all the way to the top. 

Can anyone help.

Regards

Mike
Peter
Telerik team
 answered on 20 Apr 2011
1 answer
152 views
Hey,

We have a custom data model that we want to use the RadFilter to allow our clients to create queries for their Websites.  I want to be able to dynamically add the list of fields available, the criteria allowed per field and give the ability to have custom editors(dropdown picker instead of textbox, combobox, ...)  Can someone tell me how to do this?

Thank you.
Tsvetina
Telerik team
 answered on 20 Apr 2011
1 answer
91 views
I'm new to Telerik and I'm having trouble formatting the dropdowns on a horizontal RadMenu.  When I create a horizontal menu, the drop down text  on each line is centered.  Telerik's examples show then left aligned.  HorizontalAlign does not seem to be available.  Furthermore I don't think I can use a skin, because I want the horizontal menu to be centered.

Any suggestions?

Kate
Telerik team
 answered on 20 Apr 2011
1 answer
59 views

Hi Telerik Team,

Need some help on CSS for Grid.

Follwing things have been done:
1) On "Grid.Office2007.css"  I overwrited the

div.RadGrid_Office2007 

    background: yellow; 
    color: red; 
}

but never reflected on Actual Grid of the application.

2) Similarly I put the above code on Actual Page of the application it works fine.

3)  Then i put the same code on Seperate CSS file and referred in actual application and assign CSSClass for Grid as  "RadGrid_Office2007 " as in stylesheet, But it never worked and doesnt overwrite.

Now the problem is i cannot put the point no 2 on all pages, since it will not be correct way of doing, 

Can you please suggest the solution for point no 3 or point no 1, So that it will easy for refrence..?

Regards
Sudhakar



Princy
Top achievements
Rank 2
 answered on 20 Apr 2011
1 answer
79 views
I'm new to Telerik and I'm trying to set up a RadMenu and I'm having formatting problems.

1)  Rad menu is in an <asp:TableCell  , as shown below

 

<asp:TableCell runat="server" ID="tclNav2" HorizontalAlign ="Center">

 

 

 

<telerik:RadMenu ID="RadMenu1" runat

="server">

The menu doesn't seem to be centered in the cell.  It is left aligned.

2)  I was trying to use CSS to format menu items, but it doesn't seem to recognize CssClass items

 

<telerik:RadMenuItem runat="server" CssClass="radMenu1" Text="Home Page"></telerik:RadMenuItem

>

Can you use CssClass with the RadMenuItem?

Thanks for your help.

 

 

 

 

Kate
Telerik team
 answered on 20 Apr 2011
1 answer
433 views

I have a datepicker in grid edit form for passport issue date and expiry date.If database has null date feilds then grid is displaying the mindate. but we can't give min date for passport because it is  not mandatory. Grid should not display any value if the value in database is null. please help me. 
I have attached Screenshot and pasting my code here. there is no .cs code.. its only in aspx.
Thankyou. 


<%@ Page Language="C#" MasterPageFile="~/sample.Master" AutoEventWireup="true" CodeBehind="EmployeeList.aspx.cs"
    Inherits="MenloHRMS.Views.EmployeeList" %>
  
<%--<%@ Register Assembly="BasicFrame.WebControls.BasicDatePicker" Namespace="BasicFrame.WebControls"
    TagPrefix="BDP" %>--%>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <br />
    <br />
    <style type="text/css">
        .MyImageButton
        {
            cursor: hand;
        }
        .EditFormHeader td
        {
            font-size: 14px;
            padding: 4px !important;
            color: #0066cc;
        }
    </style>
  
    <script type="text/javascript" language="javascript">
     function AllowNumeric()
      {
        // Get the ASCII value of the key that the user entered
       var key =window.event.keyCode;
  
        // Verify if the key entered was a numeric character (0-9) or a decimal (.)
        if ( (key > 47 && key < 58) || key == 46 )
            // If it was, then allow the entry to continue
            return;
        else
            // If it was not, then dispose the key and continue with entry
           window.event.returnValue = null
    }
    </script>
  
    <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="rgEmployeeLst">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgEmployeeLst" />
                    <telerik:AjaxUpdatedControl ControlID="RadInputManager1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
      
    <telerik:RadGrid ID="rgEmployeeLst" runat="server" GridLines="None" Skin="Black"  
        DataSourceID="dsEmployees" AllowAutomaticDeletes="True" AllowSorting="false" AllowAutomaticUpdates="True"
        AutoGenerateColumns="False">
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        </HeaderContextMenu>
        <MasterTableView DataSourceID="dsEmployees" AllowPaging="true" PageSize="10" DataKeyNames="EmpId">
            <EditFormSettings EditFormType="Template">
                <EditColumn UniqueName="EditCommandColumn1">
                </EditColumn>
                <FormTemplate>
                    <table cellspacing="2" cellpadding="1" width="100%" border="0">
                        <tr>
                            <td class="lblCaption" align="right">
                                FirstName<span class="MandatoryField">*</span>:
                            </td>
                            <td>
                                <asp:TextBox Width="200px" ID="txtFName" runat="server" Text='<%# Bind("FName") %>'></asp:TextBox>
                            </td>
                            <td class="lblCaption" align="right">
                                Last Name<span class="MandatoryField">*</span>:
                            </td>
                            <td>
                                <asp:TextBox ID="txtLName" runat="server" Width="200px" MaxLength="30" Text='<%# Bind("LName") %>'></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="lblCaption">
                                Role<span class="MandatoryField">*</span>:
                            </td>
                            <td>
                                <telerik:RadComboBox ID="cmbRole" Width="205px" runat="server" DataSourceID="DsRoles"
                                    SelectedValue='<%# Bind("RoleID") %>' DataTextField="Role" DataValueField="RoleId">
                                </telerik:RadComboBox>
                                  
                            </td>
                            <td align="right" class="lblCaption">
                                Department<span class="MandatoryField">*</span>:
                            </td>
                            <td>
                                <telerik:RadComboBox ID="cmbDept" Width="205px" runat="server" DataSourceID="DSDepts"
                                    DataTextField="DeptName" DataValueField="DeptID" SelectedValue='<%# Bind("DeptID") %>'>
                                </telerik:RadComboBox>
                                  
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="lblCaption">
                                Date Of Birth<span class="MandatoryField">*</span>:
                            </td>
                            <td>
                                <%--<BDP:BasicDatePicker ID="dtpkrDOB" runat="server" Width="200px"  SelectedDate='<%# Bind("DOB") %>'>
                                </BDP:BasicDatePicker>--%>
                                <telerik:RadDatePicker ID="dtpkrDOB" runat="server" Width="230px" ValidationGroup="Validate"
                                    ShowPopupOnFocus="True" SelectedDate='<%# Bind("DOB") %>'>
                                    <Calendar ID="Calendar1" UseColumnHeadersAsSelectors="False" runat="server" UseRowHeadersAsSelectors="False"
                                        ViewSelectorText="x">
                                    </Calendar>
                                    <DatePopupButton HoverImageUrl="" ImageUrl="" />
                                    <DateInput ID="DateInput1" DateFormat="M/d/yyyy" runat="server">
                                    </DateInput>
                                </telerik:RadDatePicker>
                                <asp:RequiredFieldValidator ID="RFVDOB" runat="server" ControlToValidate="dtpkrDOB" ErrorMessage="*" ToolTip="Enter DateOfBirth"></asp:RequiredFieldValidator>
                            </td>
                              
                            <td align="right" class="lblCaption">
                                Date Of Joining<span class="MandatoryField">*</span>:
                            </td>
                            <td>
                                <%--<BDP:BasicDatePicker ID="dtpkrDOJ" runat="server" Width="200px"  SelectedDate='<%# Bind("DOJ") %>'>
                                </BDP:BasicDatePicker>--%>
                                <telerik:RadDatePicker ID="dtpkrDOJ" runat="server" Width="230px" ValidationGroup="Validate"
                                    ShowPopupOnFocus="True" SelectedDate='<%# Bind("DOJ") %>'>
                                    <Calendar ID="Calendar2" UseColumnHeadersAsSelectors="False" runat="server" UseRowHeadersAsSelectors="False"
                                        ViewSelectorText="x">
                                    </Calendar>
                                    <DatePopupButton HoverImageUrl="" ImageUrl="" />
                                    <DateInput ID="DateInput2" DateFormat="M/d/yyyy" runat="server" DisplayDateFormat="M/d/yyyy">
                                    </DateInput>
                                </telerik:RadDatePicker>
                                 <asp:RequiredFieldValidator ID="RFVDOJ" runat="server" ControlToValidate="dtpkrDOJ" ErrorMessage="*" ToolTip="Enter DateOfJoining"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="lblCaption">
                                Address<span class="MandatoryField">*</span>:
                            </td>
                            <td>
                                <asp:TextBox ID="txtAddress" runat="server" Width="200px" TextMode="MultiLine" Text='<%# Bind("Address") %>'></asp:TextBox>
                            </td>
                            <td align="right" class="lblCaption">
                                Phone(Res):
                            </td>
                            <td>
                                <asp:TextBox ID="txtResi" runat="server" Width="200px" MaxLength="10" Text='<%# Bind("Phone_Resi") %>'
                                    onkeypress="AllowNumeric()">
                                </asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="lblCaption">
                                Phone(Mobile)<span class="MandatoryField">*</span>:
                            </td>
                            <td>
                                <asp:TextBox ID="txtMobile" runat="server" Width="200px" MaxLength="10" Text='<%# Bind("Phone_Mobile") %>'
                                    onkeypress="AllowNumeric()">
                                </asp:TextBox>
                            </td>
                            <td align="right" class="lblCaption">
                                PANCard:
                            </td>
                            <td>
                                <telerik:RadTextBox ID="txtPanCard" runat="server" Width="200px" Text='<%# Bind("PAN") %>'>
                                </telerik:RadTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="lblCaption">
                                PassportNo:
                            </td>
                            <td>
                                <telerik:RadTextBox ID="txtPassport" runat="server" Width="200px" Text='<%# Bind("PassportNo") %>'>
                                </telerik:RadTextBox>
                            </td>
                            <td class="lblCaption" align="right">
                                Passport Issue Date:
                            </td>
                            <td>
                                <%--<BDP:BasicDatePicker ID="dtpkrPasprtIssue"  runat="server" Width="200px" SelectedDate='<%# Bind("Passport_IssuedOn") %>'>
                                </BDP:BasicDatePicker>--%>
                                <telerik:RadDatePicker ID="dtpkrPasprtIssue" runat="server" Width="230px" ShowPopupOnFocus="True"
                                    SelectedDate='<%#DataBinder.Eval(Container.DataItem,"Passport_IssuedOn") %>'>
                                    <Calendar ID="Calendar3" UseColumnHeadersAsSelectors="False" runat="server" UseRowHeadersAsSelectors="False"
                                        ViewSelectorText="x">
                                    </Calendar>
                                    <DatePopupButton HoverImageUrl="" ImageUrl="" />
                                    <DateInput ID="DateInput3" DateFormat="M/d/yyyy" runat="server" DisplayDateFormat="M/d/yyyy">
                                    </DateInput>
                                </telerik:RadDatePicker>
                            </td>
                        </tr>
                        <tr>
                            <td class="lblCaption" align="right">
                                Passport Expiry Date:
                            </td>
                            <td>
                                <%--<BDP:BasicDatePicker ID="dtpkrPasprtExp" runat="server"  Width="200px" SelectedDate='<%# Bind("Passport_Exp") %>'>
                                </BDP:BasicDatePicker>--%>
                                <telerik:RadDatePicker ID="dtpkrPasprtExp" runat="server" Width="230px" ShowPopupOnFocus="True"
                                    SelectedDate='<%#DataBinder.Eval(Container.DataItem,"Passport_Exp") %>'>
                                    <Calendar ID="Calendar4" UseColumnHeadersAsSelectors="False" runat="server" UseRowHeadersAsSelectors="False"
                                        ViewSelectorText="x">
                                    </Calendar>
                                    <DatePopupButton HoverImageUrl="" ImageUrl="" />
                                    <DateInput ID="DateInput4" DateFormat="M/d/yyyy" runat="server" DisplayDateFormat="M/d/yyyy">
                                    </DateInput>
                                </telerik:RadDatePicker>
                            </td>
                            <td class="lblCaption" align="right">
                                Email:
                            </td>
                            <td>
                                <telerik:RadTextBox ID="txtEmail" runat="server" Width="200px" Text='<%# Bind("EmailId") %>'>
                                </telerik:RadTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" colspan="4">
                                <table>
                                    <tr>
                                        <td>
                                            <telerik:RadButton ID="btnUpdate"  Text="Update" ValidationGroup="Validate" runat="server"
                                                Skin="Black" CommandName="Update" OnClientClicked="">
                                            </telerik:RadButton>
                                            <telerik:RadButton ID="btnCancel" Text="Cancel" runat="server" Skin="Black" CommandName="Cancel">
                                            </telerik:RadButton>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </FormTemplate>
            </EditFormSettings>
               <CommandItemSettings ShowExportToExcelButton="true" />
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="../../Images/Edit_Icon.jpeg"
                    UniqueName="EditCommandColumn">
                </telerik:GridEditCommandColumn>
                <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                    UniqueName="DeleteColumn">
                    <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                </telerik:GridButtonColumn>
                <telerik:GridBoundColumn DataField="EmpId" FilterControlAltText="Filter EmpId column"
                    HeaderText="EmpId" SortExpression="EmpId" UniqueName="EmpId" Visible="false"
                    ReadOnly="true">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="FName" FilterControlAltText="Filter FName column"
                    HeaderText="First Name" SortExpression="FName" UniqueName="FName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="LName" FilterControlAltText="Filter LName column"
                    HeaderText="Last Name" SortExpression="LName" UniqueName="LName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Role" FilterControlAltText="Filter Role column"
                    HeaderText="Role" SortExpression="Role" UniqueName="Role">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Department" FilterControlAltText="Filter Department column"
                    HeaderText="Department" SortExpression="Department" UniqueName="Department">
                </telerik:GridBoundColumn>
                
                <telerik:GridDateTimeColumn DataField="DOB" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}"
                    FilterControlAltText="Filter DOB column" HeaderText="DOB" SortExpression="DOB"
                    UniqueName="DOB">
                </telerik:GridDateTimeColumn>
                 
                <telerik:GridDateTimeColumn DataField="DOJ" FilterControlAltText="Filter DOJ column"
                    DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}" HeaderText="DOJ" SortExpression="DOJ"
                    UniqueName="DOJ">
                </telerik:GridDateTimeColumn>
                <telerik:GridBoundColumn DataField="Address" FilterControlAltText="Filter Address column"
                    HeaderText="Address" SortExpression="Address" UniqueName="Address">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="EmailId" FilterControlAltText="Filter EmailId column"
                    HeaderText="EmailId" SortExpression="EmailId" UniqueName="EmailId">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Phone_Resi" FilterControlAltText="Filter Phone_Resi column"
                    HeaderText="Residence" SortExpression="Phone_Resi" UniqueName="Phone_Resi">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Phone_Mobile" FilterControlAltText="Filter Phone_Mobile column"
                    HeaderText="Mobile" SortExpression="Phone_Mobile" UniqueName="Phone_Mobile">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="PAN" FilterControlAltText="Filter PAN column"
                    HeaderText="PAN" SortExpression="PAN" UniqueName="PAN">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="PassportNo" FilterControlAltText="Filter PassportNo column"
                    HeaderText="PassportNo" SortExpression="PassportNo" UniqueName="PassportNo">
                </telerik:GridBoundColumn>
                <telerik:GridDateTimeColumn DataField="Passport_IssuedOn" DataType="System.DateTime" HtmlEncode="false"
                    DataFormatString="{0:MM/dd/yyyy}" FilterControlAltText="Filter Passport_IssuedOn column"
                    HeaderText="Passport IssuedOn" SortExpression="Passport_IssuedOn" UniqueName="Passport_IssuedOn">
                </telerik:GridDateTimeColumn>
                <telerik:GridDateTimeColumn DataField="Passport_Exp" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}"
                    FilterControlAltText="Filter Passport_Exp column" HeaderText="Passport Expiry" SortExpression="Passport_Exp"
                    UniqueName="Passport_Exp" HtmlEncode="false">
                </telerik:GridDateTimeColumn>
                
            </Columns>
        </MasterTableView>
        <ClientSettings EnableRowHoverStyle="true">
            <Selecting AllowRowSelect="True" />
        </ClientSettings>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
        <PagerStyle Mode="NumericPages" />
    </telerik:RadGrid>
    <telerik:RadInputManager runat="server" ID="RadInputManager1" Enabled="true">
        <telerik:TextBoxSetting BehaviorID="TextBoxSetting1" Validation-IsRequired="true"
            EmptyMessage="Enter Value" ErrorMessage="Enter FirstName">
            <TargetControls>
                <telerik:TargetInput ControlID="txtFName" Enabled="true" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:TextBoxSetting BehaviorID="TextBoxSetting2" Validation-IsRequired="true"
            EmptyMessage="Enter Value" ErrorMessage="Enter LastName" Validation-ValidationGroup="Validate">
            <TargetControls>
                <telerik:TargetInput ControlID="txtLName" Enabled="true" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:TextBoxSetting BehaviorID="TextBoxSetting3" Validation-IsRequired="true"
            EmptyMessage="Enter Value" ErrorMessage="Enter Role">
            <TargetControls>
                <telerik:TargetInput ControlID="cmbRole" Enabled="true" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:TextBoxSetting BehaviorID="TextBoxSetting6" Validation-IsRequired="true"
            EmptyMessage="Enter Value" ErrorMessage="Enter Department">
            <TargetControls>
                <telerik:TargetInput ControlID="cmbDept" Enabled="true" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:DateInputSetting BehaviorID="datePkrSettings1" DisplayDateFormat="M/d/yyyy"
            MinDate="1950-01-01" MaxDate="01-01-1999" Validation-IsRequired="true" ErrorMessage="Enter Valid Date">
            <TargetControls>
                <telerik:TargetInput ControlID="dtpkrDOB" Enabled="true" />
            </TargetControls>
        </telerik:DateInputSetting>
        <telerik:DateInputSetting BehaviorID="datePkrSettings2" DisplayDateFormat="M/d/yyyy"
            MinDate="1998-01-01" Validation-IsRequired="true" ErrorMessage="Enter Valid Date">
            <TargetControls>
                <telerik:TargetInput ControlID="dtpkrDOJ" Enabled="true" />
            </TargetControls>
        </telerik:DateInputSetting>
        <telerik:TextBoxSetting BehaviorID="TextBoxSetting4" Validation-IsRequired="true"
            ErrorMessage="Enter Address">
            <TargetControls>
                <telerik:TargetInput ControlID="txtAddress" Enabled="true" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:TextBoxSetting BehaviorID="TextBoxSetting5" Validation-IsRequired="true"
            ErrorMessage="Enter MobileNo">
            <TargetControls>
                <telerik:TargetInput ControlID="txtMobile" Enabled="true" />
            </TargetControls>
        </telerik:TextBoxSetting>
    </telerik:RadInputManager>
    <asp:SqlDataSource ID="test" runat="server" ConnectionString="<%$ ConnectionStrings:MenloConnection %>"
    SelectCommand="select * from Employees emp join roles r on emp.role=r.roleid join departments d on emp.department=d.deptId" UpdateCommand="UPDATE [Employees] SET [FName] = @FName, [LName] = @LName, [Role] = @RoleID, [Department] = @DeptID,[DOB]=@DOB, [DOJ] = @DOJ, [Address] = @Address, [EmailId] = @EmailId,[Phone_Resi] = @Phone_Resi, [Phone_Mobile] = @Phone_Mobile,[PAN]=@PAN,[PassportNo]=@PassportNo,[Passport_Exp]=@Passport_Exp,[Passport_IssuedOn]=@Passport_IssuedOn WHERE [EmpId] = @EmpId">
                                      
                                    <UpdateParameters>
                                        <asp:Parameter Name="FName" Type="String" />
                                        <asp:Parameter Name="LName" Type="String" />
                                        <asp:Parameter Name="RoleID" Type="Int32" />
                                        <asp:Parameter Name="DeptID" Type="Int32" />
                                        <asp:Parameter Name="DOB" Type="DateTime" />
                                        <asp:Parameter Name="DOJ" Type="DateTime" />
                                        <asp:Parameter Name="Address" Type="String" />
                                        <asp:Parameter Name="EmailId" Type="String" />
                                        <asp:Parameter Name="Phone_Resi" Type="String" />
                                        <asp:Parameter Name="Phone_Mobile" Type="String" />
                                        <asp:Parameter Name="PAN" Type="String" />
                                        <asp:Parameter Name="PassportNo" Type="String" />
                                        <asp:Parameter Name="Passport_Exp" Type="DateTime" />
                                        <asp:Parameter Name="Passport_IssuedOn" Type="DateTime" />
                                        <asp:Parameter Name="EmpId" Type="Int32" />
                                    </UpdateParameters>
                                </asp:SqlDataSource>
    <asp:ObjectDataSource ID="dsEmployees" runat="server" SelectMethod="GetEmployees1"
        TypeName="MenloHRMS.Core.BLL.PageData.Employee.clsEmployee" UpdateMethod="UpdateEmployeeDetails"
        DeleteMethod="DeleteEmployee">
          
        <UpdateParameters>
            <asp:Parameter Name="EmpId" Type="Int32" />
            <asp:Parameter Name="FName" Type="String" />
            <asp:Parameter Name="LName" Type="String" />
            <asp:Parameter Name="RoleID" Type="Int32" />
            <asp:Parameter Name="DeptID" Type="Int32" />
            <asp:Parameter Name="DOB" Type="DateTime" />
            <asp:Parameter Name="DOJ" Type="DateTime" />
            <asp:Parameter Name="Address" Type="String" />
            <asp:Parameter Name="EmailId" Type="String" />
            <asp:Parameter Name="Phone_Resi" Type="String" />
            <asp:Parameter Name="Phone_Mobile" Type="String" />
            <asp:Parameter Name="PAN" Type="String" />
            <asp:Parameter Name="PassportNo" Type="String" />
            <asp:Parameter Name="Passport_Exp" Type="DateTime" />
            <asp:Parameter Name="Passport_IssuedOn" Type="DateTime" />
        </UpdateParameters>
        <DeleteParameters>
            <asp:Parameter Name="EmpId" Type="Int32" />
        </DeleteParameters>
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="DSDepts" runat="server" SelectMethod="GetDepts" TypeName="MenloHRMS.Core.BLL.PageData.Employee.clsEmployee">
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="DsRoles" runat="server" SelectMethod="GetRoles" TypeName="MenloHRMS.Core.BLL.PageData.Employee.clsEmployee">
    </asp:ObjectDataSource>
</asp:Content>
Iana Tsolova
Telerik team
 answered on 20 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?