15,899,126 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 Hesha (Top 52 by date)
Hesha
14-Dec-15 3:10am
View
hi i did like that but im getting following error
?ex
{"Cross-thread operation not valid: Control 'dataGridView1' accessed from a thread other than the thread it was created on."}
Data: {System.Collections.ListDictionaryInternal}
HResult: -2146233079
HelpLink: null
InnerException: null
Message: "Cross-thread operation not valid: Control 'dataGridView1' accessed from a thread other than the thread it was created on."
Source: "System.Windows.Forms"
StackTrace: " at System.Windows.Forms.Control.get_Handle()\r\n at System.Windows.Forms.DataGridView.FlushDisplayedChanged()\r\n at System.Windows.Forms.DataGridView.PerformLayoutPrivate(Boolean useRowShortcut, Boolean computeVisibleRows, Boolean invalidInAdjustFillingColumns, Boolean repositionEditingControl)\r\n at System.Windows.Forms.DataGridView.ResetUIState(Boolean useRowShortcut, Boolean computeVisibleRows)\r\n at System.Windows.Forms.DataGridViewRowCollection.OnCollectionChanged_PreNotification(CollectionChangeAction cca, Int32 rowIndex, Int32 rowCount, DataGridViewRow& dataGridViewRow, Boolean changeIsInsertion)\r\n at System.Windows.Forms.DataGridViewRowCollection.OnCollectionChanged(CollectionChangeEventArgs e, Int32 rowIndex, Int32 rowCount, Boolean changeIsDeletion, Boolean changeIsInsertion, Boolean recreateNewRow, Point newCurrentCell)\r\n at System.Windows.Forms.DataGridViewRowCollection.ClearInternal(Boolean recreateNewRow)\r\n at System.Windows.Forms.DataGridView.RefreshCol
umnsAndRows()\r\n at System.Windows.Forms.DataGridView.OnDataSourceChanged(EventArgs e)\r\n at System.Windows.Forms.DataGridView.set_DataSource(Object value)\r\n at Exp_GFM.frmVarifyInvoices.submitdata1() in C:\\Users\\Heshan\\Documents\\Visual Studio 2015\\Projects\\Exp_GFM\\Exp_GFM\\frmVarifyInvoices.cs:line 436"
TargetSite: {IntPtr get_Handle()}
here was the code i tried
private void submitdata()
{
List<task> tasks = new List<task>();
tasks.Add(Task.Run(() => { loading(); }));
tasks.Add(Task.Run(() => { submitdata1(); }));
Task.WaitAll(tasks.ToArray());
}
Hesha
19-Nov-15 22:14pm
View
Deleted
Thanks for ur Reply VR. I got following error when i tried to go thought their API Ver.3.0
n unhandled exception of type 'System.Xml.XmlException' occurred in System.Xml.dll
Additional information: Unexpected end of file has occurred. The following elements are not closed: YOUR_ACCOUNT_ID. Line 1, position 18.
my code was similar to following
CPS_Connection cpsConnection = new CPS_Connection(
"tcps://cloud-eu-0.clusterpoint.com:9008",
"ExpGFM",
"i entered myemail",
"enterd mypassword",
"document",
"/document/id",
new Dictionary<string, string="">(){{"101882","<your_account_id>"}}
(i dnt know YOUR account id part is not displaying even if i pasted here)
);
//CPS_Simple cps = new CPS_Simple(cpsConnection);
// creating a new document
System.Xml.XmlDocument doc1 = new System.Xml.XmlDocument();
doc1.LoadXml("<document> <id>21662 <jobdate>31-10-15 <jobtypeid>Export <vehiclecode>TestCode <to>TEST <ThenTo>SLPA</ThenTo> <load_size>40HC <load_id>TESTID <jobcost>0 ");
(all the document parts are not displaying)
// Update
CPS_Simple cpssimple = new CPS_Simple(cpsConnection);
cpssimple.updateSingle("id1", doc1.DocumentElement);
}
error indicates in core.cs in following way
foreach (KeyValuePair<string, string=""> param in envelopeParams)
{
root.AppendChild(this.p_requestDom.CreateElement("cps:" + param.Key, "www.clusterpoint.com")).InnerXml = param.Value;
}
Hesha
9-Oct-15 3:31am
View
HI I tried Cluster point.I created a DB. But how could I insert and retrieve data from Cluster Point to C# desktop App and wise versa Using Cluster point?
Hesha
17-May-14 3:31am
View
thanks
Hesha
13-Feb-13 3:56am
View
i'm using MVC asp.net.
Hesha
11-Feb-13 5:05am
View
Now its ok dude. i changed controller signature para as (String "term")then its getting the j query values from the view. i dnt know how this is happening but if i change that to any other name for para it will not be working :)
Thanks a Lot dude!!!
Hesha
11-Feb-13 1:57am
View
This is the suggested function i used : but still it returning Null vale :)
<pre>
<script type="text/javascript">
source:(function (request, response ) {
$.getJSON( "/Home/AutocompleteSuggestions",{
ss: request.new1
},response);
minLength: 1,
select: function (event, ol) {
if (ol.item) {
$("#new1").val(ol.item.value);
$("form").submit();
}
}
});
});
</pre>
Hesha
11-Feb-13 1:39am
View
Thanks dude. but it also passing a Null value to controller. can you bit explain the jquery? Thanks
Hesha
8-Feb-13 3:02am
View
i just notice that the valueget from the textbox is always null.i dntknow why this is happening? controller signature is working fine.
Hesha
10-Dec-12 5:11am
View
No buddy. i think path is ok.it go thought IF condition.since i know the path i gave the path of the TXT file.i did nt used map function..sample caode i used is as follows
if there is any error please let me know. Thanks in advance!
}
sw.Close();
String path = @"C:\\Users\\Heshan\\Desktop\\TEXTFILES\\HKG- OUTBOUND " + newdate + ".TXT";
//string filepath = Server.MapPath("test.txt");
FileInfo file = new FileInfo(path);
if (file.Exists)
{
Response.ClearContent();
Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name);
Response.AddHeader("Content-Length", file.Length.ToString());
Response.ContentType = "text/plain";
//Response.TransmitFile(file.FullName); // for large file
// Or
Response.WriteFile(file.FullName); // for small file
Response.End();
}
Hesha
10-Dec-12 3:06am
View
Hm i tried it But i did nt get any response buddy. in debug no errors but did nt get the pop up.
Hesha
30-Nov-12 3:27am
View
page does not go down and focus on the raw. it is just selecting the raw.but not focus on that.i have to scroll down and see the selected raw. hm.. that would be really hazard when grid has 200 Rows minimum.
Hesha
30-Nov-12 3:22am
View
Thanks buddy ..but it did not work.1st method you mentioned i have tried it before. 2nd one also not worked for me.i have to bit changed the syntex you mentioned above.if there any other way to do it?
Hesha
19-Oct-12 5:00am
View
it is bit hard to make it as one according to situation ..buddy!
Hesha
17-Oct-12 8:38am
View
from Session variable
U_Name.Text = Session["caption"].ToString();
Hesha
16-Oct-12 10:09am
View
i used gridview templetes for some forms.but i cannot used that for all the forms.this button structure was mandatory requirement in this system.i know there should be any other method for maintain session wise modes.perhaps i may made a wrong decision to have static variables because i thought it could be does not effect as long as server creates a new instance of the object.but i wrong on that occasion.but i feel it could be done with viewstatemode.Anyway thanks for support. i
Hesha
16-Oct-12 9:46am
View
in my web forms i have 5 buttons namely ADD ,Edit , SAVE ,DELETE and PRINT. when user needs to add a new entry user should press NEW button then i change the Static Variable Mode = 1 when user Click Edit then i change the Variable Mode = 2 then in the save button if mode =1 i wrote to add entry to DB. then it is Mode = 2 then system identify it is a Edit request.but now i feel it is big mistake to use Static variables for that.now i want to remove that static variables from the system.but how could i replace that?
Hesha
16-Oct-12 9:15am
View
now i have a another doubt. because i used another Static variables for some of web forms for identify the mode of the users. example NEW and EDIT. mode = 1 then it is a new record and if mode = 2 then it is for Edit ect. ohh i guess same thing will be happening here. for that do you have any advice?how do i limit user modes to only to particular session can we used any other method?
Hesha
16-Oct-12 6:12am
View
Thanks a Lot Aarti. it worked!!! :)
Hesha
16-Oct-12 5:20am
View
hey i figured out why it was not working.because in the table that i want to copy data has char 10 for Sector While new table having varchar (10).thats why error occured. Thanks for your guidance. is there any way to convert char field to varchar with out modifying previous table when run the sub query? Thanks a Lot.
Hesha
16-Oct-12 4:19am
View
SecCode is a Foreign Key referring tbl Sector.So cannot allow Null Values to it. i just want to copy data from other table it can be Contains NULL values in the 'Sector' field and if NuLL values are found in the that table simply i want to Skip that record and add rest of records to it.
Hesha
15-Sep-12 11:54am
View
sorry..Now i updated the code above with the explanation.i set modelpopup extender to a dummy one because otherwise Image button Template of the grid view is not fired!(postback is not occurred) and set manually ajax popup to show in the Imagebtn Click event.and tried. then i realized that the gridviews selected row is returning NULL value.Then i add select command to a gridview and just Select the Gridview by Itself and then i clicked on the Imagebutton and then it get the row and recognized the modelpopup and worked.but it is not i wanted.i want users to click on that imagebtn and get the model pop up with that perticular gridview passing value( gridview should pass one of its cell value to popup panel.)passing value to the panal is ok.I did this because "this.findControl" method was not worked
Code:
extender = this.FindControl("Lbtn_cash_Shipper_ModalPopupExtender") as ModalPopupExtender;
Requirement : what i need is to transfer Gridview's particular cell value (does not need to select row but relevant row of the image button ) to popup extender Label and then show the pop up to the users.
Hesha
15-Sep-12 11:13am
View
problem is" this.findcontrol" not recognized the control in the item template model popup extender...
Hesha
15-Sep-12 11:09am
View
ohh ...no i just made some updowns to the code before copied here.but i put same extender-id in my codes. hm..after that i tried to add again a select Template field and set model pop up extender target control to a dummy control. but still not working it :(
Hesha
15-Sep-12 9:07am
View
No buddy it also not worked.dnt know why!
Hesha
15-Sep-12 7:53am
View
hm...not Working buddy! Same error! object reference is NULL!
Hesha
15-Sep-12 7:22am
View
No. i did nt used
Hesha
15-Sep-12 5:44am
View
can't help. i have to used Ajax for this project.
thanks for ur Support buddy!!!if there any way to get at least get select the row of Gridview while pop up the extender?
Hesha
15-Sep-12 5:36am
View
i figured out after adding ajax Extender it does not allowed to fire the event.
Hesha
15-Sep-12 5:20am
View
is it not firing due to the extender? if ajax extender not allowed to fire the Event of the target control?
Hesha
15-Sep-12 5:17am
View
not working here buddy.. Ajax pop is ok but template Image buttonClick is not working..event is not firing!. i just only need to set a value for a Label in the popup panal.
Hesha
15-Sep-12 5:08am
View
No..not usedupdate panal
Hesha
21-Aug-12 14:38pm
View
how? i want Explanation about how to do it?
Hesha
16-Aug-12 9:02am
View
yes.Agree.that's why i just put replace("\n", " ") so it should be replace? isn't it?
Hesha
8-Aug-12 10:35am
View
Yes.problem is TAB is move according to the Cell order of the Table.It did not going according to the TAB order of the Control.if any way to SET TAB order going according to the Controls TAB values? can i change the order of the TAB index in this table?
Hesha
14-Jul-12 3:58am
View
after adding recursive code its worked for me. anyway thanks a Lot Friends for your Support!!!!those are really valuable for me!!!
public void enableControls(Control parent)
{
foreach (Control c in parent.Controls)
{
if ((c.GetType() == typeof(TextBox)))
{
((TextBox)(c)).Enabled = true;
}
if ((c.GetType() == typeof(DropDownList)))
{
((DropDownList)(c)).Enabled = true;
}
if (c.HasControls())
{
enableControls(c);
}
}
Hesha
14-Jul-12 3:21am
View
Deleted
foreach (Control c in Page.Controls) {
}
This is not working. I used this method under Master page.i dnt know why this function did not working here.
Hesha
14-Jun-12 7:02am
View
Thanks a Lot Roman!!!
Hesha
8-Jun-12 4:24am
View
Thanks Lot VJ Reddy , HIMACHALI , Vani Kulkarni,Manas Bhardwaj For your Support!!! Again Thanks a Lot!!!
,
Hesha
30-May-12 10:55am
View
Thanks a lot Rahul!!! That's works perfectly!!!!Again Thanksa Lot!!!
Hesha
13-May-12 5:46am
View
Please provide some sort of Code or a Explanation about your matter.otherwise it is hard to provide solution for your matter.
Hesha
11-May-12 7:49am
View
Specified argument was out of the range of valid values. Parameter name: index flag = ((CheckBox)hubGridView.SelectedRow.Cells[2].Controls[0]).Checked; bbtboxoutbound.Checked = flag;
it is 0 i think
Hesha
11-May-12 7:48am
View
Deleted
Specified argument was out of the range of valid values.
Parameter name: index
flag = ((CheckBox)hubGridView.SelectedRow.Cells[2].Controls[1]).Checked;
bbtboxoutbound.Checked = flag;
Hesha
27-Apr-12 14:26pm
View
Yeah Totally unclear Question!
Hesha
27-Apr-12 13:38pm
View
Thanks a Lot Arul and Sandeep 4 ur Support!!!
Hesha
26-Apr-12 0:23am
View
Thanks a lot Mate..it worked!!! parameter datatype was the problem!!! Thanks for explanation!!!
Hesha
16-Apr-12 1:09am
View
Deleted
yes reddy what you said is correct last time i got that issue as you mentioned. i just used Array to capture above data as follows
Regex regex = new Regex(
@"\<td.*\>(?<num>.*)\<\/td\>",
RegexOptions.IgnoreCase
| RegexOptions.Multiline
| RegexOptions.IgnorePatternWhitespace
| RegexOptions.Compiled
);
//Match match = regex.Match(comp);
MatchCollection matches = regex.Matches(comp);
int i =0;
string[] arr = new string[4];
foreach (Match match in matches)
{
foreach (Capture capture in match.Captures)
{
if (i < 4)
{
arr[i] = match.Groups[1].Value;
i = i + 1;
//arr[i] = capture.Value;
}
}
}
string r = arr[0];
string r1 = arr[1];
string t = arr[2];
Array.Clear(arr, 0, arr.Length);
i = 0;
TextBox1.Text = r + Environment.NewLine + r1 + Environment.NewLine + t + Environment.NewLine;
But your mentioned method is Nicer than the method i used to get the results!!! Thanks a lot Reddy and Mehdi for your Support!!!
Hesha
15-Apr-12 12:11pm
View
Thanks a lot Mehdi!!! Now it's works perfectly.again Thanks a Lot!!!
Hesha
15-Apr-12 11:13am
View
Hey Thanks a Lot !!!that's works Nicely. But little problem i got. when code executes it return only first value and rest of values are not returned.
code i used is as follows :
{
comp = s;
}
Regex regex = new Regex(
@"\<td.*\>(?<num>.*)\<\/td\>",
RegexOptions.IgnoreCase
| RegexOptions.Multiline
| RegexOptions.IgnorePatternWhitespace
| RegexOptions.Compiled
);
Match match = regex.Match(comp);
if (match.Success)
{
string v = match.Groups[1].Value;
string r = match.Groups[2].Value;
string s = match.Groups[3].Value;
TextBox1.Text = v;
TextBox2.Text = r;
TextBox3.Text = s;
}
can you give me a suggestion for that prob.then that will be a great help for me.thanks !!!
Hesha
1-Apr-12 0:29am
View
i solve out the problem.Thanks for support Mark , Wes , shahin... i did little modification after reading your suggested pages.. Thanks guys for Support!!!
Hesha
30-Mar-12 20:48pm
View
But the problem was this method did not worked when i used it under serverside to run the javascript( in my C# class)
Hesha
30-Mar-12 11:40am
View
Deleted
I googled it. there were methods for provide c# variable values to Java scrip variables values. But no methods were found for get javascript variable values into c# variables.
Show More