|
Have you figured this out? Not quite sure what you were asking for?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hi
I need one help from you,
We are using webdav method,
When reply a one mail, How to set the conversationIndex Property
through webdav method.
because we want track the conversation Mails thread,
Which property is to identify the thread mails
I saw some forums conversationindex property is used to identify the thread mails ( differ 5 character at end of every mail)
But when we use webdav method, the conversationIndex property is confusing .
What is the way to identify Thread Mails
How to identify first Mail of the Thread?
Any body please send reply me.
|
|
|
|
|
Hello everyone!
I'm working on a project(C#.NET) where I want to highlight the entire "row" of a treeview.
The row is of course the active one!
I've been looking at an example that overrided the WndProc method(of course, I can't find the url to it anymore... )
Is there an easy way to do this?
If not, can anyone please give me some advices?
Thanks a lot!
-Skardal-
My webpage: www.skardal.com
-- modified at 6:56 Wednesday 18th April, 2007
|
|
|
|
|
Hi,
In My Datagrid i have shoen the values from tables like passport no,passenger name,travel date,tour_code.
But when i click on the column Heading it is convered to Passport_no(ASc) & againi click to Passport_no(Desc) that is it just changing the heading but not actually ascending the values or descending the values of a column.
I have set all sort expression for each column
and in onsortcommand i write
<
#region DataGridSortCommand Event
public void doSortDataGridItem(object sender , System.Web.UI.WebControls.DataGridSortCommandEventArgs e)
{
SortingDataGrid.sortDataGridByValue(dgHistory,e);
}//End of this event.
#endregion
>
This is the method i used for the sorting
<
public string sortDataGridByValue(DataGrid datagrid, System.Web.UI.WebControls.DataGridSortCommandEventArgs e)
{
oColumnCollection=datagrid.Columns;
foreach (DataGridColumn oCol in oColumnCollection)
{
if(e.SortExpression.CompareTo(oCol.SortExpression)== 0)
{
oCol.HeaderText=oCol.HeaderText.Replace(" (ASC)","").Replace(" (DESC)","");
if(e.SortExpression.IndexOf(" ASC")>1)
{
oCol.SortExpression = e.SortExpression.Replace(" ASC", " DESC");
oCol.HeaderText = oCol.HeaderText.Replace(" (ASC)","");
oCol.HeaderText = oCol.HeaderText + " (DESC)";
return oCol.SortExpression;
}//End of inner If Block.
else if (e.SortExpression.IndexOf(" DESC") > 1 )
{
oCol.SortExpression = e.SortExpression.Replace(" DESC", "");
return e.SortExpression;
}
else
{
oCol.SortExpression = e.SortExpression + " ASC";
oCol.HeaderText = oCol.HeaderText + " (ASC)";
return oCol.SortExpression;
}
}//End of if block.
}//End of For loop.
return "";
}//End of method
>
|
|
|
|
|
I think the best way to sort something is usually in a DataView. If you current datasource is a datatable then you need to do something like:
DataView dv = dataSet.Tables[0].DefaultView;
dv.Sort = "columnName ASC";
datagrid.DataSource = dv;
datagrid.Databind();
Hope that helps.
Ben
|
|
|
|
|
i have a stupid problem. i show my form, close it and try to show it again, but i get an error saying i'm trying to access a disposed object. how can i prevent that? i must be missing something obvious.
thanks.
|
|
|
|
|
You're trying to reuse a disposed reference. This occurs because you have created an object which has subsequently been disposed. What you need to do is something like the following:
private void CreateMyForm()
{
using (MyForm myForm = new MyForm())
{
myForm.Show();
}
} Then call CreateMyForm whenever you want to create an instance of this form.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
You can use GC::KeepAlive(yourForm)
|
|
|
|
|
I've had a similar problem. My solution was to catch the FormClosing event, and when e.CloseReason == CloseReason.UserClosing , set e.Cancel to true and Hide the form.
A little learning is a dangerous thing;
Drink deep, or taste not, the Pierian Spring.
—Alexander Pope
|
|
|
|
|
Have you seen the 'Columns' property for DataGridView tool.
How to display a dialog box for a property like that?
I designed a user control with lots of property in it.
I think it will be better for the user to set these properties through a small window like
in datagridview 'Columns' property.
Any idea?
Plz Help.
Aswin. S
|
|
|
|
|
|
i have a gridview and bind it to datasource. gridview has a bounded boolean column. i want if grid to be not editable expect those cells in the boolean column where value is false.
in other words:
all columns are readonly expect the boolean column not readonly.
if the value of the cell in boolean column
1- true: the cell is readonly
2- false: the cell is not readonly
i tried this code but i do not know why it does not work.
For Each x As DataGridViewRow In DataGridView1.Rows
If x.Cells("DeductionAdded").Value.ToString.ToLower = "true" Then
x.Cells("DeductionAdded").ReadOnly = True
End If
Next
|
|
|
|
|
Hi
1) Fetch your data to datatable
2) Bind data table to the datagrid.
3) then, you can use your previous code.
Now it works fine.
Thanks.
Gopal.S
|
|
|
|
|
I'm creating my own custom control as part of a level editor for a video game. The video game is two-dimensional and is composed of square tiles. The basic idea is that the user has a toolbar containing square images, and that when the user clicks on a tile on the map, that tile is filled with the corresponding image. The user also has the option to click and drag to create a selection rectangle, thus allowing a range of tiles to be filled simultaneously.
The initial implementation initially worked well. I was able to create a control showing all the tiles, and allowing individual tiles to be filled. I even got it to the point where dragging the cursor would "highlight" the borders of tiles that were going to be filled. However, I ran into a performance problem when the number of filled tiles increases. The problem is that I was invalidating the form everytime the mouse was moved (to draw the selection rectangle and highlight borders), which caused all of the images to be repainted as well.
I made several modifications to attempt to increase performance. The first choice was to enable double buffering, which reduced flickering and improved performance a little. The second mod was to change the invalidate method so that the control was invalidated only when the selection rectangle selected new cells. This resulted in a less-smooth selection method, but increased performance a little. Realizing that invalidating the entire control was wasteful, I made it so that only the "changed" region was invalidated (the region enclosing both the new and old selection between mouse movements). This helped performance as well, but only minimally.
Since performance was quite good when there were no filled tiles, the obvious problem is redrawing all of the images (imagine a 20 x 20 grid of 48 x 48 pixel images, so rougly 400 individual images). Despite the fact that double buffering was used, I realized that the images never really need to be painted until AFTER the selection rectangle has finished. So, my next mod focused on keeping a cached bitmap of the current viewing area in the back ground, and in the paint method I just combined this cached background with the selection rectangle when the mouse was moved. When the mouse was released (which invokes an action to fill the cells), I would update the corresponding region on the cached bitmap. The problem with this method is that it still caused the tiled images to be painted each time the mouse was moved (even if the tiles were batched rather than individually drawn, although this may be redundant with double buffering enabled).
I then searched for a way to minimize the number of times that I would draw the background. I came up with the idea of having a double-layered control - the bottom layer would contain the bitmap of the images, while the transparent top layer would ONLY display the selection rectangle and the highlighted grid. This seemed to be the perfect solution - on a mouse move, I would only have to invalidate the top layer and repaint a collection of lines while the tiled image background could be left untouched. When the mouse was released, I would only have to update the bottom layer of the control once, and let it show through the transparent top layer. In order to accomplish this, I had to create a [true] transparent control (through the modification of the CreateParams flags, instead of just using the "fake" transparency where the backcolor of the control is set to the backcolor of the owning form). Of course, there was a problem. The problem is that (from what I've seen, correct me if I am wrong) transparent controls simply copy the contents of whatever is beneath them in Z-order onto the control itself, rather than simply not painting "transparent" regions. The result of this is that when drawing the selection rectangle, the region never clears itself and a new selection rectangle is drawn each time the mouse is moved, along with all the previous rectangles. When attempting to clear the top-layer graphics manually, the area "beneath" the control is no longer visible (it clears the copied transparent image).
I've grown quite frustrated with this, and I was hoping someone could suggest something that I haven't thought of. If not, the only solution I can see is moving to a graphics-accelerated implementation using OpenGL or DirectX. Thanks in advance for any help.
|
|
|
|
|
OK, this might sound simple but it's driving me mad!
I have a master table with a foreign key linked to the PK on a child table. I want to bind a list box to the master table value but with the list box populated from the child table values and have this change with the underlying next/prev movements and be updatable (select the textual description and the key value is written back).
Sorry if this is numpty like but I really need to get this done quickly and easily (using the GUI as it's all done with whizzy buttons and drah and drop rather than properly written)
Any help would be great,
Thanks,
Adam.
|
|
|
|
|
Have you figured this out or still working on it?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
i was working with VS.NET 2003 and i use some language in my forms and after that i converted my project to .NET 2005.
my problem is:
i started my work with .NET2003
i used some other langauge (Arabic)
then i converted my Project to 2005
then i got an error:
"Error 18 Unable to embed resource file 'C:\Documents and Settings\mdallal\Desktop\New Folder\Al-Ghad\HRProject\HR_UI\obj\Release\WindowsApplication1.termination_type.resources': System Error &H8007000e&"
each time i change the code and build the project i get this error, my solution was to close the VS and re-open it again and build the project. but i wanna to solve this problem not take around
any idea
|
|
|
|
|
Have you figured this out or still working on it?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hi how to validate two textbox values. ex, there are two textboxes, password and confirm password.. I want to compare these two. we can use comparevalidator in ASP.net. how can we do in windows forms..? can any one send me code? thanks in advance? am using asp.net 2.0 and C#.. I have used errorProvider control.
see the following code..
if (txtFirstName.Text.Trim().Length == 0) // working fine
{
errorProvider1.SetError(txtFirstName, "This Field Can not be empty.");
}
if (txtUnitID.Text.Trim().Length == 0) //working fine
{
errorProvider1.SetError(txtUnitID, "This Field Can not be empty.");
}
// not working
if (txtPassword.Text.Trim() != txtConfirmPwd.Text.Trim()) // not working.
{
errorProvider1.SetError(txtConfirmPwd, "Password not matched.");
}
I have written this code in save button click event. ex, if pwd is not equal it not showing error message. wat is the problem..?
|
|
|
|
|
i tried it in vb.NET and its work fine my code is:
If TextBox1.Text.Trim = TextBox2.Text.Trim Then
MessageBox.Show("Yep")
Else
MessageBox.Show("Nep")
End If
i dunt know where is the error
|
|
|
|
|
Application Type: Windows Application (.Net 2005)
Development Language: C# .Net
Back End: MySQL
I have a requirement to select multiple rows in DatagridView as I select check boxes in the particular row and do bulk operations on the selected rows.
(The same case as in Shopping Cart grid having item detail columns as well as check box column to remove multiple items at a time in web application). But I can not achieve the same functionality in windows. Can you please help me how to do this?
Regards,
Tarang Pandya.
Software Engineer.
|
|
|
|
|
All,
I am looking to buy a component suite, mainly to get a good data grid. Performance is a must.
It looks like Infragistics and DevExpress are the most popular ones. Any opinions on which one to choose?
Thanks in advance,
Roel
|
|
|
|
|
My honest opinion...stay away from both, especially if all you need is a data grid control.
The Infragistics controls have an excellent visual look to them and are very customizable using themes, but the programming model is awkward at best and not very well documented. DevExpress controls, on the other hand, are a much better programming model and better documented, but have subtle visual problems.
If all you need is a data grid, check out SandGrid[^] from Divelements. I have used several of the Divelements controls and find that they are very easy to program to, have a very clean look, and are pretty well documented.
[Disclaimer: I'm not affiliated with Divelements in any way.]
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
You should really download the evaluation editions and try them out yourself. This is the only way to find out which one best meets your needs.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I keep reading here and there that Infragistics controls, especially the grid, do not perform well. Anybody has any experience with or comments on that?
Roel
|
|
|
|