.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

RichTextBox - events when line added/changed/deleted.

Posted By:      Posted Date: October 24, 2010    Points: 0   Category :Windows Application

Hi all,

Is there any easy way to determinate, when a new line is added or deleted? Or I need to calculate this on every text change?



View Complete Post

More Related Resource Links

RichTextBox - line number under the mouse cursot


Hi all,

How to get the number of the line, which is under the cursor in RichTextBox control.



wpf richtextbox taing one character per line, when no width or minwidth is set

I have a richtextbox inside a grid and a stackpanel. The problem is I am not setting the width of richtextbox. I want it to occupy according to its parent. But when I type characters, its displaying one character per line.

If I set minwidth, thw window is getting scrollbar, because window is less than minwidth of richtextbox (which is not desired)

Can anybody help me out to resolve this problem
Thanks in advance

Dynamically Added Controls and Events


Hi All,

I have a custom control that is dynamically added to a web page based on a search/sort that the user runs.  This is triggered by a button, at which point the controls are created and data populated.  The display of this data is functional, however this custom control contains a button.  After reading up on the lifecycle of the page, I realized that everything associated with the dynamic control is lost after a postback, and that the event is not raised until page_load has occurred.  Therefore, my button that triggered the postback disappeared into the ether before the ASP .Net Engine looked at the event.  

My question is, is there a way to dynamically create this control and being able to access the events?  Even if I put the data in the ViewState, and reload the control each Page_Load, the event data will be gone right, because the 'sender' ceases to exist?  Is this approach I'm trying to take a dead end?  Thanks in advance.

Item level events not fired when items are added by routing



 I want to set item level permission in a library. Therefore I developed an itemceiver that should catch new items in that library. My problem: no event is fired (I tried ItemAdding, ItemAdded, ItemUpdating, Itemupdating, ItemCheckingIn, ItemCheckedIn) . All items get into the library through routing, that means, the item is first stored in a dropofflibrary, than routed in my library where I want to set the permission. Probably the events are not fired by routing.The events are fired correctly, when I update or check in an item as soon as they are edited in my library.

Is there a way to set item level permission when routing is used?

Many thanks in advanced.



C# Line Indexes in RichTextBox



Im making an application in C# and it's my first time to make one (and a big leap from Turbo C++) and Im having a great time for the past 5 days that is until I couldnt figure out how to go to the next line of text immediately following a search. Here are parts of my code

The search is done inside the richtextbox "ImporterTextBox", text is transferred to a textbox(multiline) "NETDevices"

The text file being read is a generated report from a diagnostics software


string NAData = "Network Adapter";    
searchindex = ImporterTextBox.Find(NAData); //sfc Network Adapter info lineindex = ImporterTextBox.GetLineFromCharIndex(searchindex); TempString = ImporterTextBox.Lines[lineindex]; TempString = TempString.Replace(NAData, ""); TempString = TempString.Trim(); NETDevices.Text = TempString;

 The text below is a sample of a section of the generated report which my application should read

Network Adapter                        &nbs

WCF Tutorial - Events and Callbacks

we described how to make a very simple client/server application where clients would call functions on the server through a shared interface. In this tutorial, I'm going to expand that application to allow the server to execute functions on the client by using callbacks. Essentially, this is WCF's mechanism to allow events to be raised from the server to it's connected clients.

Delegates and events in c#.net

People often find it difficult to see the difference between events and delegates. C# doesn't help matters by allowing you to declare field-like events which are automatically backed by a delegate variable of the same name. This article aims to clarify the matter for you. Another source of confusion is the overloading of the term "delegate". Sometimes it is used to mean a delegate type, and at other times it can be used to mean an instance of a delegate type. I'll use "delegate type" and "delegate instance" to distinguish between them, and "delegate" when talking about the whole topic in a general sense.

How to listen to events within a listview



I've got a listview and I've put a button control in one of the columns, I'm trying to figure out how I have listen to the button click within a certain row, but can't see the button in the dropdown for the IDs I can generate events for.

I'd like to get the primary key of the row that's been clicked on and then run a sql statement against it.

Any help would be appreciated.

JQGrid Loading deleted values



This is quite strange. here is the issue:

Some Info:

1. I'm using a multi-select jqgrid.

2. I have my own delete button to delete multiple orders

The problem:

When i press the delete button on the pager of my jqgrid, the records are deleted from the database but JqGrid shows some records (4-5). On refreshing the grid, correct numbers of records are shown.

Here is the code:

function delorder() {
        var amg = $("#horder").getGridParam('selarrrow');
        var cont = amg.length;
        if (amg.length > 0) {

Article commenting by line number


I'm wondering what's the best way to approach an online article system that allows users to comment by clicking on the line they are commenting about? Essentially the same way Adobe Acrobat works with comments where you can click anywhere and the text is saved for that location.

I'm assuming a mix of jQuery would be the crux of the interface. The system would need to save comments so that when another user logs in, they will also see the other comments but they can´t edit them - only add their own.

Any suggestions would be great.

ASP.Net account deleted. How to create it again?


 Hi I have created an intranet application using ASP.Net/IIS.

I normally need to web share the folder and allow full permission to ASP.Net user account.

However, I carelessly deleted this account. How to create it again ?

Pls help.... thanks.


New off line application working with sdf file. Need advice


Hey Folks

I am working on a project currently where I need to get data out of a 3rd party vendor's software that uses a .sdf file I looked this up and its a SQL CE file. I was hoping to just link to with with access but thats apparently not going to happen. I need to link to the database extract data from it to a csv file for later use. I also and most important I need to get the data from it and create a report that can be printed while on a customers site that my or may not have web access so I need for this program to be on and off line. I had my webapplication that I have been working on open and was able to bring up the sdf file under the server exploere however I can't seem to get anything out of it when I try to do grid views or detail views errors out.

Can I use one of Visual Studio projects to create this sort of applicaiton if so what would be the best approach. I would love to get an access odbc driver since office is allready installed on the employee's laptop's



Line Break Problem in XSLT


Hi All,

I want to add line break in the xslt but it not working.

Below is the code for adding the line break.

</P> <P>
&lt;xsl:variable name="Collection7"&gt;</P> <P>&nbsp; &lt;xsl:value-of select="$13932"/&gt;&lt;xsl:text&gt;&amp;#xa;&lt;/xsl:text&gt;</P> <P>&nbsp; &lt;xsl:value-of select="$31042"/&gt;&lt;xsl:text&gt;&amp;#xa;&lt;/xsl:text&gt;</P> <P>&lt;/xsl:variable&gt;</P> <P>&lt;td&gt;&lt;xsl:value-of select="$Collection7"/&gt;&lt;/td&gt; </P> <P>&lt;/code]</P> <P>I have tried the below code as well:</P> <P>&lt;xsl:variable name="newline"&gt;
&lt;/xsl:variable&gt;</P> <P>or</P> <P>&lt;xsl:variable name="break"&gt;&amp;lt;br&amp;gt;&lt;/xsl:variable&gt;</P> <P>or </P> <P>addign &lt;br/&gt;</P> <P>then also it not adding the line break.</P> <P>But If I write code like below then it is adding the line break and it works fine.</P> <P>

displaying dynamic added value in reports



I my application i have generated dynamic rows that contains some textbox values, i need to take those values and display in

reports. I am storing that dynamically added values in another table. please help me.

crystal report -visual studio 2008 dual axis chart (bar & line)


dear all, 

i use crystal report integrated with  vs.2008, and i want to make chart with dual axis (bar & line).

i have used bar chart and input the data with 2 values..

then in chart options > template, i activated the dual axis..

my question is, how i can change the 2nd value with line chart not bar chart??

i'd tried to find the right settings in "chart options" but still can't find the solution.

for information in "chart options" there are 4 sub menu : template, general,titles,grid..

i read in a tutorial there's more sub menu called "series" in crystal report (stand alone version)..

is it possible doing it in Crystal Report VS. 2008?

please,, i need your advice and solution..

Thanx before..


UI Frontiers: Multi-Touch Manipulation Events in WPF


Multi-touch has progressed from being a futuristic prop of sci-fi films to a mainstream means of user interface. We'll show you how support for multi-touch in Windows 7 has filtered down and settled into various areas of the .NET Framework.

Charles Petzold

MSDN Magazine August 2010

Extreme UI: Line Charts with Data Templates


Charles Petzold continues his investigation into robust XAML coding made possible by Windows Presentation Foundation, this time tackling the complicated process of creating line charts.

Charles Petzold

MSDN Magazine January 2010

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend