16,021,115 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by MANI 14 (Top 29 by date)
MANI 14
10-Feb-14 5:28am
View
its not working. Here i open report as u said, while i click on report preview then its showing RESTART THE PROGRAMM & DEBUG THE PROGRAM and then VS is automatically close. Pls tell any other solution.
MANI 14
10-Feb-14 3:54am
View
Crystal report
MANI 14
4-Jan-14 1:59am
View
Its working if it is single page. But in my app Having master page thats why its not working automatically. if any click event fire then its statring. please help me how to refreshing page content when page is gets loaded by using timer
MANI 14
3-Jan-14 1:19am
View
no. where it is used
MANI 14
3-Jan-14 1:04am
View
Deleted
if(!IsPostBack)
{
TimerCharts_Tick(sender, e);
}
Is it currect please suggest me
MANI 14
28-Nov-13 1:53am
View
Here i am checking the data in textboxes at OnRowUpdate Event
for (int i = 0; i < dt.Columns.Count; i++)
{
if (dt.Columns[i].ColumnName != "UHID" && dt.Columns[i].ColumnName != "EmpID" && dt.Columns[i].ColumnName != "Cal_Month" && dt.Columns[i].ColumnName != "Total_Earning" && dt.Columns[i].ColumnName != "Total_Deduction" && dt.Columns[i].ColumnName != "Net_Salary")
{
if (dt.Columns[i].DataType.Name == "Decimal")
{
string str = (gvrow.Cells[i + 1].Controls[0] as TextBox).Text.ToString();
(gvrow.Cells[i + 1].Controls[0] as TextBox).AutoPostBack = true;
if (str == "" || str == ".")
str = "0.00";
else if ((!str.Contains(".")))
str = str + ".00";
Regex regex = new Regex(@"^[0-9]+\.?[0-9]{1,2}$");
if (regex.IsMatch(str))
{
txtFlag = 1;
if (str == "0.00")
dt.Rows[j][i] = Convert.ToDecimal(str.ToString());
else
dt.Rows[j][i] = Convert.ToDecimal((gvrow.Cells[i + 1].Controls[0] as TextBox).Text.ToString());
}
else
{
message;
}
}
}
MANI 14
28-Nov-13 1:51am
View
In grid i have 10 decimal datatype columns(textboxes). when changing the one textbox then i want to fire the function() to check if the data is decimal or not. But here i am changing text in some textboxes and press update then i am checking the all the textboxes and showing some message.
MANI 14
28-Nov-13 1:44am
View
i wrote OnKeyUp function() for format of the text. But i am not able to find how to call the function.
MANI 14
28-Nov-13 1:40am
View
In gridview rows clicking edit button. Then decimal datatype columns are comes as textboxes. while entering text in textbox i want to find the text whether text is correct or not at leaving that text box when focus is leave that textbox.
MANI 14
28-Nov-13 1:17am
View
DataTable dtSalProcess = ssBO.GetSalaryProcess(ssEntity);
public void BintoGrid()
{
foreach (DataColumn col in dtSalProcess.Columns)
{
BoundField bfield = new BoundField();
//Initalize the DataField value.
bfield.DataField = col.ColumnName;
//Initialize the HeaderText field value.
bfield.HeaderText = col.ColumnName;
if (col.ColumnName == "UHID" || col.ColumnName == "EmpID" || col.ColumnName == "Cal_Month" || col.ColumnName == "Cal_Year" || col.ColumnName == "Freezed")
bfield.Visible = false;
if (col.ColumnName == "EmpName" || col.ColumnName == "StaffNo" || col.ColumnName == "Month" || col.ColumnName == "NoOfDays" || col.ColumnName == "Cal_Year" || col.ColumnName == "Total_Earning" || col.ColumnName == "Total_Deduction" || col.ColumnName == "Net_Salary")
{
bfield.ReadOnly = true;
bfield.ItemStyle.BackColor = System.Drawing.Color.AliceBlue;//LightBlue;//.LightSteelBlue;
}
gvProcessSalary.Columns.Add(bfield);
}
Session["dtSalProcess"] = dtSalProcess;
protected void gvProcessSalary_OnRowEditig(object sender, GridViewEditEventArgs e)
{
gvProcessSalary.EditIndex = e.NewEditIndex;
BindProcessSalDetails();
}
}
protected void gvProcessSalary_OnRowUpdating(object sender, GridViewUpdateEventArgs e)
{
for (int i = 0; i < dt.Columns.Count; i++)
{
if (dt.Columns[i].ColumnName != "UHID" && dt.Columns[i].ColumnName != "EmpID" && dt.Columns[i].ColumnName != "Cal_Month" && dt.Columns[i].ColumnName != "Total_Earning" && dt.Columns[i].ColumnName != "Total_Deduction" && dt.Columns[i].ColumnName != "Net_Salary")
{
if (dt.Columns[i].DataType.Name == "Decimal")
{
string str = (gvrow.Cells[i + 1].Controls[0] as TextBox).Text.ToString();
(gvrow.Cells[i + 1].Controls[0] as TextBox).AutoPostBack = true;
if (str == "" || str == ".")
str = "0.00";
else if ((!str.Contains(".")))
str = str + ".00";
Regex regex = new Regex(@"^[0-9]+\.?[0-9]{1,2}$");
if (regex.IsMatch(str))
{
txtFlag = 1;
if (str == "0.00")
dt.Rows[j][i] = Convert.ToDecimal(str.ToString());
else
dt.Rows[j][i] = Convert.ToDecimal((gvrow.Cells[i + 1].Controls[0] as TextBox).Text.ToString());
}
}
MANI 14
22-Oct-13 0:44am
View
selectedIndex is k. Here combo box is write mode then newly enter a text without selecting then how to find that text box plss help me
MANI 14
22-Oct-13 0:40am
View
if u dnt mine show me one example pls
MANI 14
21-Oct-13 7:13am
View
yes
MANI 14
21-Oct-13 2:58am
View
GetBatchNoDtls() is based on Medicine Name. If medicine name is changed then called. I write this method in medicineName_TextChanged Event.
MANI 14
21-Oct-13 2:51am
View
I can fetch Batchno(combobox)& three text boxes data.
public void GetBatchNoDtls()// Get the batch no.s & details based on selected medicine name
{
MedicineReturnEntity objMedEntity = new MedicineReturnEntity();
objMedEntity.MedId = medId;
IList<medicinereturnentity> MedBtchLst = MRBO.GetBatchNoDtls(objMedEntity);
cmbBatchno.Items.Clear();
if (MedBtchLst.Count > 0)
{
cmbBatchno.DataSource = MedBtchLst;
cmbBatchno.DataTextField = "BatchNo";
cmbBatchno.DataValueField = "BatchNo";
cmbBatchno.DataBind();
cmbBatchno.Items.Insert(0, "select");
DataTable dtBtachNo = new DataTable();// this is the table for storing batchno list to table
DataRow dr;
for (int i = 0; i < MedBtchLst.Count; i++)
{
if (dtBtachNo.Rows.Count == 0)
{
dtBtachNo.Columns.Add("BatchNo", typeof(string));
dtBtachNo.Columns.Add("ExpDate", typeof(string));
dtBtachNo.Columns.Add("MRP", typeof(Decimal));
dtBtachNo.Columns.Add("Rate", typeof(Decimal));
}
dr = dtBtachNo.NewRow();
dr["BatchNo"] = MedBtchLst[i].BatchNo;
dr["ExpDate"] = MedBtchLst[i].ExpDate;
dr["MRP"] = MedBtchLst[i].MRP.ToString();
dr["Rate"] = MedBtchLst[i].Rate.ToString();
dtBtachNo.Rows.Add(dr);
}
ViewState["BatchNo"] = dtBtachNo;
}
else
{
cmbBatchno.Items.Insert(0, "select");
ClearBatchNoDtls();
}
}
MANI 14
21-Oct-13 2:47am
View
Actually my aim is to, i have to text boxes & Combo box ,combo box is editable. By selecting any item in combo box then i can pull up the data to two text boxes and make it in enable="false" , if any text is changed or edit in combo box then two text boxes are cleared and enable "true". so, how to do this either this way or any alternative pls help.
MANI 14
21-Oct-13 2:40am
View
yes cmbBatchno_selectedIndexChanged is firing. If selected index text is changed in combo box then cmbBatchno_TextChanged event is not fire.
MANI 14
21-Oct-13 2:23am
View
k but cmbBatchno_TextChanged is not executed when changed the text in comboBox(cmbbatchno) is there any wrong.. pls help me
MANI 14
21-Oct-13 2:13am
View
When combo box text is changed then i can enable the text boxes other wise put it in disable mode. but THis textchanged event is not fire..
<asp:ComboBox ID="cmbBatchno" OnSelectedIndexChanged="cmbBatchno_SelectedIndexChanged" OnTextChanged="cmbBatchno_textchange" ItemInsertLocation="Prepend" runat="server" AutoPostBack="True" DropDownStyle="Simple" AutoCompleteMode="Append">
public void cmbBatchno_SelectedIndexChanged(object sender, EventArgs e)
{
if (ViewState["BatchNo"] != null)
{
DataTable dtBatchNoDtls = (DataTable)ViewState["BatchNo"];
for (int i = 0; i < dtBatchNoDtls.Rows.Count; i++)
{
if (dtBatchNoDtls.Rows[i]["BatchNo"].ToString() == cmbBatchno.Text)
{
txtExpdate.Text = dtBatchNoDtls.Rows[i]["ExpDate"].ToString();
txtMRP.Text = dtBatchNoDtls.Rows[i]["MRP"].ToString();
txtRate.Text = dtBatchNoDtls.Rows[i]["Rate"].ToString();
if (txtExpdate.Text != "")
txtPacks.Focus();
else
txtExpdate.Focus();
break;
}
else
{
txtExpdate.Text = string.Empty;
txtMRP.Text = "";
txtRate.Text = "";
}
}
}
}
public void cmbBatchno_textchange(object sender, EventArgs e)
{
if (ViewState["BatchNo"] != null)
{
DataTable dtBatchNoDtls = (DataTable)ViewState["BatchNo"];
for (int i = 0; i < dtBatchNoDtls.Rows.Count; i++)
{
if (cmbBatchno.Text == dtBatchNoDtls.Rows[i]["BatchNo"].ToString())
{
txtExpdate.Enabled = false;
txtMRP.Enabled = false;
break;
}
else
{
txtExpdate.Enabled = true;
txtMRP.Enabled = true;
txtExpdate.Text = string.Empty;
txtMRP.Text = "";
txtRate.Text = "";
}
}
}
}
MANI 14
19-Oct-13 8:34am
View
when combo box text is changed then check the text and do that actions in cmbatchno_load event
pls help me
MANI 14
19-Oct-13 8:32am
View
i want to get batchno in combo box text. If that batchno is not match with the viewstate details then txtexpdate,txtmrp make it enable.
MANI 14
19-Oct-13 8:19am
View
sorry... not that event
void cmbBatchno_Load(object sender, EventArgs e)
{
if (ViewState["BatchNo"] != null)
{
DataTable dtBatchNoDtls = (DataTable)ViewState["BatchNo"];
for (int i = 0; i < dtBatchNoDtls.Rows.Count; i++)
{
if (cmbBatchno.Text == dtBatchNoDtls.Rows[i]["BatchNo"].ToString())
{
txtExpdate.Enabled = false;
txtMRP.Enabled = false;
break;
}
else
{
txtExpdate.Enabled = true;
txtMRP.Enabled = true;
txtExpdate.Text = string.Empty;
txtMRP.Text = "";
txtRate.Text = "";
}
}
}
}
MANI 14
19-Oct-13 8:18am
View
this is not working.... Is any wrong here pls help me
cmbBatchno.Load += new EventHandler(cmbBatchno_Load())
public void cmbBatchno_SelectedIndexChanged(object sender, EventArgs e)
{
if (ViewState["BatchNo"] != null)
{
DataTable dtBatchNoDtls = (DataTable)ViewState["BatchNo"];
for (int i = 0; i < dtBatchNoDtls.Rows.Count; i++)
{
if (dtBatchNoDtls.Rows[i]["BatchNo"].ToString() == cmbBatchno.Text)
{
txtExpdate.Text = dtBatchNoDtls.Rows[i]["ExpDate"].ToString();
txtMRP.Text = dtBatchNoDtls.Rows[i]["MRP"].ToString();
txtRate.Text = dtBatchNoDtls.Rows[i]["Rate"].ToString();
if (txtExpdate.Text != "")
txtPacks.Focus();
else
txtExpdate.Focus();
break;
}
else
{
txtExpdate.Text = string.Empty;
txtMRP.Text = "";
txtRate.Text = "";
}
}
}
}
MANI 14
19-Oct-13 2:14am
View
its working thank u..
MANI 14
12-Oct-13 4:56am
View
kk its working fine. Thank you......... Azee
MANI 14
12-Oct-13 4:44am
View
i want to find which text box get fair and then assign focus to next text box. These are used in gridview. So, how to find which text box changed please help me
MANI 14
4-Oct-13 1:36am
View
code is working.when if condition occurs then i want to set text box(passed) value should be empty or set to today date. so, pls tell me how to set that value
MANI 14
4-Oct-13 1:18am
View
its working..... Thank you so much.
MANI 14
4-Oct-13 0:40am
View
While entered date should not be greater than today date
Show More