|
My pleasure.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
Why do programmers often confuse Halloween and Christmas?
Because 31 Oct = 25 Dec.
|
|
|
|
|
I am using a DataGrid (yes, I know I should be using DataGridView by now!) and I want to disable cell selection. I am talking about the text in a cell getting selected when the users clicks in a cell.
I don't want this because I am using a context-menu on the DataGrid that should appear when user right-clicks on a cell, and this doesn't work when user right-clicks on a selected cell because then the Windows edit menu pops up instead.
|
|
|
|
|
You should try SelectionMode property of datagridview.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
hi sir
i am connecting the reportviewer to dataset but i am fail.i am using following code.please help me.
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Microsoft.Reporting.WebForms;
using System.Data.SqlClient;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
ReportViewer1.Visible = false;
}
protected void Button1_Click(object sender, EventArgs e)
{
}
protected void Button1_Click1(object sender, EventArgs e)
{
ReportViewer1.Visible = true;
SqlConnection con = new SqlConnection("server=DC-12\\SQLSERVER2005;uid=sa;pwd=start;database=Vikas_Data");
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "seldata";
string pn = TextBox1.Text;
cmd.Parameters.AddWithValue("@pn", pn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Connection = con;
SqlDataAdapter adap = new SqlDataAdapter();
adap.SelectCommand = cmd;
DataSet ds = new DataSet ();
adap.Fill(ds, "table");
ReportViewer1.LocalReport.ReportPath = "MyFirst.rdlc";
ReportDataSource rds = new ReportDataSource();
rds.value=ds.Tables[0];
ReportViewer1.LocalReport.DataSources.Add(rds);
ReportViewer1.LocalReport.Refresh();
}
}
there is no error .but data will not be show in report viewer.
please help me .as soon as possible .what may be the issue.
|
|
|
|
|
You might want to try clearing the existing data sources first with
Me.ReportViewer1.LocalReport.DataSources.Clear()
and possibly in the form.designer.vb comment out the lines which would have been added if/when you selected the report using the ReportViewer Tasks box
'Dim ReportDataSource1 As Microsoft.Reporting.WinForms.ReportDataSource = New Microsoft.Reporting.WinForms.ReportDataSource
and
'ReportDataSource1.Value = <the original="" data="" source="">'Me.ReportViewer1.LocalReport.DataSources.Add(ReportDataSource1)
I have found that almost every problem I've had with report viewer not displaying the report was to do with data in some way or another.
Have you confirmed that your adap.fill line is actually putting some records into the dataset?
Hope this is of some help.
|
|
|
|
|
Hi there, my company's software product has a feature that allows users to generate forms from Word templates. The program auto fills some fields from the SQL database and the user can fill in other data that they desire. So we have a .dotx template that holds the design of the form, and then the user gets the .docx file to fill out when they call it from our program.
The problem we're having is that some of our users have been finding that the forms take an exceptionally long time to open up and then, once open, are so slow to respond (scroll around, etc) that they're unusable. So in my investigations so far, I've found out that the problem systems are one with lower powered CPUs (unfortunately it happens for systems above our system requirements) and the Word forms that cause the problems are ones with large amount of ActiveX style checkboxes on them. I verified that reducing the ActiveX checkboxes fixes the form loading problems.
So I have the following questions about solutions (we're using Word 2007):
1) Is there any way to configure Word, or some other settings, so that there won't be such a strain opening a Word form with lots of ActiveX checkboxes? Any way of speeding up Word's opening?
2) Using Legacy style checkboxes instead of the ActiveX ones makes the forms load fine, but it looks like the user has to double-click the checkbox and change Default Value->Checked. Is there a way to configure it so that they can simply click on the checkbox to tick it? "Legacy Forms" checkbox as a name kind of worries me (Legacy…), does that mean a future version of word at some point wouldn't load the checkboxes because they're "legacy"?
3) Yes, it became clear to me after a little bit of research into solutions that Word is not the tool for the job for forms like I'm describing. InfoPath seems to be exactly what we should have been using all along but unfortunately I wasn't involved in the decision making or development of these forms, just tasked with coming up with a solution.
I'd appreciate answers to any of these, or if anyone has any other ideas for solutions to this problem.
Thanks
|
|
|
|
|
I have written the following code in windows
---------------------------------------------
TextBox1.Text = Application.ProductName + "." + acode.Text;
System.Reflection.Assembly tempAssembly = System.Reflection.Assembly.GetExecutingAssembly();
Form frm1 = new Form();
Form frm1 = (Form)tempAssembly.CreateInstance(TextBox1.Text);
frm1.show();
---------------------------------------------
Here error is been generated,in frm1.show() line,object reference not set to an instance of the object.The TextBox1.Text contents are not
been displayed in frm1 which is the instance of Form and getting null
value
Please suggest me the solution to the error above.
Thanks
Ramesh
|
|
|
|
|
There is at least one obvious problem:
Form frm1 = new Form();
Form frm1 = (Form)tempAssembly.CreateInstance(TextBox1.Text);
The first of these two lines sets frm1 to be a new instance of a Form .
The second line then tries to change frm1 into whatever you have in TextBox1.Text , unfortunately whatever you have there cannot be found so frm1 is set to null which is why you are getting the error.
You probably do not need the first line.
If you show an example of what might be in acode.Text people might be better able to help you.
In the interim you might want to try:
Form frm1 = (Form)tempAssembly.CreateInstance(TextBox1.Text, true);
Which tells CreateInstance not to worry about the case of the parameter text, just in case your acode.Text is correct except for the case.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Member 4470223 wrote: Form frm1 = new Form();
Form frm1 = ...;
that does not compile without errors, does it?
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
I'm looking to design a windows form application. My idea for the interface is to have a tree view on the left of my form as a menu structure to navigate between functions and the rest of the form to display the different 'screens'.
Basically what I'm imagining is something that resembles a deck - a vertical stack of screens where only one is visible at a time, similar to a TabControl but without the actual tabs.
My first attempt involved using Panels, but I couldn't switch between the panels in the design view.
Is this sort of functionality possible? if so, any ideas would be greatly appreciated.
|
|
|
|
|
Extend a TabControl. Call it say CustomTabControl. The idea is to remove the tabs. So, you get the functionality you want. There are many articles here on how to have custom tab controls. You basically need to tweak following properties.
ItemSize = (0, 1)
SizeMode = TabSizeMode.Fixed
Appearance = TabAppearance.Buttons
|
|
|
|
|
That seems to do what I wanted. Thanks!
|
|
|
|
|
In my searching I also found a PanelManager created by Mick Doherty:
http://dotnetrix.co.uk/custom.htm[^]
It works similarly, but provides easer navigation between panels.
|
|
|
|
|
hello
dear friends i have a problem
that i have added checkbox in datagrid view its working properly but i want to select all checkboxes at a time can anyone tell me how can i do that
i have added checkbox in gridvew from gridview collection poperty
|
|
|
|
|
You might have to go through this article.
|
|
|
|
|
I think this is a windows forms. The article corresponds only to ASP.Net.
|
|
|
|
|
|
What would be the most practical Regex pattern for a whole-word-only search?
Example: Match "life" but not "life's"
|
|
|
|
|
Okay, never mind. NOW I know what the ExplicitCapture option does.
|
|
|
|
|
Hello
i need some help
i have developed a sms software on c# ,i have used gsmcommm and pduconverter its working but its just sending 160 char message and i need to send long messsages can any one help me plzzzz
Regards
|
|
|
|
|
You should have found out what SMS stands for first and how it works, Short Message Service. The message limit is 160 characters by specification. You'll have to break up longer messages into multiple 160 character limit messages.
|
|
|
|
|
can you plz guide me how can i break up message and send it
when i breakup message will reciever get it in one message or in multiple messages?
|
|
|
|
|
You've got to be kidding me?? You mean to tell me that you don't have the skill to get the Length of a string (your message) and how to grab SubStrings of 160 characters in length? If you can't do this, then I highly suggest picking up a beginners book on C# and working through it before you attempt to write another application. This is very basic "Strings 101" stuff you're asking about.
|
|
|
|
|
i know how to break up message after 159 char but when i break it in to mutiple messages and send it to any number the reciever recieve it in multiple messages
the thing i want is that when i send it the reciever got it in a single message.
|
|
|
|
|
eraser950 wrote: i want is that when i send it the reciever got it in a single message.
You have no control over how the reciever recombines, or more acurately, does NOT recombine them. You cannot force the reciever to put the message back the way you want it. They will get each as a seperate message and there is nothing you can do about it. Thatose are the limitations you chose to tolerate when you chose to use SMS as a communication medium.
|
|
|
|