Click here to Skip to main content
16,016,088 members

Comments by Vandana_Pathak (Top 8 by date)

Vandana_Pathak 1-Aug-13 7:41am View    
<asp:Label ID="lbl" runat="server" Text="No">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="true" OnRowDataBound="CustomersGridView_RowDataBound" ShowFooter="true">
<columns>
<asp:BoundField DataField="amt" HeaderText="Amt"/>
<asp:TemplateField>
<footertemplate>
<asp:TextBox ID="TextBox1" runat="server" OnTextChanged="textboxchanged" AutoPostBack="true">






DataTable dt = new DataTable();
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
dt.Columns.Add("amt", typeof(Int32));
dt.Columns.Add("pamt", typeof(Int32));
dt.Columns.Add("damt", typeof(Int32));
DataRow dr=dt.NewRow();
dr[0] = 200;
dt.Rows.Add(dr);
DataRow dr1 = dt.NewRow();
dr1[0] = 400;
dt.Rows.Add(dr1);
GridView1.DataSource = dt;
GridView1.DataBind();
string directoryPath = @"D:\New folder";
TextBox TextBox1 = (TextBox)GridView1.FooterRow.Cells[0].FindControl("TextBox1");
TextBox1.Text = "abc";
}
}

protected void textboxchanged(Object sender, EventArgs e)
{
TextBox TextBox1 = (TextBox)GridView1.FooterRow.Cells[0].FindControl("TextBox1");
if (TextBox1.Text != "")
{
lbl.Text = "Yes";
}
else { lbl.Text = "No"; }
}
Try this may be it is helpful for you
Vandana_Pathak 1-Aug-13 7:19am View    
Try this
select broker_id,name,amt,sum(amt) as Total_lots, 0.15* sum(amt) as premium from item group by broker,name,amt order by broker_id,lot_no
OR
select a.*,a.Total_lots * 0.15 from (select broker_id,name,amt,sum(amt) as Total_lots from item group by broker,name,amt order by broker_id,lot_no) a
Vandana_Pathak 1-Aug-13 7:15am View    
can i know what problem actually raised?
Vandana_Pathak 1-Aug-13 4:57am View    
da = New SqlDataAdapter("select broker_id,name,amt,sum(amt) as Total_lots, 0.15* total_lots as premium order by broker_id,lot_no ", cn)
Above you give code,can u explain this query is correct in your code.Because this query does not have from clause.If u clear doubt then i can help you and give solution properly
Vandana_Pathak 11-Feb-13 4:26am View    
Thanks...actually when get the control in page then above code return object[object] in place or ct_100 like id.