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


Top 5 Contributors of the Month
david stephan
Asad Ali
Fauzul Azmi
Post New Web Links

count no of Characters in Richtextbox control in infopath

Posted By:      Posted Date: October 28, 2010    Points: 0   Category :SharePoint
 

Hi All,

Can anybody tell me how to count the Number of characters ,while entering in the RichTextBox control and have to display the no of characters in the above 

control.

 

Thanks 

Mansoor

 


Regards, Mansoor


View Complete Post


More Related Resource Links

InfoPath 2010 Characters Count bug

  

Hi,

I'm using infopath 2010 with SharePoint 2010, and I'm having a bug, which I'll try to explain.

I have a form with more than one page, and on the first page I have a textbox (EnqLocation) with a counter with this XPath expression: string-length(my:EnqLocation) [on form this is a SharePointListItem_RW]

At the first time, it works fine, I write the text inside the textbox and after click out of the textbox on the SharePointListItem_RW the value is updated.

The problem is, when I click on next to the next page and after that I go back to the first page using a "previous" button I can change any text on the textbox but the characters counter never change, and if I refresh the page, the funcionality comes work and the text is updated with the text I had before go to the second page.

I think this is a problem related with variables state which is lost or not updated.

This is a weird bug.

If you need some more information I will be glad to provide it.

Thanks.


Microsoft ListView Control 6.0 cannot correctly display multibyte characters when running on a 64 bi

  
With all the regional settings set to Russian and the OS being Russion the ListView Control 6.0 does not display the column headers correctly on the Windows Server 2008 64 bit OS. If we switch to using Microsoft ListView Control, version 5 the columns (text strings) are displayed correctly. I am concerned that using an earlier version is going to cause problems. Is there a better solution other than using version 5? Thanks!

Full desired height of a RichTextBox control?

  
I don't mean the control's .Height property... ...I have a WinForm with a RichTextBox control, and another control underneath the RichTextBox control.  The RichTextBox control is anchored on the left, top, and right sides, so the width is automatically resized as the parent form is resized.  (it also has its Multiline and and WordWrap properties set to True) The item underneath the RichTextBox needs to always be right underneath it (little whitespace), and the RichTextBox needs to always display its entire text (nothing hidden). As I get the form's resize event, I'd like to update the RichTextBox's hight so all text is displayed, however I'm not seeing any properities or methods which would be helpful.  There is the PrefferredHeight property, but it is always returning 13. Basically, it comes dowen to this: when WordWrap is set to true, is there a way to see what the desired height is?  Or is there a way to see if any of the text is clipped? If not, I suppose my next step would be to roll my own custom control and draw the text myself, keeping track of the autowrap and line count, but I thought I'd post a message here first and see if anyone has a better idea. Thanks, Jeff      

Drag drop functinality not working on Explore View control for file containing special characters in

  
We have created a control which uses explorer view control for file drag and drop. This functinality works fine for a file having filename without special characters but it gives an error if we drag and drop a file having special characters in the file name. The reason for this is Sharepoint uses WebDAV protocol for file transfer to the Sharepoint document library and WebDAV protocol has limitation that it does'nt accept file with special characters. Please let me know the way how I can accomplish drag and drop of file with special characters in file name, onto Explorer View control with WebDAV.

Drag drop functinality not working on Explore View control for file containing special characters in

  
We have created a control which uses explorer view control for file drag and drop. This functinality works fine for a file having filename without special characters but it gives an error if we drag and drop a file having special characters in the file name. The reason for this is Sharepoint uses WebDAV protocol for file transfer to the Sharepoint document library and WebDAV protocol has limitation that it does'nt accept file with special characters. Please let me know the way how I can accomplish drag and drop of file with special characters in file name, onto Explorer View control with WebDAV.

Multi select control does not work with Infopath. :(

  
I create new lookup column that allows multiple values.  The important part is the column is the Title(linked to item) so the item is shown as Hyperlink item to the actual item.  This works fine, but then I would like to fine tune my form with infopath.  When I open this form it complains about these columns, basically will not let me open the form without first deleting these lookup columns.  So I then try the other way I create a lookup column from infopath and this work fine, the only problem being is these items no longer so up as hyperlinks to the original items.  This is a major bumma, any one have any suggestions to get this working?

How can I hide the caret of a RichTextBox control?

  
Hello,Can you please tell me how can I hide the caret of a RichTextBox control completely while my app is running?Thanks.

Infopath 2010 How to activate the people picker control

  
I am creating a form where i am populating a people picker with the logged on user. This is fine but how can i then activate the control to get it to lookup the display name and account type.   I am using a rule to set the AccountID field to be the Username function available in rules. Then on the form you have to click on the tick icon to finish the lookup. This is the bit i want to automate.   I also have c# code running in the background so am happy using .NET code to do this.   Thanks   Paul

How to count number of characters in a textbox?

  
On my current form I have it validating a Canadian Postal Address (xxx xxx). The space is optional but if the user does not use a space, then once the validation passes it will insert one. How can I count the first 3 characters of the textbox, insert a space, then add the rest of the characters?Thank you

Infopath Date Control

  
Is it possible to set date control in infopath form to accept only dates from "Sunday" day of the week.
So far i have tried a number of possible combinations of Data Validations but non of them worked.

Any help is much appreciated.



Brijesh Singh

InfoPath 2010, People Picker Control - problem with sharepoint group targeting

  

Hello!

I have developed InfoPath 2010 web form with People Picker Control. I want to set sharepoint group which would be used in People Picker Control to search people. Ok, I set sharpoint site url and aftet that - select sharepoint group 'Test InfoPath group' I need. Everything works fine - I can select only people inside sharepoint group 'Test InfoPath group'.

Now I deploy my solutions (wsp package) on different site collection and sharepoint server installations. In this case People Picker Control can't find right sharepoint group 'Test InfoPath group'. Sometimes People Picker Control select another group, not that I have select in InfoPath Designer and sometimes People Picker Control select all users.

What's wrong with it and can I configure People Picker Control to select sharepoint group?


InfoPath 2010, People Picker Control - problem with sharepoint group targeting

  

Hello!

I have developed InfoPath 2010 web form with People Picker Control. I want to set sharepoint group which would be used in People Picker Control to search people. Ok, I set sharpoint site url and aftet that - select sharepoint group 'Test InfoPath group' I need. Everything works fine - I can select only people inside sharepoint group 'Test InfoPath group'.

Now I deploy my solutions (wsp package) on different site collection and sharepoint server installations. In this case People Picker Control can't find right sharepoint group 'Test InfoPath group'. Sometimes People Picker Control select another group, not that I have select in InfoPath Designer and sometimes People Picker Control select all users.

What's wrong with it and can I configure People Picker Control to select sharepoint group?


How to count characters in a string, by type

  

Say I have a string in a text box like

GJGJ|hgjk|HHFJFH|HGKHhfhf|bb|hgkhgk|

I wish to count the number of pipes or '|'.

How can I do this with js ???


Control Characters in Log file

  

SQLMessage = "This task ran at " & Now() & " - InfoMessage - "

 Dim sw As StreamWriter
        Dim path As String = outputfilepath
        Try
            'Append test to existing log file
            sw = File.AppendText(path)
            sw.WriteLine(SQLMessage)
            sw.Flush()
            sw.Close()
        Catch ex As Exception

        Finally
        End Try


In some of my logs I see this:

Actually I can't show you what I'm seeing

When I copy the Control characters from Notepad to here they are converted to Chinese characters!! ARGH!

Obviously I'd expect to at least see the
This task ran at <<time>>  - InfoMessage -

Where does this control string come from that gets written to the log file??

I'd seen the large log files were all looking like this.  I cl

make a control required field using code in infopath

  

Hello guys,

How do i make a field required field using code. Specifically, how to make attachment control mandatory.

I know there is an option to select cannot be blank in properties but i want to do it conditionally.

Please help me.

 

 


how to set a value inside an Infopath form task control ?

  

Hi ,

how can I set a value inside an Infopath form task control ?

i used the following code but it's not working i don't know why

RequestSubmitted_TaskProperties.ExtendedProperties["TxtValue"] = "My Value";

so please advice

Thanks

Meda


How Image add to any control of infopath 2007 form.

  

Hi,

I have create a BITMAP in my code i want to attach this image to infopath form... please help....

public void FormEvents_Loading(object sender, LoadingEventArgs e){

Bitmap BM = barcode_generator("*ABCD*");

}

private Bitmap barcode_generator(string data)
        {
            Bitmap barcode = new Bitmap(1, 1);
            Font font = new Font("Free 3 of 9", 60, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
            Graphics graf =  Graphics.FromImage(barcode);
            SizeF datasize = graf.MeasureString(data, font);
            barcode = new Bitmap(barcode, datasize.ToSize());

            //graf = new Graphics.FormImage(barcode);
            graf.Clear(Color.White);
            graf.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixel;
 &

Categories: 
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