15,900,258 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 Javascript questions
View Visual Basic questions
View Python 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 pinky1810 (Top 18 by date)
pinky1810
6-Jun-13 6:31am
View
Sorry Didn't work, Actually the problem is not with my code,there is some jquery error.
i am not getting any error when i click on view,its just breaking somewhere and the popup is not opening.when i debug it shows like modalpopupextender.cs does't not exist.
please advice
pinky1810
26-Dec-12 2:19am
View
I did't try any validation expression because i dont know much about this, Instead I tried to convert the textbox value to decimal by using parse and convert statement but did't work. In the DB the field type is decimal(3,2). can you give me the validation expression for this please
pinky1810
26-Dec-12 0:56am
View
Hi. Thanks for reply, I have text box inside the gridview , I used (\d{3}\.\d{2}\) as a regular expression , but it is showing error while binding the grid.
error:(\d{3}\.\d{2}\) is not a valid regular expression.
i want textbox to accept only numbers like, 2.22,1.22,9.66 etc
please help
pinky1810
20-Dec-12 3:37am
View
Thanks, I tried your solution in this way but not working
protected void GridviewSample_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes["onmouseover"] =
"javascript:setMouseOverColor(this);";
e.Row.Attributes["onmouseout"] =
"javascript:setMouseOutColor(this);";
e.Row.Attributes["onclick"] =
ClientScript.GetPostBackClientHyperlink
(this.GridviewSample, "Select$" + e.Row.RowIndex);
}
and design code.
<script type="text/javascript">
var oldgridSelectedColor;
function setMouseOverColor(element) {
oldgridSelectedColor = element.style.backgroundColor;
element.style.backgroundColor = 'yellow';
element.style.cursor = 'hand';
element.style.textDecoration = 'underline';
}
function setMouseOutColor(element) {
element.style.backgroundColor = oldgridSelectedColor;
element.style.textDecoration = 'none';
}
</script>
<asp:GridView ID="GridviewSample" runat="server" AutoGenerateColumns="false"
onselectedindexchanged="GridviewSample_SelectedIndexChanged"
onselectedindexchanging="GridviewSample_SelectedIndexChanging"
ondatabound="GridviewSample_DataBound" >
<columns> <asp:BoundField DataField="SNo" HeaderText="SNo" />
<asp:TemplateField HeaderText="Name">
<itemtemplate>
<asp:TextBox ID="txtname" runat="server" >
<asp:Button ID="BtnSave" runat="server" onclick="BtnSave_Click" Text="Save" />
<asp:TextBox ID="TextBox1" runat="server">
Is it right, please advice
pinky1810
20-Dec-12 3:33am
View
can u give me a sample for this please, I am new to this.I dont know how to use it.
pinky1810
19-Dec-12 5:13am
View
This code is working fine to change the selected row color but the problem is i can't enter anything in the textboxes of selected row, please help.
protected override void Render(System.Web.UI.HtmlTextWriter writer)
{
foreach (GridViewRow row in GridviewSample.Rows)
{
if (row.RowType == DataControlRowType.DataRow)
{
row.Attributes["onmouseover"] =
"this.style.cursor='hand';this.style.textDecoration='underline';";
row.Attributes["onmouseout"] =
"this.style.textDecoration='none';";
// Set the last parameter to True
// to register for event validation.
row.Attributes["onclick"] =
ClientScript.GetPostBackClientHyperlink(GridviewSample,
"Select$" + row.DataItemIndex, true);
}
}
base.Render(writer);
}
pinky1810
19-Dec-12 5:00am
View
Thanks, I tried it but it is not working.in which event i can write this. because i am moving to next Row using mouse click. Can u please advice me.
Thanks in advance.
pinky1810
19-Dec-12 1:02am
View
can u give me some example code. like where in which event i should call the java script? Please.
pinky1810
18-Dec-12 4:30am
View
Please advice how to prevent going to next tab before he save data in previous tab
pinky1810
18-Nov-12 5:19am
View
Thaks Pro.
Its working.
pinky1810
18-Nov-12 4:04am
View
I wrote this code but if the dataset is null than it displays error, how to check for whether tae dataset is null or not. here i am getting error.
please advice
pinky1810
18-Nov-12 3:37am
View
This is code in first page where i have my grid on click of button
protected void BtnviewEmployee_Click(object sender, EventArgs e)
{
if (DdlCity.SelectedIndex == 0)
{
cityid = branchid = deptid = 0;
}
else
{
cityid=Convert.ToInt64(DdlCity.SelectedValue.ToString());
branchid=Convert.ToInt64(DdlBranch.SelectedValue.ToString());
if (branchid == 0)
{
deptid = 0;
}
else
{
deptid = Convert.ToInt64(DdlDepartment.SelectedValue.ToString());
}
}
countryid = Convert.ToInt64(Ddlcountry.SelectedValue.ToString());
if (countryid != 0 && cityid != 0 && branchid != 0 && deptid != 0)
{
dsinfo = bl.BsearchEmp(countryid, cityid, branchid, deptid);
}
else if (countryid != 0 && cityid != 0 && branchid != 0)
{
dsinfo = bl.searchEmployee(countryid, cityid, branchid);
}
else if (countryid != 0 && cityid != 0 )
{
dsinfo = bl.searchEmployee(countryid, cityid);
}
else
{
dsinfo = bl.searchEmployee(countryid);
}
Session["mydataset"] = dsinfo;
GridView1.DataSource = (DataSet)Session["mydataset"];
GridView1.DataBind();
BtnDumpToExcel.Visible = true;
BtnPrint.Visible = true;
}
protected void Get_Employee_Id_from_grid(object sender, EventArgs e)
{
Button btn= sender as Button;
if (btn != null)
{
string Employee_Id = btn.CommandArgument;
Session["Gridview_Employee_id"] = Employee_Id;
Response.Redirect("ViewEmployeeDetail.aspx");
}
after coming back from ViewEmployeeDetail.aspx i want to see the same grid which is loaded before.
and my grid is in update panel ang i made my button as a trigger to that grid.
please advice..
pinky1810
15-Nov-12 6:18am
View
yes they are getting values from Database itself.
The country Drop Down is populating when the ispostback property is false,
but the city ddl will populate based on the selection of country on selectedIndexChanged event Of Country ddl.
and Branches will get loaded based on the values of country and city on cityddl selectedIndexChanged Event and
department ddl get loads after the selection of branch ddl.in branchddl
selectedindex changed Event.
I thought may be i am loosing the values during postback and i traced the valus and the values passed to function are correct.department id passed correctly to the function.
please Advice
pinky1810
15-Nov-12 6:01am
View
I did some modification like this
cmd.Parameters.AddWithValue("@countryid", (countryid == 0) ? (object) DBNull.Value : countryid);
But sad...
still the same thing is happening retrieving all the records not department wise
I am not getting what might be the reason that Sp is working but not my code.
please help...
pinky1810
15-Nov-12 5:50am
View
Getting error :
Type of conditional expression cannot be determined because there is no implicit conversion between DBnull and long
pinky1810
15-Nov-12 5:27am
View
in my application i have four variables of type Int64
countryid, cityid,departmentid and branchid and i am assigning them the dropdoenlist selected value ,
if any of the dropdown is not selected i want to assign a null to that integer variable, how to assign DBnull.Value to integer type. please help
pinky1810
15-Nov-12 4:51am
View
Sorry, But not working It is same again. stored procedure is working fine but trough code again it is displaying all records.Is there any changes i need to make in code?.
please advice
pinky1810
15-Nov-12 4:21am
View
It is displaying all the records not performing filtration even if i change department value or branch value.
please help..
Show More