Click here to Skip to main content
14,694,175 members

Comments by Member 13044689 (Top 42 by date)

Member 13044689 4-Apr-17 7:28am View
   
it doesn't matter what value in it maybe will be empty or not but the problem that how can i sum using 2 dot value

ex: suppose val1 = 2,050,000
val2 = 3,000,000
sum = 5,050,000 ----------> but there is no value appear at sum col

and yes its working good when i try any numbers with 1 dot value so can u help?
Member 13044689 4-Apr-17 6:06am View
   
actually this is code to sum between columns and double.parse not working some help

if (e.Row.RowType == DataControlRowType.DataRow)
{
if ((e.Row.RowState & DataControlRowState.Edit) > 0)
{
string val1 = e.Row.Cells[13].Text;
string val2 = e.Row.Cells[14].Text;
string val3 = e.Row.Cells[15].Text;
string val4 = e.Row.Cells[16].Text;
Label lblTotal = (Label)e.Row.Cells[12].FindControl("Label20");
float _val1, _val2, _val3, _val4;

float.TryParse(val1, out _val1);
float.TryParse(val2, out _val2);
float.TryParse(val3, out _val3);
float.TryParse(val4, out _val4);
float sum = _val1 + _val2 + _val3 + _val4;
lblTotal.Text += sum.ToString();


the total column not show the number
Member 13044689 30-Mar-17 9:20am View
   
Y but its only 1 Guy use, thx any way
Member 13044689 30-Mar-17 9:04am View
   
well why this website is here when u can ask and just the other respond without any help and just 1 line description idk really
Member 13044689 30-Mar-17 8:51am View
   
then how can i show the image because its not show the image
Member 13044689 30-Mar-17 3:57am View
   
SIR SRY FOR BOTHERING i want to add two image in form view i did this but still upload only one


protected void LinkButton4_Click(object sender, EventArgs e)
{


FileUpload newfileuploadcontrol = FormView1.FindControl("FileUpload4") as FileUpload;
TextBox newtextbox = FormView1.FindControl("TextBox10") as TextBox;

if (newfileuploadcontrol.HasFile)
{
string path = Server.MapPath("/Cars/Copy_of_Payment_Images/") + newfileuploadcontrol.FileName;
newfileuploadcontrol.SaveAs(path);

newtextbox.Text = path;
}
else
{

FileUpload newfileuploadcontrol1 = FormView1.FindControl("FileUpload3") as FileUpload;
TextBox newtextbox1 = FormView1.FindControl("TextBox26") as TextBox;

if(newfileuploadcontrol.HasFile&&newfileuploadcontrol1.HasFile)
{

string path = Server.MapPath("/Cars/Copy_of_Payment_Images/") + newfileuploadcontrol.FileName;
newfileuploadcontrol.SaveAs(path);
string path1 = Server.MapPath("/Cars/Car_Image/") + newfileuploadcontrol1.FileName;
newfileuploadcontrol.SaveAs(path);
newtextbox.Text = path;
newtextbox1.Text = path1;



}
Member 13044689 30-Mar-17 2:35am View
   
its work sir now u r life savior thx
Member 13044689 30-Mar-17 2:20am View
   
its not work keep getting "true" value i want the url of image
Member 13044689 29-Mar-17 15:57pm View
   
ok thanks
Member 13044689 29-Mar-17 8:25am View
   
ok sir thank u , one more thing what do u mean in your first comment my condition is wrong , but i need this with windows service , and i want someone to visit so it's wrong?
Member 13044689 29-Mar-17 7:26am View
   
can u recommend me an article or something will help me
Member 13044689 27-Mar-17 16:20pm View
   
well sir give me your email and let's go talk private as business work
Member 13044689 27-Mar-17 10:00am View
   
can u show me sample how can i do it , i mean if u want.
Member 13044689 25-Mar-17 4:15am View
   
thank u
Member 13044689 25-Mar-17 4:08am View
   
thank u but at least something to start with
Member 13044689 25-Mar-17 3:43am View
   
i know what is contain null but idk the syntax cuz i'm new at this you can give me hint of doing this sir
Member 13044689 25-Mar-17 2:16am View
   
ok thank u
Member 13044689 24-Mar-17 5:32am View
   
y i did it thank u
Member 13044689 24-Mar-17 5:31am View
   
thx sir , but we didnt born just knowing everything we learn and learn just make it polite or don't comment aim new at this without asking here and there will never learn
thx
Member 13044689 24-Mar-17 5:29am View
   
thx sir its work
Member 13044689 23-Mar-17 16:29pm View
   
its work sir after change null value but i need to do it with keep null its mean 0 thanks for help
Member 13044689 23-Mar-17 16:28pm View
   
how can i fix it if i have null value plz help sir
Member 13044689 23-Mar-17 16:21pm View
   
some value have null but this will not affect right?
Member 13044689 23-Mar-17 16:19pm View
   
its told me opreator == cannot be applied the opreands of type string
Member 13044689 23-Mar-17 16:15pm View
   
hello sir thanks for reply but still the same error
Member 13044689 22-Mar-17 14:20pm View
   
ok we have two type of search dropdown and textbox ok the selectcommand
SELECT * FROM [ALL_VECH] WHERE (([Colour] = @Colour) AND ([Type] LIKE '%' + @Type + '%'))"> ( this is work but i need it like this ) SELECT * FROM [ALL_VECH] WHERE (([Colour] = @Colour) OR ([Type] LIKE '%' + @Type + '%'))"> I Mean search by dropdown or textbox not drop down and textbox
Member 13044689 21-Mar-17 7:10am View
   
thank u sir
Member 13044689 21-Mar-17 4:00am View
   
thank u sir its working now iam idiot sorry for taking ur time
Member 13044689 21-Mar-17 3:50am View
   
<title>

body
{
font-family: Arial;
font-size: 10pt;
}
table
{
border: 1px solid #ccc;
border-collapse: collapse;
background-color: #fff;
}
table th
{
background-color: #B8DBFD;
color: #333;
font-weight: bold;
}
table th, table td
{
padding: 5px;
border: 1px solid #ccc;
}
table, table table td
{
border: 0px solid #ccc;
}












<asp:CheckBox ID="CheckBox1" Text="Purches Value" runat="server" Checked="true" />






<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px"
CellPadding="4" DataKeyNames="Id" DataSourceID="SqlDataSource1">
<columns>
<asp:BoundField DataField="Id" HeaderText="Id" ReadOnly="True"
SortExpression="Id" />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
<asp:BoundField DataField="Country" HeaderText="Country"
SortExpression="Country" />
<asp:BoundField DataField="purchesvalue" HeaderText="purchesvalue"
SortExpression="purchesvalue" />
<asp:BoundField DataField="shippingvalue" HeaderText="shippingvalue"
SortExpression="shippingvalue" />
<asp:BoundField DataField="othercharge" HeaderText="othercharge"
SortExpression="othercharge" />
<asp:BoundField DataField="Total" HeaderText="Total" SortExpression="Total" />

<FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
<PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
<RowStyle BackColor="White" ForeColor="#330099" />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
<SortedAscendingCellStyle BackColor="#FEFCEB" />
<SortedAscendingHeaderStyle BackColor="#AF0101" />
<SortedDescendingCellStyle BackColor="#F6F0C0" />
<SortedDescendingHeaderStyle BackColor="#7E0000" />

<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:All_VechConnectionString1 %>"
SelectCommand="SELECT * FROM [test]">


$(function () {
$("[id*=CheckBox1]").click(function () {
var isChecked = $(this).is(":checked");
var th = $("[id*=GridView1] th:contains('Purches Value')");
th.css("display", isChecked ? "" : "none");
$("[id*=GridView1] tr").each(function () {
$(this).find("td").eq(th.index()).css("display", isChecked ? "" : "none");
});
});
});





this is all the code from start to end i need to hide column name purchase value when i lunch the code and check the box is hiding value of total column which its include string ex (ab,cc,dd) but when i use the same function with country and name that have string value ex(dan, usa) its working well why is that happen?
Member 13044689 21-Mar-17 3:43am View
   
its didn't work the main problem is when the column have declared as int and include number its not hiding and the var value such as name country is working well idk really
Member 13044689 21-Mar-17 3:31am View
   
<asp:CheckBoxList ID="ChkCountry" runat="server">

<asp:CheckBoxList ID="Name" runat="server">

<asp:CheckBoxList ID="Chktotal" runat="server">
Member 13044689 21-Mar-17 3:26am View
   
$(function () {
$("[id*=chkCountry]").click(function () {
var isChecked = $(this).is(":checked");
var th = $("[id*=GridView1] th:contains('Country')");
th.css("display", isChecked ? "" : "none");
$("[id*=GridView1] tr").each(function () {
$(this).find("td").eq(th.index()).css("display", isChecked ? "" : "none");
});
});
});
$(function () {
$("[id*=Name]").click(function () {
var isChecked = $(this).is(":checked");
var th = $("[id*=GridView1] th:contains('Name')");
th.css("display", isChecked ? "" : "none");
$("[id*=GridView1] tr").each(function () {
$(this).find("td").eq(th.index()).css("display", isChecked ? "" : "none");
});
});
});

$(function () {
$("[id*=chktotal]").click(function () {
var isChecked = $(this).is(":checked");
var th = $("[id*=GridView1] th:contains('Total')");
th.css("display", isChecked ? "" : "none");
$("[id*=GridView1] tr").each(function () {
$(this).find("td").eq(th.index()).css("display", isChecked ? "" : "none");
});
});
});


the first 2 checkbox work gd but when its come to the last one fuction the total one its not working this column have numbers value
thank u sir
Member 13044689 21-Mar-17 3:24am View
   
Deleted
Name
Country
Purches Value
Shipping value
other charge
Total
Member 13044689 21-Mar-17 3:19am View
   
Deleted



<input type="checkbox" id="chkt"

this all checkbox thank u sir
Member 13044689 21-Mar-17 3:17am View
   
Deleted
Name
Country
Purches Value
Shipping value
other charge
Total
Member 13044689 21-Mar-17 3:17am View
   
Deleted

Name
Country
Purches Value
Shipping value
other charge
Total


this is all the chkbox
Member 13044689 21-Mar-17 3:02am View
   
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px"
CellPadding="4" DataKeyNames="Id" DataSourceID="SqlDataSource1">
<columns>
<asp:BoundField DataField="Id" HeaderText="Id" ReadOnly="True"
SortExpression="Id" />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
<asp:BoundField DataField="Country" HeaderText="Country"
SortExpression="Country" />
<asp:BoundField DataField="purchesvalue" HeaderText="purchesvalue"
SortExpression="purchesvalue" />
<asp:BoundField DataField="shippingvalue" HeaderText="shippingvalue"
SortExpression="shippingvalue" />
<asp:BoundField DataField="othercharge" HeaderText="othercharge"
SortExpression="othercharge" />
<asp:BoundField DataField="Total" HeaderText="Total" SortExpression="Total" />

<FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
<PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
<RowStyle BackColor="White" ForeColor="#330099" />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
<SortedAscendingCellStyle BackColor="#FEFCEB" />
<SortedAscendingHeaderStyle BackColor="#AF0101" />
<SortedDescendingCellStyle BackColor="#F6F0C0" />
<SortedDescendingHeaderStyle BackColor="#7E0000" />

<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:All_VechConnectionString1 %>"
SelectCommand="SELECT * FROM [test]">









this is my table can u help me with this plz
i want to show and hide those columns based on checkbox thank u sir
Member 13044689 21-Mar-17 3:01am View
   
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px"
CellPadding="4" DataKeyNames="Id" DataSourceID="SqlDataSource1">
<columns>
<asp:BoundField DataField="Id" HeaderText="Id" ReadOnly="True"
SortExpression="Id" />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
<asp:BoundField DataField="Country" HeaderText="Country"
SortExpression="Country" />
<asp:BoundField DataField="purchesvalue" HeaderText="purchesvalue"
SortExpression="purchesvalue" />
<asp:BoundField DataField="shippingvalue" HeaderText="shippingvalue"
SortExpression="shippingvalue" />
<asp:BoundField DataField="othercharge" HeaderText="othercharge"
SortExpression="othercharge" />
<asp:BoundField DataField="Total" HeaderText="Total" SortExpression="Total" />

<FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
<PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
<RowStyle BackColor="White" ForeColor="#330099" />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
<SortedAscendingCellStyle BackColor="#FEFCEB" />
<SortedAscendingHeaderStyle BackColor="#AF0101" />
<SortedDescendingCellStyle BackColor="#F6F0C0" />
<SortedDescendingHeaderStyle BackColor="#7E0000" />

<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:All_VechConnectionString1 %>"
SelectCommand="SELECT * FROM [test]">






((( this is my table can u plz help me with this))
Member 13044689 21-Mar-17 2:14am View
   
ok if u recommend another method to hide and show column based on checkbox in gridview u can give me example, i will be appreciate
Member 13044689 20-Mar-17 2:07am View
   
hello, yes as i said i want have gridview table with many columns and radio button or checkbox with name of columns whatever u choose in radio button 1 or 2 choose it will appear only the columns u choose in radiobutton ( its like hide and show columns based on radio button or checkbox)
Member 13044689 14-Mar-17 5:10am View
   
thank u my friend, my problem was like i stuck in room with no door to leave and i have open window in front of me and i only think that the only thing can get out of this is this door so, thank u my friend
Member 13044689 7-Mar-17 18:30pm View
   
thank u sir