15,885,278 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 BulletVictim (Top 200 by date)
BulletVictim
15-Dec-17 7:28am
View
In my experience you need to create an image object from the base64, then with a bookmark in the document place the image at said bookmark.
BulletVictim
12-Dec-17 8:12am
View
Have a look at https://www.syncfusion.com/products/windows-forms . I use this a lot especially when exporting DataTables to Excel files, really quick and no need for Office to be installed either.
.try this to compile your DataTable from the datagridview. https://stackoverflow.com/questions/6295161/how-to-build-a-datatable-from-a-datagridview.
Also from your code it seems like you are trying to set the DataSource of the GridView with the manual compiled DataTable. for that see what you get here. https://www.google.co.za/search?dcr=0&ei=ntQvWoCdF8vOa4P_n-AF&q=c%23+manually+add+row+to+datatable&oq=c%23+manually+add&gs_l=psy-ab.3.0.0j0i22i30k1.250624.254116.0.258019.12.9.0.3.3.0.300.1009.2-3j1.4.0....0...1c.1.64.psy-ab..5.7.1017...0i20i263k1.0.8BOcWLZ3adk
BulletVictim
12-Dec-17 7:58am
View
Where is your problem? Please elaborate a bit more on what you want to do.
From what I can see what you are trying to do, you might want to convert the dataTable to a List<customclass>. From there using Linq to group the items in the list based on a defining value per each level, then loop through each List<List<customclass>>.
Hope this points you in the right direction.
Also just as a tip, if looping through a DataTable, try using foreach(DataRow row in DataTable.Rows, Just a bit cleaner code.
BulletVictim
12-Dec-17 7:50am
View
Quite simple, you will need to update the Log4Net package in the previously compiled solutions that you have added to the new solution.
Alternatively just reference the Log4Net Dll from the packages location in one of the previous solutions. Might not have the Nuget functionality, but should solve your problem.
BulletVictim
31-Aug-16 8:49am
View
Are you open to Jquery to do this?
WebCodeCam-1.0.0 is a rather easy and usefull plugin that can be used to access the webcam.
Some custom js methods to capture the image to an array, Ajax call to a c# WebMethod, loop through the image byte array. Inside C# webMethod, declare system.drawing.image = byteArrayToImage(byte array). system.drawing.image.save(path). Done
BulletVictim
19-Apr-16 8:10am
View
Have you tried looping through each node in the treeview and then on that retrieve information dependant on that, then add a child node to the selected node in the loop?
Based on the Image it should be for each childNode in Database. Get the required value for each one then the active node should be SQLDb then attach child node to that node.
BulletVictim
19-Apr-16 8:03am
View
If I'm understanding your problem correctly, you need to set datagrid.autogenerateColumns = false;
Should keep it from generating the columns from the database and populate the exiting columns with the data.
BulletVictim
10-Mar-16 9:29am
View
I believe Namith Krishnan E question was more directed at if the file is open at the time that the application needs to access it, and not so much if it is a problem with the document being in the wrong format or corrupted.
BulletVictim
29-Feb-16 9:34am
View
having to lists with only one input is going to be difficult to join as there is no common field in the two lists. So at least one list will need to have more than one value contained per object.
BulletVictim
29-Feb-16 9:29am
View
try:
Declare variable x = 0;
for each the dictionary.
check if the value is bigger than x.
if bigger than x set x = value.
BulletVictim
12-Jan-16 0:53am
View
glyphicon?
<li>
<span class="glyphicon glyphicon-home"></span>User Profile
</li>
BulletVictim
12-Jan-16 0:42am
View
Set the file access on your folder to have you access everything.
If you have run the exe from the debug folder outside of visual studio this error would occur. check the task manager for your exe. Perhaps it does not end correctly.
BulletVictim
12-Jan-16 0:37am
View
Go and take a look at http://www.syncfusion.com/ fairly easy importing 3rd Party DLL for excel. If not that any way you want to then.
In Regards to using the excel sheet at runtime. Sure you can use the information on the sheet. Easiest way I have found to work with excel sheets at runtime is to use DataTables. Then working from the DataTable you can pretty much do anything with the information from the sheet.
BulletVictim
19-Oct-15 1:19am
View
What are the errors you are receiving? What have you done until now? Show us your connection string to the database?
We need these things to be able to better help you.
BulletVictim
7-Oct-15 6:55am
View
The lowest supported .net for xp sp3 is 4.0. .net also needs to be installed. I believe if you would like to run the application without the requirement of .net, then you would probably need to drop your solutions version down to 2.0 or lower.
BulletVictim
7-Oct-15 6:47am
View
It should not be that difficult. Once you have selected the textbox that needs to capture the barcode scan the barcode with the scanner. then it should pick up.
BulletVictim
2-Oct-15 5:48am
View
asp.net or forms? asp.net you can use an Iframe and set it's source to the location of the file
BulletVictim
25-Sep-15 5:53am
View
Try Copying the file from the fileupload to the server first and then try importing it, alternativley have a look at syncfusion, third party ddl's that are quite good at these kind of things.
BulletVictim
25-Sep-15 5:50am
View
Yes it is possible to do so. Firstly the connection strings would obviously need to be changed to look at the different Databases(easier way might be to code bought already but use the if(Debugger.IsAttatched) way to keep working on MS SQL DB while debugging.(using System.Diagnostics). Then Ensure that after publish the Database is also copied to the output path, then using Application.Startuppath to navigate the location of the local DB. Deploying the Local database usually requires you to mark it as a needed file for the application to install. (Scratch around a bit, I cant fully remember as to how to do this exactly. Google could help on that.)
BulletVictim
25-Sep-15 5:40am
View
Barcode scanners(in my experience) are detected as keyboard input devices. In the times that I wrote software for barcode scanners, the textbox that needed to capture the input merely needed to be the active selection(There are alot of ways to accomplish this).
Hope this helps
BulletVictim
25-Sep-15 5:35am
View
Assuming you are using winforms application, it sounds like the file is not publishing with the rest of the application.
If the file is imported to the solution, In Solution Explorer right click the file go to properties. Second Option should be Copy to Output Directory. By default it is "Do not copy", try changing that to "Copy always" and see if that hepls.
BulletVictim
22-Sep-15 7:39am
View
try this:
var marker;
var map;
geocoder.geocode({ 'address': latlng }, function (results, status) {
marker.setMap(null);
if (status == google.maps.GeocoderStatus.OK) {
map.setCenter(results[0].geometry.location);
marker = new google.maps.Marker({
map: map,
position: results[0].geometry.location
});
Also noticed that there are now location settings sent to the methods.
BulletVictim
22-Sep-15 7:28am
View
foreach(ListItem item in CheckBoxList1.SelectedValue.ToString()) should that not be foreach(ListItem item in CheckBoxList1.Items)
BulletVictim
14-Apr-15 4:41am
View
Try ading the csv data to a DataTable in your code and the BulkCopy the datatadble into SQL
BulletVictim
14-Apr-15 4:07am
View
After selecting the Item in code use the DropDownlist_SelectedIndexChanged(object sender,EventArgs e). This will fire the Dropdownlists index chnaged event.
If you need more specific help, please show us your relevant code.
BulletVictim
14-Apr-15 3:37am
View
This will work fine. You can also use your original code with the alteration of removing the "r" at the end of IExplore"r".
BulletVictim
13-Apr-15 1:51am
View
What is the problem?
We cannot help you if we do not know what you are struggling with?
With regards to the query executing in the background, I'm Assuming it might cause the application to lock up for a bit? Try using threading for this,(will help with the application locking up during the execution of the query).
BulletVictim
10-Apr-15 5:30am
View
Please Do not post all your code, Please only post the code relative to your problem
BulletVictim
9-Apr-15 2:27am
View
Have you thought about multithreading the check on the server?
BulletVictim
9-Apr-15 2:22am
View
Of the top of my head. Looping through the directory location where the files are located, adding each files path to an array, then looping through the array with a for (int i = 0; i < 10000; i++) add the files to the zip file.
BulletVictim
9-Apr-15 2:16am
View
Try looking at this http://www.codeproject.com/Tips/477436/Export-Gridview-Data-to-Excel-in-ASP-NET
What it basically does is, it takes the data of the gridview, places it in a dataset and then from there exports the dataset to excel.
For possible misunderstanding the question. Here is exapmles of where the excel file's data is displayed in a gridview.
http://stackoverflow.com/questions/7315782/display-excel-file-content-in-a-datagridview
and
http://stackoverflow.com/questions/17568604/import-excel-data-to-datagridview-in-visual-studio-2010.
Hope this helps
BulletVictim
9-Apr-15 1:57am
View
It depends on where you need to get the top Identity column value. In SQL it is usually more accurate to use @@IDENTITY when you require the Identity column value of a newly inserted value in the table to be used later on in the same stored procedure.
Using max(identity column) usually works better when you require the value of pre-existing records in the table before an insert can happen.
Both works the same at the end of the day, it all comes down your preference
BulletVictim
23-Feb-15 2:31am
View
Thanks for the hint but that code only helps me to get the local IP address of the machine running the code. Which would be fine if I could install the application on all the computers accessing the server, but unfortunately with it being an ever changing number of users that get and lose access to the files, this way would not really help. The intended code should only be run on the server.
BulletVictim
23-Feb-15 2:28am
View
I went ahead and included a packet sniffer to extract the IP address of the remote computer in the IP header of the Packet and this does display. Now I just need to get it a bit more precise by determining what packet is being used for the file being modified, So I need to compare the packet data to the file...Since I already have the file name that is being altered, It should not be too long of a compare to run on the packets being transferred at the time of the file being edited. Any Ideas or links that could point me in the right direction?
BulletVictim
17-Feb-15 2:04am
View
Shouldn't there be some way? Doesn't windows check for those details in the packet transfers for authentication? If not for the IP Address, at the very least for windows username and access rights to the shared file?
BulletVictim
13-Jan-15 1:51am
View
As far as I know this cannot be set from server side to specify on the client side, this is mostly to do with security restrictions from the browsers.
To specify the path of where the file downloads is settings mostly on the client's browser that needs to be changed. With chrome you can specify that it asks you where to download the file to each time it downloads something, IE you have the option to save as.
This is similar to launching an application from the server on the client station (although with ActiveX object you can do this, but only in IE). It is a major security risk to allow client stations to be accessed from the server via code.
Best suggestion would be to have the client save the files to the desired location manually.
BulletVictim
13-Jan-15 1:29am
View
Try it like this maybe. =iif(Parameters!is_arabic.Value = "true","Right","Left").
I have Tested it with one of my reports as follows : =iif(Parameters!CASENO.Value = "MRI-000000479","Right","Left") This does work on my report.
Document Here: https://www.dropbox.com/s/dc5xt4xjdaafjun/Align%20Text%20Right.docx?dl=0
BulletVictim
5-Aug-14 4:59am
View
basically it is
IF EXISTS(select TEST from TESTERS where TEST = 1)
begin
'do some things'
end
else
begin
'do some other things'
end
BulletVictim
5-Aug-14 4:25am
View
Try adding __doPostBack('btnSave', 'btnSave_Click'); at the end of function CompareDate().
This will trigger a postback on the page executing the server side code on the button_click event
BulletVictim
5-Aug-14 4:14am
View
Have you taken a look here
http://bytes.com/topic/visual-basic-net/answers/643043-change-existing-element-xml-file
http://bytes.com/topic/visual-basic-net/answers/374533-modify-value-into-xml-file
BulletVictim
5-Aug-14 3:01am
View
You have posted basically the same question three times in the past two hours and just phrasing it differently. Return to the original question and wait for an answer to the question you have posted. Do not repeat your questions as people will be less willing to help you if you are not reviewing the answers to your questions.
http://www.codeproject.com/Questions/804047/I-Importing-Excel-Data-In-Gridview-Further-I-Want?arn=20
http://www.codeproject.com/Questions/804077/I-Importing-Excel-Data-In-Gridview-Further-I-Want?arn=15
BulletVictim
5-Aug-14 2:42am
View
OpenFileDialog?
BulletVictim
5-Aug-14 2:36am
View
Why not do an IF EXISTS with the sql commands?
or just do an IF exists in a database stored procedure to return a true or false value if it exists or not and then using that result to manage the if in your code behind?
BulletVictim
5-Aug-14 1:32am
View
Fast but dirty I would say pass it along in the url.
response.redirect("www.mysite.com/mypage.aspx?VALUE1="+gridview selected row cell 1 value"+&VALUE2="gridview selected row cell 2 value"
then on the new page retrieve the data using request.querystring("VALUE1") and set it to a variable on the page( string value1 = request.QueryString("VALUE1"); int value2 = request.QueryString("VALUE2") )
BulletVictim
5-Aug-14 1:20am
View
http://forums.asp.net/t/1216048.aspx?Popup+window+with+no+title+bar
BulletVictim
4-Aug-14 6:11am
View
http://stackoverflow.com/questions/10247050/sql-server-convert-varchar-to-datetime
BulletVictim
4-Aug-14 4:41am
View
Have you tried using it as follows?
=IIf(First(Fields!company_name.Value, "DataSet1").ToString().Trim().Contains("C.N"), Logo_CNV,Logo_Palani)
BulletVictim
4-Aug-14 1:53am
View
Is what environment is this forms, asp.net,etc...
It mostly sounds like a header autosize to content problem.
In forms it would be the AutoSizeColumnsMode property that can be set to AllCells that should help or am I understanding the question incorrectly.
BulletVictim
4-Aug-14 1:43am
View
As far as I know It is not an issue with stored procedures. This would mainly happen because in your c# code when the textbox's text is empty it is not handled as a "null" value when it is passed to the stored procedure rather (and you would have noticed in debugging) it is handled as "" or sometimes " ". Someone a lot smarter than me will be able to explain to you why this is happens.
I have however made it standard practice when passing a textbox's text to the database to pass it as textbox1.text.trim() to ensure that there are no empty spaces at the start or end of the text, this also eliminates accidental "enter" presses at the end of text in multiline textboxes.
An alternative to the SQL code in my previous comment would be.
declare @TEXT varchar(255) = null
This helps to always make it a true null value if no value has been given to it. But try it in your environment and see if it works for you.
BulletVictim
1-Aug-14 0:45am
View
IF @TEXT = ''
begin
set @TEXT = NULL
end
INSERT INTO TABLE(TEXT)
values(@TEXT)
or you could just do a check on the c# code
if (textbox1.text.trim() == "" || textbox1.text == string.Empty)
{
textbox1.text = "NULL";
}
call stored procedure here
textbox1.text = "";
Also if you would like to do the check in SQL please remember to pass the textbox.text.trim() value into the stored procedure as to avoid the problem occurring if a the spacebar was pressed within the textbox and no other text was entered
BulletVictim
25-Jul-14 0:32am
View
Do you receive the strings with the dots in them? or do you need to generate them?
BulletVictim
12-Jun-14 9:19am
View
What ios this for? WinForms, asp.net, etc...?
On winforms I used the following and it worked fine.
DGVSalesDetails.Rows[1].DefaultCellStyle.Font = new Font("Arial", 10, FontStyle.Bold);
BulletVictim
9-Jun-14 11:27am
View
http://stackoverflow.com/questions/2647/how-do-i-split-a-string-so-i-can-access-item-x
BulletVictim
5-Jun-14 2:28am
View
The reason I add it as a comment is because it might not be the correct answer for the scenario that was stated in the question(as most of the questions on the site is asked by people who's first language is not english and the context of the question is not always clear). If this solution is confirmed by the Raj then I will post it as a solution and it can then be marked as by Raj as the correct answer. Also allowing the question to remain "unanswered" it allows more people to contribute to finding the correct answer and solving the question correctly with multiple options, this also allows people who are experiencing similar problems to find the best solution for their scenario(it might be contained in one of the answers) as it will be faster to search for the correct solution than having to ask the same question over and over(as a lot of people asking for help on the site have already tried searching and could not find the solution for their scenario). Where as if it is marked as having a answer most people will over look it.
And I'm not concerned with rep points, as long as the correct answer is found for the problem.
BulletVictim
5-Jun-14 1:29am
View
Seems pretty straight forward. It will require two selects from the database though. First of all select you select back only the column with the ID's(21,34,12) as a string value. Then feed that string value into an Array. Then within a for each on the array you select back the description(Food,Fuel,Education) for the ID and build up a different string value using the result of the select.
Below is an example of how I did this:
shared.CALENDAR_APPOINTMENT_USERS_SEL(e.Appointment.ID, Users);
userArray = Strings.Split(Users, ",");
foreach (void Item_loopVariable in userArray) {
Item = Item_loopVariable;
string emailAddress = string.Empty;
shared.CALENDAR_USER_EMAIL_SEL(Item, emailAddress);
message.To.Add(new MailAddress(emailAddress));
UsersList += Item;
}
with shared being a reference to the class Library I use to connect to my stored procedures, Users being the the first string variable getting its value from an output parameter in my stored procedure, emailAddress also getting its value from an output parameter in my second stored procedure and UserList being the final string variable that will be used to display the desired result.
Please ask if there is something about this you do not understand
BulletVictim
4-Jun-14 1:18am
View
Assuming by "I don't have any table relations." you are referring to not having PK and FK on the tables?
Is there any column in the two tables that have the same value(ID's, ID NUMBER,REFERENCE NUMBER,etc(not knowing what type of data you have)) that can be used as a link between the two tables?
BulletVictim
12-May-14 2:56am
View
if (checkbox.ckecked)
{
variable = value
}
or
variable = checkbox.Text
personally I prefer the first option
BulletVictim
23-Apr-14 2:48am
View
Deleted
What I meant by check was that the application will be referencing the database on every key press. Yes it might not be a very data intense select that is being done, but lets say you have a slow connection to the database. Every time you press a key you will need to wait for the database to return a result. Also since the application is using a textbox to output the number. what happens when you press (for instance) 'm' now assuming not every name in the application starts with a unique letter, there will be multiple numbers brought back for the first letter(and yes the more you type the less the results will be to narrow it down to just one number but until then that is a potential bug that could cause problems).
BulletVictim
22-Apr-14 9:50am
View
Try doing that on the textbox leave event or you will be doing multiple checks for every key press in the textbox otherwise you might need to use a drop down list.
BulletVictim
11-Apr-14 7:12am
View
This only happends on other computers where the .exe is being installed and not if installed on the development computer?
If that is the case then it is the administrative rights on the "client computer" that does not allow the database to be modified by a non administrator user.
Oh and it might also be that the database file is set to read only.
BulletVictim
11-Apr-14 7:05am
View
Finally
{
if(Module1.con.State > 0)
{
Module1.Con.Close()
}
}
Next time try to format your code correctly so that we can read it easier, and try to give some kind of explanation as to what your problem is. And what is happening when you get the problem
BulletVictim
24-Mar-14 5:41am
View
Ok like I said(as far as my knowledge goes) the excel file needs the same column headers as the target sql table. So for adding the extra values I would suggest leaving does out until the excel has been added and then adding them in afterwards, or alternatively you could alter the excel document and add these extra values to it before adding the excel to sql.
I extracted some bulk copy code from one of my asp sites for you to look at and maybe it helps you spot something that you missed in your bulk copy attempt.
https://www.dropbox.com/s/rqf1qk2o912rjki/BULK%20EXCEL%20INSERT.docx
BulletVictim
24-Mar-14 5:21am
View
Just from the error "Column 'POL' does not belong to table ." I would say it is because the table you are trying to insert into does not have this column. When inserting into sql from excel the target table and the excel file needs to have the same columns declared.
Also have you tried using Bulk copy instead?
BulletVictim
19-Mar-14 1:25am
View
dgvDrug.Rows(e.CommandArgument).Cells(n).Text
BulletVictim
5-Mar-14 8:35am
View
try two ' around the @fin_year
(''+@fin_year+''))
BulletVictim
3-Mar-14 0:11am
View
Deleted
On this there is two possible options:
1. You could use key press validation on the textbox like
public static bool ValidateInput(KeyPressEventArgs e)
{
//Get character value of keys pressed
//If value set to true character will not be allowed in the textbox
bool blDiscardUserInput = true;
// A-Z
if (e.KeyChar >= 60 && e.KeyChar <= 90)
blDiscardUserInput = false;
// < >
if (e.KeyChar == 60 || e.KeyChar == 62)
blDiscardUserInput = true;
// a-z
if (e.KeyChar >= 97 && e.KeyChar <= 122)
blDiscardUserInput = false;
// 0-9
if (e.KeyChar >= 48 && e.KeyChar <= 57)
blDiscardUserInput = false;
// Backspace
if (e.KeyChar == 8)
blDiscardUserInput = false;
// Comma
if (e.KeyChar == 44)
blDiscardUserInput = false;
// Single Quote
if (e.KeyChar == 39)
blDiscardUserInput = true;
// Space
if (e.KeyChar == 32)
blDiscardUserInput = false;
// Hyphen
if (e.KeyChar == 45)
blDiscardUserInput = false;
// Dot
if (e.KeyChar == 46)
blDiscardUserInput = false;
// Enter
if (e.KeyChar == 13)
blDiscardUserInput = false;
// !()#%_+:?`[]/*
if (e.KeyChar == 33 || e.KeyChar == 40 || e.KeyChar == 41 || e.KeyChar == 35 || e.KeyChar == 37 || e.KeyChar == 43 || e.KeyChar == 95 || e.KeyChar == 58 || e.KeyChar == 63 || e.KeyChar == 96 || e.KeyChar == 91 || e.KeyChar == 93 || e.KeyChar == 146 || e.KeyChar == 47 || e.KeyChar == 42)
blDiscardUserInput = false;
if (e.KeyChar == (char)Keys.Space)
{
blDiscardUserInput = true;
}
return blDiscardUserInput;
2.when passing the value of the textbox you could use any of the trim options
option 1 will disable all inputs of the characters that you select, Option 2 using trimstart will remove all whitespaces at the start of the text where as Trim will remove all whitespaces at the start and end of the text.
If this does not help you might need to explain your problem a bit more
BulletVictim
24-Feb-14 8:57am
View
Concat the columns in the select from the database
SELECT name +' ' +roll AS COL1, etc...
FROM TABLE
WHERE condition
BulletVictim
24-Feb-14 8:53am
View
What have you tried?
BulletVictim
24-Feb-14 2:34am
View
Deleted
Take a look here
http://stackoverflow.com/questions/3879710/c-sharp-adding-a-chracter-in-a-string
BulletVictim
21-Feb-14 1:42am
View
Are you using a OpenFileDialog or is this directory hard coded to the file path? We Will need a bit more information to be able to help you properly also Is this a asp.net, winforms, wpf, etc application?
BulletVictim
20-Feb-14 2:00am
View
Take a look here It might help
http://msdn.microsoft.com/en-us/library/aa969773(v=vs.110).aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1
http://stackoverflow.com/questions/19575015/how-to-create-a-find-replace-dialog-box-in-mdi-text-editor-using-c
BulletVictim
20-Feb-14 1:45am
View
@KUMAR
I updated the solution to contain the sfd.Filter settings.
Hope this works better for you.
BulletVictim
17-Feb-14 0:25am
View
What have you tried?
BulletVictim
7-Feb-14 7:46am
View
This is just me thinking out loud but you are referencing txtalbum in you code behind but in the design you use TextBox2
BulletVictim
30-Jan-14 2:37am
View
A bit of a description of what is going on here?
BulletVictim
28-Jan-14 8:25am
View
From just reading the error it seems that the problem is within your data itself, where you have either specified a duplicate entry in a column that has no duplicates specified, left a row blank where there is a no nulls constraint, or the foreign key cannot reference the source(i.e there might be data missing on one of the fields where the foreign key gets its value).
Might not be that at all, but it's the first thing I would look at
BulletVictim
23-Jan-14 5:13am
View
Take a look here:
http://stackoverflow.com/questions/3779729/how-i-can-show-the-sum-of-in-a-datagridview-column
Then to check whether the sum = 100 or not simply just use the same int that is printed to the label
BulletVictim
21-Jan-14 7:29am
View
thanks for the reply. I have found some ways to do this on the my local pc with System.Diagnostics.Process.Start("C:\Program Files\Internet Explorer\iexplore.exe", "http://server/reports")
but rendering it from the server to the client side is the problem
BulletVictim
20-Jan-14 4:06am
View
@Aravindba your idea seems good just one problem(I'm assuming the user rights you are asking about would be in the database) would you not already need to make the connection to the specific database in order to find that information or are you referring to windows authentications?
@Tilak Have you thought of maybe writing the database connection strings for each application into the registry of the computer that it is installed on? That way on each installation you would just need set the path to the database once and on each connection that you make in the application you refer back to the registry.
Just a thought
Also just to verify, the clients you refer to are in different "companies" or is it just different terminals that will be using the application?
Why I ask this is because if they are different "companies" will they always have access to the server database or will the database be hosted on their own servers?
If it is on their own servers then you will have to change your connection string for each deployment of a new "company" (then writing the connection to the registry might be the best practice(instead of publishing new versions for each client) for something like this you would want to keep your solution as generic as possible especially when it comes to updates for the application)
A personal note, It might not be the best practice to have the databases run on local machines(unless there is only one machine that will be using the application)
BulletVictim
20-Jan-14 3:05am
View
Have a look here
http://stackoverflow.com/questions/3059044/google-maps-js-api-v3-simple-multiple-marker-example
seems to be the same as what you are looking for
BulletVictim
20-Jan-14 1:06am
View
Have you tried doing it like this:
<script language="Javascript">
function country() {
var country = "HI";
document.getElementById(inpHide).value = country;
}
</script>
BulletVictim
31-Dec-13 1:01am
View
Have a look at this.
<pre lang="c#">List<string> contents = new List<string>();
foreach (string cont in contents)
{
foreach(Control ctrl in this.Controls)
{
if(ctrl.Name != "")
{
if(ctrl.Name == "TextBoxNotToClear")
{
//Some Code
}
else if(ctrl.Name.Contains("TextBox")
{
TextBox tb = ctrl as TextBox;
if (tb != null)
{
tb.Clear();
}
else
{
ClearTextBoxes(ctrl.Controls);
}
}
}
}
}
</pre>
Might give you some ideas as to exactly how to get it done.
BulletVictim
23-Dec-13 7:58am
View
Try taking a look here:
http://stackoverflow.com/questions/1706454/c-multiline-text-in-datagridview-control
BulletVictim
23-Dec-13 7:29am
View
Deleted
Have you tried something like this?
dgvhadiths.AutoResizeColumn(0,DataGridViewAutoSizeColumnMode.ColumnHeader);
BulletVictim
6-Dec-13 3:01am
View
Have you tried declaring the @p_Date_From and @p_Date_To without the NULL?
BulletVictim
6-Dec-13 2:41am
View
Ok this is just me assuming that you made a mistake here:
@p_Date_From = N'01/01/2013',
@p_Date_To = N'01/01/2014'
Is the "N" supposed to be there?
BulletVictim
6-Dec-13 1:56am
View
Ganesh Raja's solution should work for you
BulletVictim
6-Dec-13 1:32am
View
That should be(this is taken from my sql IF statements formatting)
IF @p_Date_From is not null
BEGIN
@query = @query + ' And T_ANALYSER_RESULTS.ResultDate >' + @p_Date_From
END
BulletVictim
5-Dec-13 9:12am
View
A date time picker has the value set to the current date by default when run.
You could just in the button click event set the dateTimePicker.Text = System.DateTime.Now.ToString(), That said it also depends on what value you pass to the DateTimePicker on the form_load(). Then that value you could just use to reset the value on the button click event
BulletVictim
5-Dec-13 7:08am
View
Have you taken a look at NSIS as an installation system?
Does it need to be Visual C++2008? can your application run with newer versions?
BulletVictim
4-Dec-13 23:58pm
View
Depending on what type of service your using for your telephones and how comfortable you are with Linux based configurations, you can use Freeswitch, it has its own built in recordings.
BulletVictim
29-Nov-13 5:02am
View
DataGridView.SelectionMode = DataGridViewSelectionMode.FullColumnSelect;
Then display the image in the DataGridView_CellClick() Event.
If you could tell us more about how you want to display the image and what type of project(i.e winforms,asp.net,etc) we will be able to help you beter
BulletVictim
28-Nov-13 5:15am
View
What exactly do you not understand in this code?
BulletVictim
28-Nov-13 1:50am
View
Could you also post your c# code when you want update?
BulletVictim
28-Nov-13 0:28am
View
This might help you in the right direction
http://stackoverflow.com/questions/8156616/how-to-create-excel-file-with-multiple-sheets-from-dataset-using-c-sharp
BulletVictim
27-Nov-13 2:35am
View
The easiest way to change the column order I know of would be to change it in the SQL select statement that you use.
Combining the to columns would be something like select Col1 + Col2 AS ColCombine.
BulletVictim
12-Nov-13 4:17am
View
This does not physically open the word application on the server. This just opens the process in the task manager and should close it in the task manager again. The documents being created are templates that are being populated at run time. so no interaction is needed from a user.
Please could you remove this answer, so that this question could go back into the unanswered list.
BulletVictim
8-Nov-13 8:50am
View
have you tried comboBox.ResetText()?
or else you can just setting the value to a null value before setting any values further down the way with each time the SelectedIndexChanged is called
BulletVictim
6-Nov-13 8:58am
View
Just have to ask to make sure. Have you installed all the same prerequisites that you had on the previous system?
BulletVictim
5-Nov-13 1:33am
View
That would be a simple UPDATE Table SET ColumnValue = value WHERE Primary key = some value
BulletVictim
5-Nov-13 1:19am
View
I used the following with my access database project. This just makes a copy of the database in the desired location and the on the restore it overwrites the current database being used.
private void btnBackup_Click(object sender, EventArgs e)
{
try
{
string CurrentDatabasepath = Environment.CurrentDirectory + @"\Database.accdb";
FolderBrowserDialog fbd = new FolderBrowserDialog();
if (fbd.ShowDialog() == DialogResult.OK)
{
string PathToBackup = fbd.SelectedPath.ToString();
File.Copy(CurrentDatabasepath, PathToBackup + @"\Database.accdb", true);
MessageBox.Show("Backup Successfull");
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
private void btnRestore_Click(object sender, EventArgs e)
{
try
{
string PathToRestoreDB = Environment.CurrentDirectory + @"\Database.accdb";
OpenFileDialog ofd = new OpenFileDialog();
if (ofd.ShowDialog() == DialogResult.OK)
{
string FileToRestore = ofd.FileName;
File.Move(PathToRestoreDB, PathToRestoreDB);
File.Copy(FileToRestore, PathToRestoreDB, true);
MessageBox.Show("Database Has Been Restored");
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
I hope this helps point you in a direction. If you find a better method than this please let me know?
BulletVictim
5-Nov-13 0:51am
View
SqlDataAdapter adpi = new SqlDataAdapter("Select distinct User_Name from Login_Table Where User_Type='" + Usertype_CMBox.SelectedItem.ToString() + "'", con);
Should fix the problem you have
BulletVictim
5-Nov-13 0:45am
View
Have you taken a look at these atricals?
http://www.codeproject.com/Articles/2006/Drag-and-Drop-between-list-boxes-Beginner-s-Tutori
http://www.codeproject.com/Articles/36412/Drag-and-Drop-ListBox
BulletVictim
5-Nov-13 0:42am
View
How are you linking the database to the project or how are you connecting to the database?
BulletVictim
30-Oct-13 4:13am
View
Post your App.Config where you declare "ConnectionStrings"
BulletVictim
30-Oct-13 4:12am
View
OriginalGriff you are correct the most likely problem is with his App.config (rather than web.config since this is a windows forms application).
BulletVictim
30-Oct-13 3:56am
View
What exactly is your problem?
From your current question I would say it is a standard SQL statement that needs tor be passed to the database.
Also just a note: only post the code in which you have the problem.
BulletVictim
30-Oct-13 3:45am
View
Have you tried comboBox1.AutoCompleteMode = AutoCompleteMode.Suggest
comboBox1.AutoCompleteSource = AutoCompleteSource.ListItems ?
BulletVictim
29-Oct-13 8:32am
View
Try using it with updating the database table(checkedOUT column) when the row is clicked, then checking what the column value is when the row is clicked then based on that display the popup.
BulletVictim
28-Oct-13 2:21am
View
What code have you done for this so far?
You will need to use some kind of a loop then.
Thinking out loud, a foreach loop then running an update command to the database for each dataRow
BulletVictim
28-Oct-13 2:03am
View
WHERE [Column] ='" + dataGridView1.SelectedRows[0].Cells[0].Value.ToString() + "'";
Something like that?
BulletVictim
28-Oct-13 2:02am
View
Ok in order for you to do the update you will need to leave at least one unique field that can not be updated, Also since you want to update from a dataGridView take a look at something like dataGridView1.SelectedRows[0].Cells[0].Value.Tostring()
Otherwise show some of the code you have done so far.
BulletVictim
28-Oct-13 1:52am
View
Assuming you will be using a textbox to enter the strings, On the textChanged event of the textbox do a within a if combobox.value ==, if contains for each character entered into the textbox and then set the textbox value to that of the textbox value.Replace().
Hope that helps you get in the right direction.
Any more help you will need to show your code of what you have done
BulletVictim
28-Oct-13 1:41am
View
Deleted
Alright I will remove my question then to allow this to go back into the unanswered pool then. Sorry it did not work for you.
BulletVictim
7-Oct-13 10:32am
View
Something like this?
string a = TEXTBOX1.TEXT;
string b = TEXTBOX2.TEXT;
if(60 > Int32.Parse(a))
{
TEXTBOX3.TEXT = (Int32.Parse(a) + Int32.Parse(b)).ToString();
}
else
{
TEXTBOX3.TEXT = (Int32.Parse(a) * Int32.Parse(b)).ToString();
}
BulletVictim
7-Oct-13 9:53am
View
Try taking a look here
http://stackoverflow.com/questions/17788368/combobox-item-filled-from-2-columns-insert-into-sqlcommand-only-one-column-sel
or here
http://stackoverflow.com/questions/17538323/how-to-display-two-different-columns-in-one-combobox
BulletVictim
7-Oct-13 8:58am
View
Please rephrase your question. It is very unclear as to what you are wanting to do?
BulletVictim
7-Oct-13 8:39am
View
Please Remove this solution as it is not correct pertaining to Surendra's question so that it can be added back to the unanswered questions to help him resolve this issue
BulletVictim
7-Oct-13 7:50am
View
Then I am sorry I do not know how to take this any further at the moment. especially with a datagrid, not with boundcolumns at least.
Remove the Solution at the bottom here that is not correct so that your question can go back on the unanswered list, perhaps someone else will be able to help you better than I could.
Best of luck
BulletVictim
7-Oct-13 7:26am
View
Are you using the boundcolumn for all the columns or just the controls that are to the left?
Because you can use both bound column and generated columns as far as I know.
So why not use both?
BulletVictim
7-Oct-13 6:44am
View
On load set the selected value of the dropdownlist to System.DateTime.Now."Your selection of each dropdownlist"
But as Richard suggested, try using a calander Control, should work a lot easier and have less checks you will need to run to validate the correct date
BulletVictim
7-Oct-13 6:37am
View
Currently how do the user select the columns to display? Is it with checkboxes or comboboxes?
I'm thinking use comboboxes in a set order, listing all the columns that could be displayed.
Then use your select statement with the comboboxes selected item.
For instance. Have the comboboxes populated with column 1 until column x
Have a combobox for each column.
Your select statement is then something like, select combobox1.seleectedItem.Tostring(), combobox2.seleectedItem.Tostring() FROM Table
BulletVictim
7-Oct-13 6:36am
View
Deleted
Currently how do the user select the columns to display? Is it with checkboxes or comboboxes?
I'm thinking use comboboxes in a set order, listing all the columns that could be displayed.
Then use your select statement with the comboboxes selected item.
For instance. Have the comboboxes populated with column 1 until column x
Have a combobox for each column.
Your select statement is then something like, select combobox1.seleectedItem.Tostring(), combobox2.seleectedItem.Tostring() FROM Table
BulletVictim
7-Oct-13 5:55am
View
Do you currently have any type of way for the user to select in which order they want it?
Because you say you cant set autogeneratecolumns to true, I keep on thinking that you will need to look at the select statement. Now that being said, with the ordering from the user in place perhaps using that order to write the select statement?
BulletVictim
7-Oct-13 5:39am
View
try this one.
SELECT
[PM.ProductName], [SUM(IM.Qyt)], [BM.Date] FROM
[ProductMaster] AS PM
INNER JOIN
[InvoiceMaster] AS IM
ON
[PM.ID] = [IM.Productid]
INNER JOIN
[BillMaster] AS BM
ON
[IM.Invoiceno] = [BM.Invoiceno]
WHERE [BM.Date] Between [Date1] and [Date2]
BulletVictim
7-Oct-13 5:21am
View
Have you taken a look here? It looks like what you are looking for
http://stackoverflow.com/questions/4665045/how-to-get-the-word-under-the-cursor-in-windows
BulletVictim
7-Oct-13 5:12am
View
Could you post your join queries?
BulletVictim
7-Oct-13 5:08am
View
Where would you like to change the order of the columns? On run time with drag and drop? or just the initial order when it is populated?
Are you selecting the data for the datagrid from a database? Assuming you do you could just change the select statement.
BulletVictim
2-Oct-13 5:49am
View
Easy but not always effective way is to extend your Report area lager than the page sizes.
That usually pulls the table over to the next page. Headers and other objects on the page might not duplicate to the second page though.
BulletVictim
30-Sep-13 1:14am
View
Using a field in the database which takes the value you would like to show when a node is checked or unchecked. In the Treeview AfterCheck event update the database based on if node checked = true or false.
BulletVictim
26-Sep-13 2:25am
View
Why set the AutoGenerateColumn=False?
I run it with AutoGenerateColumn=True and it works fine for me.
Is there some long term problem with running it like that?
BulletVictim
26-Sep-13 1:18am
View
Have you taken a look at google maps api in winforms?
This link should help
http://stackoverflow.com/questions/1199973/invoke-google-maps-api-v3-javascript-api-from-windows-forms-app
BulletVictim
19-Sep-13 6:43am
View
https://www.google.co.za/?gws_rd=cr&ei=HdU6Uun5GMbCtQatqYDADg#q=c%23%20excel%20oledb%20connection%20string
BulletVictim
17-Sep-13 9:07am
View
Thank you for your answer.
I found the problem. The guy who published the web application forgot to remove all the other pages in the default document feature on iis except for the default.aspx page.
BulletVictim
17-Sep-13 2:13am
View
No problem. Its not the best option to do it I know, but it has worked for me on occasion when I could not sort my data differently from sql because the SP was used else where with different sorting. I just mentioned it as a last resort basically.
BulletVictim
17-Sep-13 2:07am
View
What exactly is the problem here? Are you not able to reference "checkboxHeader" in "DGVSalesDetails_CurrentCellDirtyStateChanged"? or what? Because looking at your code that is the first problem I could see that you might have
BulletVictim
17-Sep-13 1:45am
View
Like I said. NOT SO COMMONLY USED, and DEPENDS ON IF HE IS USING IT
BulletVictim
16-Sep-13 8:59am
View
Another yet not so commonly used way is using a datagridview(depends on if he is using it). Select the csv data into the datagridview and then sort the datagridview
BulletVictim
16-Sep-13 8:55am
View
The select You want is rather Easy.
SELECT COUNT(tableX.value) AS Count,(COUNT(tableX.value)/x) AS Calculation FROM tableX
This will bring the values back in one select output
The rest of the SP you can do yourself
BulletVictim
16-Sep-13 7:23am
View
Ghalib we cannot give you a full tutorial here, This site is to help with code problems, and not to give you complete answers on how to write your program.
Try to google it and I am sure you will find something that is similar to what you are looking for. Also try searching the Articles here on code project.
BulletVictim
16-Sep-13 7:18am
View
Ok from what I can gather from your question this might help you.
Try using a string and set it to openfiledialog.Filename and then insert the string value into the database.
This passes the entire file name including the extension(in your case .jpg/.png) to the string.
Play around with openfiledialog's methods and I'm sure you will find what you need if this does not help
BulletVictim
16-Sep-13 6:59am
View
You are looking for a connection string like this one:
connectionstring="Data Source=LOCUSC-PC;Initial Catalog=NewData;Persist Security Info=True;User ID=[database user];Password=[database user password]"/>
BulletVictim
16-Sep-13 4:47am
View
Try
float.Parse(TextBox1.Text, CultureInfo.InvariantCulture.NumberFormat);
or try using Double if you can
BulletVictim
16-Sep-13 4:32am
View
Create a single user on the database and then do not use Integrated security as all the users at the pc's where you want to run the app will need log in credentials for the sql server.
BulletVictim
16-Sep-13 4:30am
View
A few things you might just want to check. Assuming you are using SQL Database, Check that all the computers you want to deploy the application to can access the database server. Also since you are using Integrated security you will need to check if all the users(windows log in credential) have log in credentials on SQL server.
Personally I would not use integrated security especially when deploying it on multiple machine, It makes managing the SQL server log in credential a constant task and having to assign specific security rights for each user. I would suggest creating one user for the log in on SQL and then use those credentials in your connection string.
BulletVictim
16-Sep-13 4:18am
View
Thank you. I have asked around the office as well but since we don't really work with access databases no one could think of a reason why this would happen. But what you said makes sense.
Thanks Tadit
BulletVictim
13-Sep-13 6:05am
View
Honestly I don't know why exactly this happens. Seen it Happen while I was still doing my studies and from there on when I use Access writing it like this has become standard practice for me and never really gave it much thought as to why it happens.
BulletVictim
13-Sep-13 5:55am
View
Try writing your insert statement like this:
"Insert into [Product_Information]([PCId],[ImagePath],[Names],[Code]) values('" + pcid + "','" + uploadPath + "','" + txtImageName.Text + "','" + txtImageCode.Text + "') ";
I know the [ ] are not required, but I have seen it solve this issue before.
BulletVictim
13-Sep-13 3:36am
View
Please show your code for button that you use to add the "template" to the combobox?
BulletVictim
11-Sep-13 10:27am
View
Honestly some advise since you are still a student, try to refrain from using the GUI option in data control as much as possible
BulletVictim
11-Sep-13 10:20am
View
Most simplistic way I know of is: After you have added data to the database clear the items in the combobox and then run the bind again.
But as norbitrial said. We will need to see the code that is related to your problem.
BulletVictim
29-Aug-13 9:04am
View
You could use .NET Reflector http://www.red-gate.com/products/dotnet-development/reflector or dotpeek http://www.jetbrains.com/decompiler to decompile the application if you do not have the source code. This will only work if the application is compiled in dot net
BulletVictim
27-Aug-13 8:18am
View
Have a look here:
http://www.codeproject.com/Articles/15059/C-File-Browser
BulletVictim
27-Aug-13 8:13am
View
Ok the fastest way I can think to do this is something like this.
on the MainForm button click to add new user:
AddForm frmAdd = new AddForm();
this.Hide();
frmAdd.ShowDialog();
try{
this.Show();
}
Then on the button to save the user or return to the MainForm:
MainForm frmMain = new MainForm();
this.Hide();
frmMain.ShowDialog();
try{
this.Show();
}
This basically closes the MainForm while you are adding a new customer and then when that form closes it opens the a new MainForm and runs all the code again so it should re-populate your combobox assuming it is populated in the form load of the MainForm.
BulletVictim
22-Aug-13 6:05am
View
Take a look at these
http://www.codeproject.com/Tips/448068/ProgressBars-for-console-apps
http://www.bytechaser.com/en/articles/ckcwh8nsyt/display-progress-bar-in-console-application-in-c.aspx
BulletVictim
22-Aug-13 5:58am
View
Assuming [dbo].[IssuePlanDataforCStore] is your stored procedure. It might have to look something like this.
EXEC [dbo].[IssuePlanDataforCStore] @return_value.
That is also assuming your stored proc only requires one parameter to be passed to it
BulletVictim
22-Aug-13 5:48am
View
Ok Have a look at this site. This might be exactly what you are looking for.
http://www.sqlservercurry.com/2009/02/retrieve-last-n-rows-based-on-condition.html
BulletVictim
21-Aug-13 5:28am
View
Take a look here
http://www.c-sharpcorner.com/Forums/Thread/195201/convert-string-to-x-dimensional-array.aspx
or here
http://www.codeproject.com/Questions/472861/Convertplusstringplustoplus2plusdimensionalplusarr
BulletVictim
21-Aug-13 5:05am
View
I tested your code in a console application using port 25 and it sends the mail without getting any errors?
The layout of how you construct the message is not exactly how I would do it but it still works.
I have to note that the only thing I left out from your code is all the .ToString()s that you use, since you already declare it as a string.
BulletVictim
21-Aug-13 4:31am
View
Where is your print button?
This is just thinking out loud. In the button deceleration- OnClick or OnClientClick call the PrintGridData().
Just a thought.
Also why use the PrintGridData() in the master page? Are you going to be placing the print button on the master page? or do you only want it on a single page?
BulletVictim
21-Aug-13 4:23am
View
No problem, glad I could help point you in the right direction.
BulletVictim
20-Aug-13 9:49am
View
Have you taken a look at this link? http://forums.asp.net/t/1233927.aspx/1
BulletVictim
20-Aug-13 4:39am
View
Ok I understand what you would like to do,(well somewhat) what exactly is the problem? Are you only receiving three results or do you only want three results per ProductCategory to be returned and you are not sure how to do this?
BulletVictim
20-Aug-13 4:23am
View
Well it depends on if you want to reload the entire page or only, for instance, refresh the control on the page.
If you do not mind reloading the page have a look at this link http://forums.asp.net/t/1233927.aspx/1 . Also you will then need to do what you want to do in the page load event with a IsPostPack check if you do not want certain events to occur every time the page loads.
otherwise you will need to use a timer control.
BulletVictim
20-Aug-13 4:15am
View
You could try adding a panel and the docking the control to the panel. Then on the form size changed event change the panels size parameters instead of the control contained in the panel.
For something clearer I would need to see the source code on the re-size of your controls and need to know how and if you changed the properties of the control in the GUI side.
BulletVictim
7-Aug-13 5:17am
View
Have a look here.
http://www.access-programmers.co.uk/forums/showthread.php?t=226481
http://forums.asp.net/t/1797856.aspx/1
BulletVictim
7-Aug-13 5:12am
View
Have a look at bookmarks in word. Should help you somewhat
BulletVictim
7-Aug-13 5:10am
View
Assuming this happends when you debug your code:
Check the tabs at the top of the window, It opens a "read-only" type window of the code you want to debug(should be highlighted in red in the right hand corner, if you want to edit the code check the grey tabs to the left for the tab you want to alter.
Also check for new updates, it seems to have been resolved that you can edit your code while its running.
BulletVictim
7-Aug-13 4:58am
View
Quick but dirty way. I would say declare an int with value of lets say 1, in DataGridView1_SelectionChanged run an if int = 1 then have the code execute, at the end set the int to 0.
So it should be something like this:
Private Sub DataGridView1_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs)
if int i = 1 then
Handles dgvCaseLst1.SelectionChanged
'It triggers 4 times
MessageBox.Show("selection changed trigger")
int i = 0
end if
End Sub
BulletVictim
30-Jul-13 6:48am
View
Do you only want to use the toolstrip to call the printDialog or are you also going to use the standard button to call it? If you are also going to use the button i would suggest just calling the button_click event when you want to run it from the toolstrip.
BulletVictim
30-Jul-13 6:38am
View
Look at this similar question
http://stackoverflow.com/questions/15642748/check-for-duplicate-filename-when-copying-files-in-c-sharp
BulletVictim
30-Jul-13 6:31am
View
http://www.codeproject.com/Articles/219977/MultiDropDown-A-multiple-selection-Dropdown-contro
which by the way. first result in a google search
BulletVictim
30-Jul-13 6:21am
View
http://www.dreamincode.net/forums/topic/218143-add-data-from-textbox-into-datagridview/ all done by someone else and shows how to do it
BulletVictim
30-Jul-13 6:04am
View
Pass the Dropdownlist value.Remove(n(until the comma)) to the database
So in your case it would be Ddl.SelectedValue.Tostring().Remove(2); this code is not 100% but should give you an idea of how to do it
BulletVictim
30-Jul-13 5:35am
View
You could take a look at this link
http://stackoverflow.com/questions/3999998/how-to-make-a-system-modal-dialog-in-c
Also this might be what you are looking for
http://www.codeproject.com/Articles/7392/Lock-Windows-Desktop
BulletVictim
9-Jul-13 9:31am
View
If you don't mind could you share the update statement and the edit and delete button code?
BulletVictim
9-Jul-13 9:17am
View
I would like the bookmark option in pdf.
BulletVictim
2-Jul-13 6:00am
View
Not sure exactly what you are looking for. But what you might be looking for is something in the lines of:
Gridview1.SelectedRows[0].Cells[i].Value.ToString()
To find the correct record you want to edit
BulletVictim
26-Jun-13 3:53am
View
Just want to clarify.
You are trying to limit the textbox to not allow a certain type of character input?
Does it need to always disallow these characters?
BulletVictim
26-Jun-13 2:55am
View
I know its basics, but it has worked sometimes for me.
Try switching to '/' instead of '\' so your location would be something like this @"\\192.168.0.1/public/Akmal/IBTalk_Screenshare.exe".
Just a thought
BulletVictim
26-Jun-13 1:55am
View
Sadique that method works better when the total is calculated within a loop.
Now not saying its wrong. Depending on how he intends to write the total to the database
BulletVictim
26-Jun-13 1:31am
View
You are looking for something more like this?
total = double.Parse(textBox1.Text) + double.Parse(textBox2.Text);
BulletVictim
24-Jun-13 6:39am
View
Thank you so much for all your help. It turned out that the bookmark did not populate in word vba for some weird reason because the document is contained in the sql database and did not refference it for some reason.
Because of this I was given the go ahead to do this in the code generation on the application side( So much easier and faster to do).
I am going to mark your solution as the correct one and just put the code that finally worked here incase somebody ever need to do something like this again.
BulletVictim
24-Jun-13 5:09am
View
Am I missing something? Because I took your update and it still gives me the same error. Does It make a difference if I am working with a .doc document in word 2007?
BulletVictim
24-Jun-13 4:39am
View
It actually works as a normal placeholder bookmark. It displays the complete text in word.
So it has to be possible to get the text value from it.
It should be able to be the url at the same time since I get the bookmarks value from my database
BulletVictim
24-Jun-13 4:35am
View
I have been looking around and it seems possible to do this. But it does not seam to want to work with the code. perhaps because I am using a placeholder Bookmark
BulletVictim
24-Jun-13 4:32am
View
Deleted
Yes. Ok I should note that this is a placeholder bookmark that I am using
BulletVictim
24-Jun-13 4:31am
View
Deleted
Yes
BulletVictim
24-Jun-13 4:15am
View
I have tried doing it like this. Google = ActiveDocument.Bookmarks("MAPURL").Range.Text
If i try to implement it I get a Run-time error '5152': This is not a valid file name.
Try one of the following:
*Check the path to make sure it was typed correctly.
*Select a file from the list of files and folders.
BulletVictim
24-Jun-13 4:06am
View
Yes I know it works if you use a static URL. I need to use the bookmark to set the URL. So basically I need to select the text from my Bookmark and set the Google string to that text
BulletVictim
24-Jun-13 3:01am
View
That is just the commenting of the site that did removed the http protocol.
BulletVictim
14-Jun-13 7:38am
View
You could always just try making the remarks variable a normal varchar(max) type.
BulletVictim
14-Jun-13 4:09am
View
Take a look at the following. Its not exactly what you want but this might help somewhat to get you to where you want to go.
https://www.dropbox.com/s/dzfstpm8c7i1tgq/PrintDGV.cs
Or take a look at one of these:
http://www.codeproject.com/Articles/16670/DataGridView-Printing-by-Selecting-Columns-and-Row
http://www.codeproject.com/Articles/18042/Another-DataGridView-Printer
http://www.codeproject.com/Articles/28046/Printing-of-DataGridView
BulletVictim
5-Jun-13 2:56am
View
Great thanks I knew I missed something like that somewhere. I globally declared a List<string> and added the Table.Name value to it when the table textbox is created.
On the Create_Click event I added another for loop that goes through the List<string> and then the if is contained within the second for loop.(contents being the List<string>). I know this is kinda sloppy coding and I will have to rethink the entire way of doing this, but your advise really helped. Thank you again
private void Create_Click(object sender, EventArgs e)
{
foreach (Control ctrl in this.Controls)
{
foreach (string cont in contents)
{
if (ctrl.Name.Contains(cont) && ctrl.Name != cont)
{
MessageBox.Show(ctrl.Name);
}
}
}
}
BulletVictim
5-Jun-13 1:55am
View
Ok there you go, now only the relevant code is contained. Showing how I create the textboxes and how I have tried to link them with each other.
If you need any more clarification on the question itself please feel free to ask and I will happily try to explain it better, but I also need to know what you do not understand about the question as to better explain it to you.
BulletVictim
5-Jun-13 1:54am
View
Deleted
Ok there you go, now only the relevant code is contained. Showing how I create the textboxes and how I have tried to link them with each other.
If you need any more clarification on the question itself please feel free to ask and I will happily try to explain it better, but I also need to know what you do not understand about the question as to better explain it to you.
BulletVictim
5-Jun-13 1:50am
View
Deleted
Ok there you go, Only the relevant code is contained. If you need any more clarification on the question please ask exactly where you need clarification and i will happily try to explain it better
BulletVictim
4-Jun-13 6:35am
View
You could try to use the CellContentClick Event on the DataGridView.
If it needs to be on a specific column you need to use something like this.
if(e.columnIndex == i)
{
//your code
}
I might be missing exactly what you are asking
BulletVictim
4-Jun-13 6:02am
View
I see your point, but this is just a shot in the dark any way.
BulletVictim
4-Jun-13 5:54am
View
Unless it is a problem for you to load the page. I am not bothered to share my code, Like I said this is just a side project I'm working on, and the reason my entire code is posted is to help clarify what is going on.
Show More