|
Hello Experts!!
I am scanning barcode and display it into grid cell,Now i want to check that barcode is already present or scanned in same grid.I am not saving data into database.
So please suggest me event for same action.
e.g.
no. name address
1 kidya U.S.
2 Sam U.K.
if i scan 1 again then it must show msg "No. already scanned"
|
|
|
|
|
So before you add a scan you loop through the existing row/cells and check for existing records.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
tell me event for that.i tried in cellEnter and cellLeave event but didn't work.
|
|
|
|
|
How are you adding the records
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: Never underestimate the power of human stupidity
You've ignored your own warning!
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Slow afternoon and I've brick walled it with some WCF I'm fighting.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I prefer the original: Soha alábecsül a erő -ból emberi butaság
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
i am just scanning barcode then according to same barcode i am fetching record from sql and then show it on grid cell.So i want to ignore duplicate records.
|
|
|
|
|
No, he's not suggesting hooking into an event.
BEFORE adding a new row, ITERATE through the current content and CHECK for the DUPLICATE.
Now, somewhere you have a line of code along the lines of:
Wibble hatstand = barcode.Read();
!! CHECK HERE !!
dataGrid.Add(hatstand);
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Hi,
I'm really hoping for an easy answer to this issue. I have a client device that uses a hardwired connection to communicate with its server if it is in a docking station. If lifted from the docking station the hardwired connection is disabled and it switches to its wireless connection. This is where remoting stops working on the serverside.
The client device has 2 network cards with different IPs, one for the hardwired connection and one for the wireless connection. When switching to wireless/hardwired the client is still able to send messages to the server, but apparently the server is still trying to reach the client on the connection it initially used so the return messages fail.
How is this fixed? Where is this fixed? I've tried to call RemotingServices.Configure again but it seems you can only call that once. Unregistering and re-Registering channels doesn't seem to work either. Any ideas would be greatly appreciated! Solutions even more!
|
|
|
|
|
Dear all,
I have 2 forms. When I click a button on 1 form, other form will draw something. However, it is seemly that OnPaint method is not called. Please tell me the way to do it.
Thanks
あんかた
|
|
|
|
|
You don't, call the Refresh() method to cause the form to repaint.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Actually, Invalidate() is what you call to force a paint event.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
The application heartbeat status shall be written to the Event Log(event viewer) at regular interval of 15 minutes. It is done to know the status of application whether it is up and running. The application is pinged at the mentioned url and the status of the application is known.
I want to know if there is any implementation code for above requirement?
Thanks & Regards,
Praveen.
|
|
|
|
|
That you can find in IIS Error Log as well.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
I didn't get you. what you mean by IIS Error Log.please elaborate.
|
|
|
|
|
If you want to check the errors generated in your web application then you can check IIS Log. But it is troublesome to check the error in the log. You can use LogParser which is free utility from Microsoft to check the errors for your web application. If you want to create a custom error logger which will ping and check whether the application is up and running or not and set the status to the windows event log, then I would like to recommend you to use Enterprise Library by Microsoft. Links are given below:
http://www.microsoft.com/technet/scr...r/default.mspx[^][^]
http://msdn.microsoft.com/en-us/library/dd203099.aspx[^]
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
Hi there,
I want to add dynamically checkboxes to the datagridview rows which displays data on textchange event of a textbox using LIKE query.
On clicking checkboxes I want to go for further coding.
Please help.
|
|
|
|
|
|
Hi,
That question was raised by me itself but, I couldn't find right answer.
One who suggested me at design time instead of runtime.
Please help.
|
|
|
|
|
Does the textbox reside inside the grid view or some where else? Are you trying to say that on the textchanged event of the textbox, checkbox lists should be created with the data that depends upon the textbox's text right.
You can add a Template Column in the gridview. Drag a checkbox list in the ItemTemplate. Set the autpostback to true ande define an event. This event will be common for all checkboxes in your gridview. Now in the RowDataBound event of your gridview, just set the items of the checkbox list depending upon the data that you want to bind. As you have already set the event with the checkbox list, you can do what ever you want in the checkboxlist selected index changed event.
It's a bit long discussion but I hope something is clear now If I took your words right.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
Sir,
Your first statement was right that I m having textbox outside to that of datagridview.
You gave the code which was in ASP.NET but,I m working on C# Windows.
Even I succeeded in adding checkboxes at runtime on textchange event of external checkbox on your behalf....Thanks.
But, now I m quering about how will I get the appropriated row record on clicking respective checkbox on the row ? Is there any event about databinding events to succeed further?
I want to check it for furher process.
Please help.
awaiting.................
|
|
|
|
|
Hi,
I am sorry but I have very limited experience on Win Forms. But I can refer the following link:
[^][^]
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
You can add a COLUMN of checkboxes, you cannot add a chackbox to a single row. I use the following:
DataGridViewCheckBoxColumn oDGC = new DataGridViewCheckBoxColumn();
oDGC.HeaderText = "Sel";
oDGC.Name = "Sel";
oDGC.AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
oDGC.FlatStyle = FlatStyle.Standard;
oDGC.CellTemplate = new DataGridViewCheckBoxCell();
oDGC.CellTemplate.Style.BackColor = System.Drawing.Color.Beige;
oDGC.ThreeState = false;
oDG.Columns.Insert(iCol, oDGC);
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
(i hope i write true place)
Hi all, i use the two method shown below, to sent text as html to a word document, but non english characters arent shown in the document. what can i do??
private void button2_Click(object sender, EventArgs e)
{
WordApp = new Word.ApplicationClass();
fileName = @"........";
Microsoft.Office.Interop.Word.Document aDoc = WordApp.Documents.Open(ref fileName, ref missing, ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref Format, ref missing, ref isVisible, ref missing, ref missing, ref missing, ref missing);
WordApp.Visible = true;
bookmarkPaste (aDoc, bookmarkinWordDoc,myHtmlScript);
}
public void bookmarkPaste(Word.Document aDoc, string bookmarkAdi, string data)
{
try
{
object bookmark = bookmarkAdi;
object missing = System.Reflection.Missing.Value;
object pasteType = Word.WdPasteDataType.wdPasteHTML;
DataObject clipDO = new DataObject();
if (aDoc.Bookmarks.Exists(bookmark.ToString()))
{
Word.Range rangeTbl = aDoc.Bookmarks.get_Item(ref bookmark).Range;
clipDO.SetData(DataFormats.Html,HtmlClipboardData (data));
Clipboard.SetDataObject(clipDO, true);
rangeTbl.PasteSpecial(ref missing, ref missing, ref missing, ref missing, ref pasteType, ref missing, ref missing);
}
else
{
}
}
catch (Exception exc)
{
MessageBox.Show(exc.Message);
}
}
private static string HtmlClipboardData(string html)
{
StringBuilder sb = new StringBuilder();
Encoding encoding = Encoding.UTF8;
string Header = @"
Version: 1.0
StartHTML: {0:000000}
EndHTML: {1:000000}
StartFragment: {2:000000}
EndFragment: {3:000000}
";
string HtmlPrefix = @"
DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN""&
html;
head;
meta http-equiv=Content-Type content=""text/html; charset={0}"";
/head;
body>
<!--StartFragment-->
";
HtmlPrefix = string.Format(HtmlPrefix, encoding.WebName);
string HtmlSuffix = @"
!--EndFragment--;
/body;
/html;
";
// Get lengths of chunks
int HeaderLength = encoding.GetByteCount(Header);
HeaderLength -= 16; // extra formatting characters {0:000000}
int PrefixLength = encoding.GetByteCount(HtmlPrefix);
int HtmlLength = encoding.GetByteCount(html);
int SuffixLength = encoding.GetByteCount(HtmlSuffix);
// Determine locations of chunks
int StartHtml = HeaderLength;
int StartFragment = StartHtml + PrefixLength;
int EndFragment = StartFragment + HtmlLength;
int EndHtml = EndFragment + SuffixLength;
// Build the data
sb.AppendFormat(Header, StartHtml, EndHtml, StartFragment, EndFragment);
sb.Append(HtmlPrefix);
sb.Append(html);
sb.Append(HtmlSuffix);
//Console.WriteLine(sb.ToString());
return sb.ToString();
}
thanks for everything i have...
|
|
|
|