|
tek 2009 wrote: i d'ont know how to parse the data from de file line by line, if you can complete the code , thank you
Good try, but we are not here to write your programs for you. Take a look at the System.String[^] class and make use of some of its methods to get the results you are looking for. If you really don't know how to get started then try working through this book[^] which contains lots of useful tutorials.
It's time for a new signature.
|
|
|
|
|
Hi All,
I have a Form with a Datagridview. The datagridview contains more columns than in the visible area.
Now to my problem:
If I scroll to the right of the datagridview and then select a row or multiple rows the datagridview moves to the left so that the first columns are in the visible area. I would like to keep the columns currently shown to stay in the visible area.
I hope my question is clear and someone can help me.
Thanks
Andre
|
|
|
|
|
It is default behavior of datagridview control.
You cannot change it.
There are two tricks to avoid it.
1. You need to minimize the number of columns to display by hiding some of the columns.
DataGridView1.Columns[2].Visible=False;
2. You can change the order of columns so that the columns that require to be visible
for selecting rows comes first so no need to scroll to right side of the grid.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
|
Do not cross post in multiple forums. It is considered rude and make it very difficult to colaborate on answers.
I already answered your question in the VB.NET forum.
|
|
|
|
|
And I have in Q&A
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.
|
|
|
|
|
Thank you both...
I removed the message.
|
|
|
|
|
i'm trying to trigger the mouse right click event on a from control , and i know we can use the context menu, but i don't need a context menu i just want get some data when mouse right click is done on a record of the gridview , how can i catch the mouse right click, any idea ...
|
|
|
|
|
Use the mousedown event and check the eventarguments to see if it's the right button that is clicked.
Good Luck
|
|
|
|
|
Both left and right click can be trapped by using the MouseDown event.
Various mouse down events are trapped in the code below.
private void form1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) <br />
{<br />
Point mouseDownLocation = new Point(e.X, e.Y);<br />
<br />
string eventString = null;<br />
switch (e.Button) {<br />
case MouseButtons.Left:<br />
eventString = "L";<br />
break;<br />
case MouseButtons.Right:<br />
eventString = "R";<br />
break;<br />
case MouseButtons.Middle:<br />
eventString = "M";<br />
break;<br />
case MouseButtons.XButton1:<br />
eventString = "X1";<br />
break;<br />
case MouseButtons.XButton2:<br />
eventString = "X2";<br />
break;<br />
case MouseButtons.None:<br />
default:<br />
break;<br />
}
My signature "sucks" today
|
|
|
|
|
How to Split a DataGridView using C#?
|
|
|
|
|
How you want to split datagridview ?
Do you want to provide paging in datagridview ??
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Hi all,
I have an scenario, I have to merge some dynamic content (to say data retrived from DB) in an existing word document without losing the existing content in that document. So that when ever there is a new conent, i use the same word document file and append my content. Please suggest me how to do this, else provide me some URL to learn and do using C#.
Thanks in advance
Know is Drop, Unknown is Ocean
|
|
|
|
|
|
Hi everyone,
Suppose that you have some partly damaged file that you want to copy to somewhere else reading only the good bytes and ignoring the ones that can't be read "getting over them".
I'm using a simple StreamReader in a loop and ignore IOExceptions as they occur but it doesn't work and go very wrong once a cyclic redundancy is encountered..
What would you use?
|
|
|
|
|
You should probably use a FileStream[^] as it allows you to read the file at the pure byte level. in this way you are free to interpret the data without any assumptions made by the framework. You can also position your file pointer randomly hence avoiding portions of data that you know are corrupt.
It's time for a new signature.
|
|
|
|
|
Thanks, I should try that.. Excuse my late reply and most importantly the vote.
Cheers,
Muammar.
|
|
|
|
|
No problems with late reply, and thanks for the feedback. I hope it works out for you.
It's time for a new signature.
|
|
|
|
|
Hi Code Gurus
I need to load the PDF document inside the c#.net Application. I tried with PDF Viewer. If i did any changes in PDF form Field i need to track that also. This is not possible in PDF Viewer. So i need any other Control or Way to load PDF inside the Application.
Please send me the Code snap or project link to resolve this problem.
Thanks in advance..
With Regards
"FAKEER"
|
|
|
|
|
Fakeer wrote: Please send me the Code snap or project link to resolve this problem.
Well Fakeer that is not going to endear you to the forum, asking for the code is frowned upon.
So if you need to edit the PDF you need a PDF EDITOR not a viewer. There are plenty of them around. try doing some research[^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Here is a C# pdf viewer sample developed using a third party sdk called Black Ice.
My signature "sucks" today
|
|
|
|
|
Is there option to convert from System.Linq.IQueryable to DataTable with some sort of ToDataTable() function, and avoid looping? Both approaches on
http://www.c-sharpcorner.com/UploadFile/VIMAL.LAKHERA/LINQResultsetToDatatable06242008042629AM/LINQResultsetToDatatable.aspx gives me similar speed efect, but I need speeder. Actually I am wondering if there is something like http://msdn.microsoft.com/en-us/library/bb386921.aspx but with using System.Linq.IQueryable instead IEnumerable? I have few functions that sends System.Linq.IQueryable parameter to this function expecting DataTable[] in return.
Best Regards,
Zex
modified on Wednesday, May 26, 2010 6:26 AM
|
|
|
|
|
I did a search on the internet and found some posts.
This post might help you - it is not the exact solution you are looking for but is similar.
My signature "sucks" today
|
|
|
|
|