C Sharp :: If Checkboxlist Is Not Selected Show Save As Number 0 In DB
Sep 26, 2012
I'm working in a web aplication in c#, vs 2008, framework 3.5, I need to assign a value to a var, in this case "problemas", when I tried to save the value that I have in the checkboxlist, it does, but if don't selected, can't show 0, besides if I change the value "problemas = 9" to problemas = 111111" doesn't works.
I am not getting all the records.... when i select the same date in both datetimepicker no record is displayed... i also want the record of the selected dates from both datetime picker..
when we click on a line in text area I want to open a popup having all text from that line. I should be able to select some of its text then if I click on save button of popup then only selected text should be saved and displayed in original text area of form. I want to use this for multiple sentences of text area.
1st when i fill the things on form then saved in database after saving record when i want add another record it shows an error. after saving it saves new record refresh doesn't work
I am working on C# Project [Windows Form Application], to update treeview nodes from excelsheet [xls] Cell [row i, Column 3] Values, while on selecting treenode, it should update corresponding Column 4 Value [row i, Column 4]. For me, Treenode are populated successfully, but on selecting the treenode, it always display first Element of treenode [Not selected one].
Populated Treenode from Excel as: [ Update Child Nodes from Column 3 elements [Column 2 Contain Parent node name and Column 3 have Child Node name], if Column 2 Value is same as Parent node name [My Module], update the child nodeunder same Parent node.]
for (int i = 0; i < worksheet.UsedRange.Rows.Count; i++) { string mynode = ((Excel.Range)worksheet.Cells[i + 1, 3]).Value2.ToString(); string mynode2 = ((Excel.Range)worksheet.Cells[i + 1, 2]).Value2.ToString();
[Code] ....
On selecting the Child Node, it always give 1st Parent node. Instead of Selected Node.
for (int i = 0; i < worksheet.UsedRange.Rows.Count - 2; i++) { string mynodetext = ((Excel.Range)worksheet.Cells[i + 2, 3]).Value2.ToString(); string mynodetext1 = ((Excel.Range)worksheet.Cells[i + 2, 4]).Value2.ToString(); if (treeView1.SelectedNode.FirstNode.Text == mynodetext) { this.richTextBox1.SelectedText += Environment.NewLine + mynodetext1 + Environment.NewLine; } }
passing selected row in gridview to my dropdown. I have 1 gridview, 1 textbox and 1 dropdown list box. My dropdown is populated by SqlDataSource from my table Country. On my gridview, I have 3 columns, which are SELECT, NAME and COUNTRY. Under SELECT column, I have my hyperlinked Select, every time I clicked on a certain row NAME will pass in textbox (no problem with that), but in my dropdown it does not populates the COUNTRY that I choose. For example, I have Jack for name and USA for country. Beside Jack and USA, I have a hyperlink Select, when I click Select, Jack will display on my textbox and supposed to be USA will display on my dropdown but not displaying instead it says an error "'cboCountry' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value".
I want to set the rootpath of an executable application. This rootpath should be the same as the path of an item that I select from a ListBox. The code for selecting the item is as follows.
namespace Menu { public partial class Form1 : Form { private Button button; private ListBox listBox1; private string selecteditem;
[Code] ....
Now what I want is: Whatever I get the output as in the :
Console.Writeline(path + selecteditem),
I would want to set this as a rootpath for an application so as to do rest of the measurements or steps only in that path/folder. Is it possible to do something like this?
IF statement. Really new, so this will be simple I'm sure. I'm essentially just trying to roll a 6 and 20 sided die. I want the statement to run "If 20,then display the randomly selected number for 20".
// auto dice roller #include <iostream> #include <string> #include <ctime> #include <cstdlib> using namespace std;
My project is to make a options menu for the user to select a shape and than draw out the shape. That whole process is already done and ready to go. What i am having trouble on is totaling the number of selected shapes. For example, at the end of the program i need to prompt a message saying ("You have selected "shape" this many times "number").
When I am filling a Application form and save this Application form Entries in database it saved successfully but below Application form in DataGridView How to show only current Entry row; There is not show a previous Entries in DataGridView?
In my class I'm trying to display the elapsed time as my label on a windows form. I've been reading up on all the different articles online and have tried these three methods all with the same result:
1. Using the System.Timers class 2. Built in Timer sub-class 3. Defining directly inside of my class the StartTime, etc. variables.
All of these still result in the following error: Cross-thread operation not valid: Control 'User_Interface' accessed from a thread other than the thread it was created on.
Currently, my windows form is being called by another class, but I'm not sure if this is the cause of the problem.
This is a sample of the code that I'm currently using to show the elapsed time:
How to show print preview in control. I have class Printer : PrintDocument that contains what i want to print but how to show that in form and in which control.
updated: To be more precise i have listbox with documents for printing. When user selects document i want to show print preview in some control next to this
I have a text box invoice no on windows form and i need to retrieve data from database and everytime user click on the add button the invoice no should increment by 1...
I have application that codes and binds an access database to a windows form application. Everything seems to work however, nothing is actually saved in the database. Updates and deletes are coded and debugging steps through, but checking the db, the data is the same.
Is it possible to save web page as image with web application? if yes then how?.I searched and searched and searched but all examples i found were for windows application and i'm facing lot of trouble while converting it for web application.
I need to save excel file data directely into oracle database by using XML string but getting error as
ORA-01704: string literal too long 01704. 00000 - "string literal too long" *Cause: The string literal is longer than 4000 characters. *Action: Use a string literal of at most 4000 characters. Longer values may only be entered using bind variables. Error at Line: 50 Column: 31
i have created application using gembox i create a word file and save data on it but i want after saving it itis opened to me using microsoft word directly
it is the code
DocumentModel document1 = new DocumentModel(); Section section1 = new Section(document1); document1.Sections.Add(section1);