Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
152 views

How to pass parameter in ContentUrl of RadPageView

Not only Url ContentUrl="http://blogs.telerik.com">

Like

 

ContentUrl

 

=http://blogs.telerik.com?OrderID=>

 

How to give value from Form Control or any other way?

 



 

Shinu
Top achievements
Rank 2
 answered on 04 Jan 2011
2 answers
71 views
I have a RadComboBox with EnableLoadOnDemand=true with an ItemsRequested event that fires when you type any character into the combobox text field. This all works, but it is too slow because of all the callbacks after every character is entered. Let's take this example:

I am looking for the value 1422 in my combobox list. I type '1' and it calls the server and shows me all items that start with '1'. Then I type '4' and it calls the server again to show me all items that start with '14'. This seems unnecessary. If we already have a list of all items that start with '1', then why do we need to call the server again to get the subset that starts with '14'? After the initial results are returned to the client, can I somehow search those results on the client for the '14' entries. After all, they have already been sent from the server, there's no need for any additional callbacks unless I delete back past the '1'.

Any help would be much appreciated.

thanks!
Brandon
Kalina
Telerik team
 answered on 04 Jan 2011
0 answers
86 views
my requirement is to access radgrid selected row data  and display it in details view using server side events through sql queries
it is quite a bit urgent....
eagerly waiting  for reply


thanks
rajesh








rajesh
Top achievements
Rank 1
 asked on 04 Jan 2011
5 answers
686 views
I think there is a bug regarding GridNumericColumn and formatting.  I use currency format as follows: {0:#,##0;(#,##0);0} .
In the view mode column looks OK.  The problem is when the row/item is in edit mode and yet the column is readonly.
If the column is readonly, I should see the same formatting as in the view mode.  Is this a bug?

I see a lot of threads on the same topic and yet could not find definite answer from TELERIK on the topic.
Is there a manual fix?

Chris
Princy
Top achievements
Rank 2
 answered on 04 Jan 2011
6 answers
147 views
Some users are getting the following script errors when trying to add or edit. But I'm not getting it from the server or running it in Visual Studio 2010. Please see the code below and help.

Error:

Webpage error details


User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDR; InfoPath.2; .NET CLR 1.1.4322; .NET4.0C; .NET4.0E; MS-RTC LM 8)

Timestamp: Wed, 10 Nov 2010 15:48:23 UTC



Message: Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object.

Line: 3

Char: 74672

Code: 0

URI: http://10.137.12.91/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=cphAdmin_cphCMS_RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d4.1.40412.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-US%3aacfc7575-cdee-46af-964f-5d85d9cdcf92%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2010.2.929.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a183fb741-216d-4765-9b46-4a1f5d38fdd7%3a16e4e7cd%3aed16cbdc%3a58366029%3ab7778d6c%3af7645509%3a8674cba1%3ac08e9f8a%3aa51ee93e%3a59462f1

<%@ Page Title="NextGen Portal : Home Page Quick Links" Language="C#" MasterPageFile="~/themes/CMS.master" AutoEventWireup="true" CodeFile="HomeQuickLinks.aspx.cs" Inherits="CMS_HomeQuickLinks" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphheaderCMS" Runat="Server"></asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphCMS" Runat="Server">
    <h1>Home Page Quick Link</h1>
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">       
    <telerik:RadGrid
        ID="gridQL"
        runat="server"
        AutoGenerateColumns="false"
        OnItemCommand="RadGrid_ItemCommand"
        Height="300"
        OnItemDataBound="RadGrid_ItemDataBound"
        OnRowDrop="grdPendingOrders_RowDrop">
        <MasterTableView DataKeyNames="HomeQuickLinkID">
            <Columns>
                <telerik:GridBoundColumn DataField="HomeQuickLinkID" Display="false"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="LinkTitle" HeaderText="Link Title"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="LongShowDate" HeaderText="Show Date"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="LongUpdatedDate" HeaderText="Last Updated"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="UpdatedName" HeaderText="Last Updated By"></telerik:GridBoundColumn>
                <telerik:GridButtonColumn ButtonType="LinkButton" Text="Move Up" CommandName="UpQL"><ItemStyle Width="50px"></ItemStyle></telerik:GridButtonColumn>
                <telerik:GridButtonColumn ButtonType="LinkButton" Text="Move Down" CommandName="DownQL"><ItemStyle Width="70px"></ItemStyle></telerik:GridButtonColumn>
                <telerik:GridButtonColumn ButtonType="LinkButton" Text="Edit" CommandName="EditQL"></telerik:GridButtonColumn>
                <telerik:GridButtonColumn ButtonType="LinkButton" Text="Delete" CommandName="DeleteQL"></telerik:GridButtonColumn>
            </Columns>
        </MasterTableView>
        <ClientSettings EnablePostBackOnRowClick="true" AllowRowsDragDrop="false">
            <Selecting AllowRowSelect="True" UseClientSelectColumnOnly="true"/>
        </ClientSettings>
    </telerik:RadGrid>
    <br />
    <asp:HiddenField ID="hideID" runat="server" />
    <table id="entrySettings">
        <tr>
            <td class="label">Title: </td>
            <td>
                <telerik:RadTextBox
                    ID="txtLinkTitle"
                    runat="server"
                    Width="400"
                    MaxLength="400"
                    ValidationGroup="HomeQuickLink"></telerik:RadTextBox>
                <asp:RequiredFieldValidator
                    ID="RequiredLinkTitle"
                    runat="server"
                    ValidationGroup="HomeQuickLink"
                    ControlToValidate="txtLinkTitle"                       
                    ErrorMessage="Link Title can not be blank!"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="label">Link: </td>
            <td>
                <telerik:RadTextBox
                    ID="txtLinkURL"
                    runat="server"
                    Width="400"
                    MaxLength="400"></telerik:RadTextBox>
                <asp:RequiredFieldValidator
                    ID="RequiredLinkURL"
                    runat="server"
                    ValidationGroup="HomeQuickLink"
                    ControlToValidate="txtLinkURL"                       
                    ErrorMessage="Link Title can not be blank!"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="label" id="FieldLabel">Show Date:</td>
            <td>
                <telerik:RadDatePicker ID="dateShowDate" runat="server"></telerik:RadDatePicker>
                <asp:RequiredFieldValidator
                    ID="RequiredShowDate"
                    runat="server"
                    ErrorMessage="Please enter the show date!"
                    ControlToValidate="dateShowDate"
                    Display="Dynamic"
                    ValidationGroup="HomeQuickLink"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="label">Created: </td>
            <td><asp:Label
                ID="lblCreated"
                runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="label">Updated: </td>
            <td><asp:Label
                ID="lblUpdated"
                runat="server"></asp:Label>
            </td>
        </tr>
    </table>
    <div style="text-align:right">
        <asp:Button
            ID="btnAdd"
            runat="server"
            Text="Add"
            ValidationGroup="HomeQuickLink"
            onclick="btnAdd_Click" />
        <asp:Button
            ID="btnUpdate"
            runat="server"
            Text="Update"
            onclick="btnUpdate_Click"
            ValidationGroup="HomeQuickLink"
            Visible="false" />
        <asp:Button
            ID="btnClear"
            runat="server"
            Text="Clear"
            onclick="btnClear_Click" />
    </div>       
    </telerik:RadAjaxPanel>
</asp:Content>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
 
public partial class CMS_HomeQuickLinks : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
            LoadGrid();
    }
 
    public void LoadGrid()
    {
        gridQL.DataSource = new List<string>(0);
        gridQL.DataBind();
        gridQL.DataSource = NextGen.core.CMS.HomeQuickLinkManager.GetList();
        gridQL.DataBind();
    }
 
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        NextGen.core.CMS.HomeQuickLink QL = new NextGen.core.CMS.HomeQuickLink();
        NextGen.core.CMS.HomeQuickLinkManager m = new NextGen.core.CMS.HomeQuickLinkManager();
        QL.LinkTitle = txtLinkTitle.Text;
        QL.LinkURL = txtLinkURL.Text;
        QL.ShowDate = (DateTime)dateShowDate.SelectedDate;
        QL.CreatedID = Int32.Parse(Session["ProfileID"].ToString());
        m.Add(QL);
        LoadGrid();
        ClearFields();
    }
 
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        NextGen.core.CMS.HomeQuickLink QL = new NextGen.core.CMS.HomeQuickLink();
        NextGen.core.CMS.HomeQuickLinkManager m = new NextGen.core.CMS.HomeQuickLinkManager();
        QL.HomeQuickLinkID = Int32.Parse(hideID.Value);
        QL.LinkTitle = txtLinkTitle.Text;
        QL.LinkURL = txtLinkURL.Text;
        QL.ShowDate = (DateTime)dateShowDate.SelectedDate;
        QL.UpdatedID = Int32.Parse(Session["ProfileID"].ToString());
        m.Edit(QL);
        LoadGrid();
        ClearFields();
    }
 
    public void ClearFields()
    {
        hideID.Value = "";
        txtLinkTitle.Text = "";
        txtLinkURL.Text = "";
        dateShowDate.Clear();
        lblCreated.Text = "";
        lblUpdated.Text = "";
        LoadGrid();
        btnAdd.Visible = true;
        btnUpdate.Visible = false;
    }
 
    protected void RadGrid_ItemCommand(object source, GridCommandEventArgs e)
    {
        ClearFields();
        int QLID = (int)e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["HomeQuickLinkID"];
        if (e.CommandName == "RowClick" || e.CommandName == "EditQL")
            GetQL4Edit(QLID);
 
        if (e.CommandName == "DeleteQL")
        {
            NextGen.core.CMS.HomeQuickLinkManager m = new NextGen.core.CMS.HomeQuickLinkManager();
            m.Remove(QLID);
            ClearFields();
        }
 
        if (e.CommandName == "UpQL")
        {
            NextGen.core.CMS.HomeQuickLinkManager m = new NextGen.core.CMS.HomeQuickLinkManager();
            m.OrderUp(QLID);
            LoadGrid();
        }
 
        if (e.CommandName == "DownQL")
        {
            NextGen.core.CMS.HomeQuickLinkManager m = new NextGen.core.CMS.HomeQuickLinkManager();
            m.OrderDown(QLID);
            LoadGrid();
        }
    }
 
    protected void RadGrid_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
        //if (e.Item is GridDataItem)
        //{
        //    foreach (GridDataItem item in gridAnnouncements.MasterTableView.Items)
        //    {
        //        if (item.ItemIndex == 0)
        //        {
        //            LinkButton btn = (LinkButton)item["UpAnnouncement"].Controls[0];
        //            btn.Visible = false;
        //            item.Display = false;
        //            break; //terminates the for loop
        //        }
        //    } 
        //}
    }
 
    public void GetQL4Edit(int intID)
    {
        NextGen.core.CMS.HomeQuickLink QL = NextGen.core.CMS.HomeQuickLinkManager.GetRecord(intID);
        hideID.Value = intID.ToString();
        txtLinkTitle.Text = QL.LinkTitle;
        txtLinkURL.Text = QL.LinkURL;
        dateShowDate.SelectedDate = QL.ShowDate;
        lblCreated.Text = QL.CreatedName + " on " + QL.CreatedDate.ToShortDateString() + " " + QL.CreatedDate.ToShortTimeString();
        lblUpdated.Text = QL.UpdatedName + " on " + QL.UpdatedDate.ToShortDateString() + " " + QL.UpdatedDate.ToShortTimeString();
        btnAdd.Visible = false;
        btnUpdate.Visible = true;
    }
 
    protected void btnClear_Click(object sender, EventArgs e)
    {
        ClearFields();
    }
 
    protected void grdPendingOrders_RowDrop(object sender, GridDragDropEventArgs e)
    {
        //int o = 0;
        //NextGen.core.CMS.HomeQuickLinkManager m = new NextGen.core.CMS.HomeQuickLinkManager();
        //foreach (GridDataItem i in e.[ReorderedItemsLists])
        //{
        //    o = o + 1;
        //    m.EditOrder((int)draggedItem.GetDataKeyValue("HomeQuickLinkID"), o);           
        //}
        //LoadGrid();
    }
}
Craig Wallace
Top achievements
Rank 1
 answered on 04 Jan 2011
4 answers
70 views
Hi,

 I created as RadSlider as below

<telerik:RadSplitter ID="RadS_Filter" runat="server" Height="22px"
Orientation="Horizontal" Width="820px">
<telerik:RadPane ID="RadP_Filter" runat="server" Height="22px" Scrolling="none">
<telerik:RadSlidingZone ID="RadSZ_Filter" runat="server" Height="22px"
SlideDirection="Bottom" Font-Size="Medium" Width="500px">
<telerik:RadSlidingPane ID="RadSP_Filter" runat="server"
BackColor="ButtonFace" Title="Filter" Height="120" OnClientDocked="changesizefilter" OnClientUndocked="ChangeUndockSizeFilter">
<table cellspacing="10" id="tbl_comboTable" runat="server">
<tr>
<td>
<asp:Label ID="lbl_FilParent" runat="server" Text="Parent"></asp:Label>
</td>
<td>
<telerik:RadComboBox ID="RadcmbFil_Parent" runat="server"  AutoPostBack="True" AllowCustomText="True"  onselectedindexchanged="RadcmbFil_Parent_SelectedIndexChanged" Width="300">
</telerik:RadComboBox>
</td>
<td>
<asp:Label ID="lbl_FilStudent" runat="server" Text="Student"></asp:Label>
</td>
<td>
<telerik:RadComboBox ID="RadcmbFil_Student" runat="server" Skin="Hay"  AllowCustomText="True" Height="22px" Width="300">
</telerik:RadComboBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lbl_FilSubject" runat="server" Text="Subject"></asp:Label>
</td>
<td>
<telerik:RadComboBox ID="RadcmbFil_subject" runat="server"  AutoPostBack="True" AllowCustomText="True" Width="300">
</telerik:RadComboBox>
    </td>
    <td colspan="2">
            <asp:Button ID="btn_FilterSearch" runat="server" Text="Search" Width="100" />
    </td>
    </tr> 
            </table>
</telerik:RadSlidingPane>
</telerik:RadSlidingZone>
</telerik:RadPane>
</telerik:RadSplitter>

After this  i  used two Java script Functions for ClientDocked and Undocked

When the client Docks

function changesizefilter()
{
var splitter = $find("<%=RadS_Filter.ClientID%>");
var height = 150;
splitter.set_height(height);
__doPostBack(
'<UpdatePanel>',');
}

When The Click Undocks

 

 

function ChangeUndockSizeFilter()
{
var splitter = $find("<%=RadS_Filter.ClientID%>");
var height = 22;
splitter.set_height(height);
window.location.reload(
true);
}

But the problem is getting at onclientDocked.
 when the client docks the page is refreshing Multiple Times......Why it is happening..Does it acheives in other way?
Regards
Bhuvan

 

 

 

 

Bhuvan
Top achievements
Rank 1
 answered on 04 Jan 2011
2 answers
81 views
Hi all,
I want to design multi views for my Grid but I don't have idea to do that.
For example: we have 2 views (UI) for the Grid and User can choose which view to be viewed (of course, we only have one datasource)

P/S: sorry for my bad English

Any help will be appreciated
Thanks
Dan
Dan
Top achievements
Rank 1
 answered on 04 Jan 2011
1 answer
182 views
Hi All,

I am facing few problem in Grid. I would really appreciate if someone could help me out .

1. I want to add a HTML table in Mastertable view so that I can add static text in first cell and in other cell I can add the Columns for Grid Table View. Projects will be fixed text of first cell which should not change color of mouse over/ selection of row.
  Example :-  EmpName EmpEmail EmpNum---------------Mastertable view of Detail Table
                   Projects  ||     Sno.    Name       ------------- Grid Table View  
2. change background color of Mastertable Row of which Mastertable view row is selected.

Mira
Telerik team
 answered on 04 Jan 2011
5 answers
743 views
Hi all,

is there a way of manage (via code behind) the checkbox in the header that comes with a GridClientSelectColumn?
I couldn't find the right way. I also tried to manage it via an event but it doesn't fire.
Here's a snippet:

...code
GridHeaderItem headerItem = (GridHeaderItem)RadGridDocumentsControlForm.MasterTableView.GetItems(GridItemType.Header)[0];
CheckBox chkSelectAll = headerItem.FindControl("CheckedSelectCheckBox") as CheckBox;
chkSelectAll.Enabled = true;
chkSelectAll.CheckedChanged +=new EventHandler(chkSelectAll_CheckedChanged);
...code

//handler
void chkSelectAll_CheckedChanged(object sender, EventArgs e)
{
            //code
 }

Thanks in advance.

Dario Zanelli
Princy
Top achievements
Rank 2
 answered on 04 Jan 2011
5 answers
145 views
Hello,
 I have a red grid and that grid contains

MasterTableView - > EditFormSettings - > FormTemplate
in FormTemplate I have 2 Radiobutton and on this radio button should Visible true false a TR using js or jquery.
i enable to do that with red grid, plz give me suitable code of js or jquery to do my task...

My grid code is below.............

 

 

<telerik:RadGrid ID="grdPurchaseItems" runat="server" ShowStatusBar="True" AllowAutomaticUpdates="false"

 

 

AllowAutomaticInserts="false" AllowAutomaticDeletes="false" AllowPaging="True"

 

 

Skin="Outlook" AllowSorting="True" OnNeedDataSource="grdPurchaseItems_NeedDataSource"

 

 

OnItemCommand="grdPurchaseItems_ItemCommand" AutoGenerateColumns="false" OnItemDataBound="grdPurchaseItems_ItemDataBound"

 

 

Width="99%">

 

 

<GroupingSettings CaseSensitive="False"></GroupingSettings>

 

 

<MasterTableView DataKeyNames="Sno" EditMode="PopUp" CommandItemDisplay="Top">

 

 

<Columns>

 

 

<telerik:GridEditCommandColumn Visible="False" ButtonType="ImageButton">

 

 

</telerik:GridEditCommandColumn>

 

 

<telerik:GridBoundColumn DataField="Sno" UniqueName="Sno" HeaderText="S.No.">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="ItemID" UniqueName="ItemID" Visible="False" HeaderText="ID">

 

 

<ItemStyle ForeColor="Gray"></ItemStyle>

 

 

<HeaderStyle Width="20px" ForeColor="WhiteSmoke"></HeaderStyle>

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="ItemCode" UniqueName="ItemCode" HeaderText="Item-Code">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="ItemName" UniqueName="ItemName" HeaderText="Item Name">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Size" UniqueName="ItemSize" HeaderText="Size">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Unit" UniqueName="Unit" HeaderText="Unit">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Qty" UniqueName="Qty" HeaderText="Qty">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="RatePerUnit" UniqueName="RatePerUnit" HeaderText="Rate/Unit">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Discount" UniqueName="Discount" HeaderText="Discount(%)">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="NetRatePerUnit" UniqueName="NetRatePerUnit" HeaderText="Net Rate/Unit">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="TotalAmt" UniqueName="TotalAmt" HeaderText="Total Amt."

 

 

Visible="false">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="TaxRate" UniqueName="TaxRate" HeaderText="Tax Rate(%)">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="TaxAmt" UniqueName="TaxAmt" HeaderText="Tax Amt."

 

 

Visible="false">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="GrossAmt" UniqueName="GrossAmt" HeaderText="Gross Amt."

 

 

Visible="false" />

 

 

<telerik:GridBoundColumn DataField="Adjustment" UniqueName="Adjustment" HeaderText="Adjustment"

 

 

Visible="false" />

 

 

<telerik:GridBoundColumn DataField="GrandTotal" UniqueName="GrandTotal" HeaderText="GrandTotal"

 

 

Visible="false" />

 

 

<telerik:GridButtonColumn UniqueName="column" Text="Delete" CommandName="Delete"

 

 

ButtonType="ImageButton">

 

 

</telerik:GridButtonColumn>

 

 

</Columns>

 

 

<HeaderStyle HorizontalAlign="Center"></HeaderStyle>

 

 

<EditFormSettings EditFormType="Template">

 

 

<FormTemplate>

 

 

<table id="table2" cellspacing="2" cellpadding="1" width="100%" border="1" rules="none"

 

 

style="border-collapse: collapse; background: white;">

 

 

<tr>

 

 

<td colspan="2" style="font-size: small">

 

 

<b>Item Details</b></td>

 

 

</tr>

 

 

<tr>

 

 

<td colspan="2">

 

 

<table id="table3" cellspacing="1" cellpadding="1" width="100%" border="0">

 

 

<tr>

 

 

<td colspan="5">

 

 

<asp:ValidationSummary ID="ValidationSummary2" runat="server" ShowMessageBox="True"

 

 

ShowSummary="False" ValidationGroup="vsum1" />

 

 

</td>

 

 

<td>

 

 

<asp:HiddenField ID="hdnSno" runat="server" Value='<%# Bind( "Sno" ) %>' />

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td class="tdleft">

 

 

&nbsp;Item Category<span style="color: #ff0000"> *</span></td>

 

 

<td class="tdleft">

 

 

<asp:DropDownList ID="cmbItemCategory" CssClass="setcombo" DataSource='<%# f_BindItemCategory(0) %>'

 

 

DataTextField="ItemCatName" DataValueField="ItemCatID" runat="server" AutoPostBack="true"

 

 

OnSelectedIndexChanged="cmbItemCategory_SelectedIndexChanged">

 

 

<asp:ListItem Selected="True" Text="Select" Value="0"></asp:ListItem>

 

 

</asp:DropDownList>

 

 

<asp:RequiredFieldValidator ID="rfvItemCategory" InitialValue="0" runat="server"

 

 

ControlToValidate="cmbItemCategory" Display="Dynamic" ErrorMessage="Please Select Item Category"

 

 

ValidationGroup="vsum1"><span style="COLOR: #ff0000"> *</span></asp:RequiredFieldValidator>

 

 

</td>

 

 

<td class="tdleft">

 

 

&nbsp;Item<span style="color: #ff0000"> *</span></td>

 

 

<td class="tdleft">

 

 

<asp:DropDownList ID="cmbItem" runat="server" AutoPostBack="true" CssClass="setcombo"

 

 

OnSelectedIndexChanged="cmbItem_SelectedIndexChanged">

 

 

<asp:ListItem Selected="True" Text="Select" Value="0"></asp:ListItem>

 

 

</asp:DropDownList>

 

 

<asp:RequiredFieldValidator ID="rfvItem" InitialValue="0" runat="server" ControlToValidate="cmbItem"

 

 

Display="Dynamic" ErrorMessage="Please Select Item" ValidationGroup="vsum1"><span style="COLOR: #ff0000"> *</span></asp:RequiredFieldValidator>

 

 

</td>

 

 

<td class="tdleft">

 

 

&nbsp;Item Code</td>

 

 

<td class="tdleft">

 

 

<asp:TextBox ID="ItemCode" runat="server" Text='<%# Bind( "ItemCode" ) %>' CssClass="textbox">

 

 

</asp:TextBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td class="tdleft">

 

 

&nbsp;Item Name</td>

 

 

<td class="tdleft">

 

 

<asp:TextBox ID="ItemName" runat="server" Text='<%# Bind( "ItemName" ) %>' CssClass="textbox">

 

 

</asp:TextBox></td>

 

 

<td class="tdleft">

 

 

&nbsp;Size</td>

 

 

<td class="tdleft">

 

 

<asp:TextBox ID="Size" runat="server" Text='<%# Bind( "Size") %>' CssClass="textbox">

 

 

</asp:TextBox></td>

 

 

<td class="tdleft">

 

 

&nbsp;Unit</td>

 

 

<td class="tdleft">

 

 

<asp:TextBox ID="Unit" runat="server" Text='<%# Bind( "Unit") %>' CssClass="textbox">

 

 

</asp:TextBox></td>

 

 

</tr>

 

 

<tr>

 

 

<td colspan="6">

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td class="tdleft">

 

 

&nbsp;Quantity<span style="color: #ff0000"> *</span></td>

 

 

<td class="tdleft">

 

 

<asp:TextBox ID="Qty" runat="server" Text='<%# Bind( "Qty") %>' AutoPostBack="true"

 

 

CssClass="textbox" OnTextChanged="Qty_TextChanged" onkeypress="javascript:return numeric_only(event)">

 

 

</asp:TextBox>

 

 

<asp:RequiredFieldValidator ID="rfvQty" runat="server" ControlToValidate="Qty" Display="Dynamic"

 

 

ErrorMessage="Please Enter Quantity" ValidationGroup="vsum1"><span style="COLOR: #ff0000"> *</span></asp:RequiredFieldValidator>

 

 

<asp:CompareValidator ID="cvQty" runat="server" Operator="GreaterThan" SetFocusOnError="True"

 

 

Display="Dynamic" ErrorMessage="Please Input At Least 1 Qty." ValueToCompare="0"

 

 

ValidationGroup="vsum1" ControlToValidate="Qty"><span style="COLOR: #ff0000"> *</span></asp:CompareValidator>

 

 

</td>

 

 

<td class="tdleft">

 

 

&nbsp;Rate/Unit</td>

 

 

<td class="tdleft">

 

 

<asp:TextBox ID="RatePerUnit" runat="server" Text='<%# Bind( "RatePerUnit") %>' AutoPostBack="true"

 

 

CssClass="textbox" OnTextChanged="RatePerUnit_TextChanged" onkeypress="return numeric_only(event);">

 

 

</asp:TextBox></td>

 

 

<td class="tdleft">

 

 

&nbsp;Discount</td>

 

 

<td class="tdleft">

 

 

<asp:TextBox ID="Discount" runat="server" Text='<%# Bind( "Discount") %>' AutoPostBack="true"

 

 

CssClass="textbox" OnTextChanged="Discount_TextChanged" onkeypress="return numeric_only(event);">

 

 

</asp:TextBox>%</td>

 

 

</tr>

 

 

<tr>

 

 

<td colspan="6">

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td class="tdleft">

 

 

&nbsp;Net Rate/Unit</td>

 

 

<td class="tdleft">

 

 

<asp:TextBox ID="NetRatePerUnit" runat="server" Text='<%# Bind( "NetRatePerUnit") %>'

 

 

CssClass="textbox" ReadOnly="true" onkeypress="return numeric_only(event);">

 

 

</asp:TextBox></td>

 

 

<td class="tdleft">

 

 

&nbsp;Total Amount</td>

 

 

<td class="tdleft">

 

 

<asp:TextBox ID="TotalAmt" runat="server" Text='<%# Bind( "TotalAmt") %>' CssClass="textbox"

 

 

ReadOnly="true" onkeypress="return numeric_only(event);">

 

 

</asp:TextBox></td>

 

 

<td class="tdleft">

 

 

&nbsp;Tax Rate<span style="color: #ff0000"> *</span></td>

 

 

<td class="tdleft">

 

 

<asp:DropDownList ID="cmbTaxRate" runat="server" CssClass="setcombo" AutoPostBack="true"

 

 

OnSelectedIndexChanged="cmbTaxRate_SelectedIndexChanged" DataSource='<%# f_BindTaxRate() %>'

 

 

DataTextField="TaxRate" DataValueField="TaxRateID">

 

 

<asp:ListItem Selected="True" Text="Select" Value="0"></asp:ListItem>

 

 

</asp:DropDownList>%<asp:RequiredFieldValidator ID="rfvTaxRate" InitialValue="0"

 

 

runat="server" ControlToValidate="cmbTaxRate" Display="Dynamic" ErrorMessage="Please Select Tax Rate"

 

 

ValidationGroup="vsum1"><span style="COLOR: #ff0000"> *</span></asp:RequiredFieldValidator></td>

 

 

</tr>

 

 

<tr>

 

 

<td colspan="6">

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td class="tdleft">

 

 

&nbsp;Tax Amount</td>

 

 

<td class="tdleft">

 

 

<asp:TextBox ID="TaxAmt" runat="server" Text='<%# Bind( "TaxAmt") %>' CssClass="textbox"

 

 

ReadOnly="true" onkeypress="javascript:return numeric_only(event);">

 

 

</asp:TextBox></td>

 

 

<td class="tdleft">

 

 

&nbsp;Gross Amount</td>

 

 

<td class="tdleft">

 

 

<asp:TextBox ID="GrossAmt" runat="server" Text='<%# Bind( "GrossAmt") %>' CssClass="textbox"

 

 

ReadOnly="true" onkeypress="return numeric_only(event);">

 

 

</asp:TextBox></td>

 

 

<td class="tdleft">

 

Excies Applicable

</td>

 

 

<td class="tdleft">

 

 

<asp:RadioButton ID="rbtnYes" runat="server" Text="Yes" Checked="true" GroupName="Excies"

 

 

onclick="show(this,'Yes');" />

 

 

<asp:RadioButton ID="rbtnNo" runat="server" Text="No" GroupName="Excies" onclick="show(this,'No');" />

 

 

</td>

 

 

</tr>

 

 

<tr id="trExcies" runat="server" visible="false">

 

 

<td>

 

 

</td>

 

 

<td>

 

 

</td>

 

 

<td>

 

 

</td>

 

 

<td>

 

 

</td>

 

 

<td>

 

Excise Tax rate

</td>

 

 

<td>

 

 

<asp:TextBox ID="txtExciseTaxRate" runat="server" />%

 

 

<asp:RequiredFieldValidator ID="rfvExciseTaxRate" runat="server" SetFocusOnError="true"

 

 

Display="Dynamic" ControlToValidate="txtExciseTaxRate" ErrorMessage="Please enter Excise Tax Rate" />

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td align="right" colspan="2">

 

 

<asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'

 

 

runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'

 

 

OnClick="btnUpdate_Click" ValidationGroup="vsum1"></asp:Button>&nbsp;

 

 

<asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"

 

 

CommandName="Cancel"></asp:Button></td>

 

 

</tr>

 

 

</table>

 

 

</FormTemplate>

 

 

<PopUpSettings Modal="True" Width="80%"></PopUpSettings>

 

 

<FormStyle Width="100%"></FormStyle>

 

 

<EditColumn UniqueName="EditCommandColumn1">

 

 

</EditColumn>

 

 

</EditFormSettings>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>


thanks
Amit

 

Princy
Top achievements
Rank 2
 answered on 04 Jan 2011
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
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
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?