PrintDialog: Customize for ALL apps
Not sure where to post this question.
I need to make a change to the standard PrintDialog, or have another form
popup along with it. I need to track the 'client to be billed' for each
print job, along with number of pages. One solution I see would be to
change the standard box, so when a user clicks Print in any app, they are
presented with a dropdown list of clients, and a record is added to a DB
with the selected client and the number of pages.
Another method may be to 'intercept' windows messages headed to a
printer????
Can someone guide me in the right direction here? I write in VB (VB.NET).
Thanks!
Kevin Tag: Locking Textbox Tag: 71679
adding component dynamically
I have a windows forms custom built requiredfieldvalidator. It is a component, not a control, and I would like to add the component to the form dynamically at runtime. I've tried adding it to the components field of the Form with no luck. Anyone else try and do this before and have any ideas? Since it is not a control, Controls.Add does not work. Tag: Locking Textbox Tag: 71678
Given a handle, set focus to the form, how to, please?
Hi! I am trying to solve the problem of Ctrl+Tab to navigate between child forms of an MDI container. The problem is when
the child forms host the infamous WebBrowser control, doing Ctrl+Tab will not activate the next child form. It takes 4 Ctrl+Tab's to activate the next child. I have the toolbar and statusbar controls on all child forms and that's where Ctrl+Tab is going before switching to another form.
To make the short story long, I am intercepting the keyboard events using PreFilterMessage() and raising a notify event to the parent form. I pass the child window's handle to the parent. That's where I wish to remove focus from the child form and set the focus to the next form in MDIChildren list. I am having a hard time
1) Based on the handle, remove the focus from the child form. How, please
2) Finding the next child in MDIChildren and setting focus to it. How, please
Am I on the right track ? Am I doing something really stupid(probably)
Any input is greatly appreciated
Thank you in advance
--Sam Tag: Locking Textbox Tag: 71672
Server Alive
I have written an application that runs stand alone on a users machine without being on the company's network. However, there are certain pieces that requires the user to be on the network. I would like to disable these if the user is not on the network. Currently I have a method that checks if a directory path exists (a network directory) to determine if the user is on the network. This has proved inefficient as it sometimes takes a few seconds for the method to work. I need something more efficient to let me know if the user is on the company's network
SystemInformation.Network just tells me if a network is present regardless if it is the company's network or some other the user has connected themselves to. Thus this property would not help me
Any insights would be great! Tag: Locking Textbox Tag: 71663
Resx losing resources?
My form's resx file is losing resources that I have added with ResEditor.exe
(the utility that ships with VS.Net. Here is what is happening: I add the
icon to the .resx file with no problems. My app calls the resource, using
the following code:
System.Resources.ResourceManager resources = new
System.Resources.ResourceManager(this.GetType());
this.Icon = (System.Drawing.Icon)resources.GetObject("Scenario.Icon");
The call works fine, but the icon is deleted from the .resx file. If I try
to call up the resource again, it's not found. I confirmed with
ResEditor.exe that the icon is no longer in the .resx file.
Can anyone tell me why this is happening? Thanks.
Dave Veeneman
Foresight Systems Tag: Locking Textbox Tag: 71659
File Explorer control
Does anyone know of a free File Explorer control in .NET? I would really rather not build my own with a TreeView. I see that there is a FileDialog but I want to have the explorer as a control on the form
Thank you
Travis Tag: Locking Textbox Tag: 71651
Multi threading apps and raising events
Hi,
I have a multi threaded windows app.
I have the main thread that spawns a thread pool to download multiple files.
In case one of the worker thread throws an exception, how is it propogated ?
i.e. would the exception handler be called on the worker thread or on the
main thread ?
Secondly, if the worker thread needs to raise an event how should it do it
?? Should it invoke a method on the main thread or directly raise the event
(reason for asking this is because the documentation says that events are
raised on the working thread)
Thanks in Advance Tag: Locking Textbox Tag: 71645
Change Data Form Wizard
HI
I wan to to modify data form wizard before code generation. Can i do it ? How
Thanks in advance, Tag: Locking Textbox Tag: 71640
WYSIWYG Designer
Hi,
I am trying make a WYSIWYG Designer with Drag and drop. Something similar to
the ASP.NET desginer which dosent generate code but stores the information
to a database. But I am unable to find where should I start I am unable to
visualize or decide what should I start with.
Can anybody point me to the right direction.
Regards,
Virag Tag: Locking Textbox Tag: 71638
docking windows
hi guys
I am developing a VB.NET windows application. Is there any facilities to have a dockable windows just like in Visual Studio.NET ID Tag: Locking Textbox Tag: 71637
Synronizing richtextbox and panel scrollbars
Does anyone know how to synronize richtextbox and panel scrollbars!
I've a panel with two component, richtextbox and panel, and i want to scroll panel whenever user scrolls richtextbox. Tag: Locking Textbox Tag: 71636
creating a MDI application - child form question??
hi there,
i created a very simple VB.NET windows application with forms, form1 and
form2.
Form1 has been set to isMDIContainer=true, but i cant find a property for
form2 to set it to mdiChild?? am i missing something here??
thanks,
P. Tag: Locking Textbox Tag: 71629
Invisible toolbar buttons
I have added a toolbar to my WinForms app. The toolbar has 3 buttons and a
separator. I have associated an imagelist with the toolbar and setup the
images and buttons appropriately.
At design-time I can see the bitmaps on the buttons, but when I run the
application the buttons are blank.
After googling around a bit I saw that some people got around this by making
sure that
this.toolBar.Buttons.AddRange (in InitializeComponent()) came at the very
bottom of the toolbar section. I made this change but it did not affect the
results.
Can anyone think of anything else that might be going wrong here?
Thanks,
Tom Tag: Locking Textbox Tag: 71613
finding application directory
Hi,
How can I find the directory where my application resides or where it was
launched from?
There are .Net functions that give current directory but not the application
directory.
Thank you
Vadim Tag: Locking Textbox Tag: 71612
copy contents of data grid to clipboard
Hi,
I want to copy all contents or selected content of data grid bound to a datasource(sql Server) using copy(Edit menu) to a clipboard. I'm new to asp.net. can someone explain me how to do?
Thanks,
--------------------------------
From: Kalpana A
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>J7I/qIijtky50IOA2Fe7Pw==</Id> Tag: Locking Textbox Tag: 71611
An solution ?
(Type your message here)
--------------------------------
From: dahwoud dahwoud
I've got the same problem ... have you find a solution ?
thanks
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>WHYI+vr1PEuBucPVxUQy8w==</Id> Tag: Locking Textbox Tag: 71610
Changing Application Context
Hey All,
I'm using application=2Erun(context) to open the main screen of my=
application=2E What I would like to is based on a menu choice,=
close the main screen and open a new one=2E I can't close the=
main screen though since that will close the application since=
it is defined as the context=2E How can I change the context of=
the application? If I can't how can I accomplish this?
Thanks,
John
-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)
<Id>ii4q2avfWk2+oSW1fIy7hg=3D=3D</Id> Tag: Locking Textbox Tag: 71609
Scroll bar disabled in data grid
Hi,
I have a problem with the datagrid=2EThe scroll bars that=
automatically appear for a data grid are disabled=2EThis makes=
some columns of the datagrid unreachable=2E I have added more=
explanation=2E Urgent help is needed=2E
There are 2 panels on my main form=2E These are hidden depending on=
the user's choice=2E The first panel is used to show the user's=
history records=2EThe second panel is made visible(first panel is=
made invisible) whenever the user wants to add/modify=
records=2EAfter he is done adding/modifying a new record,the first=
panel is shown again=2E(2nd panel is made invisible)=2E
For displaying the records on the first panel, i use a=
datagrid=2EThe data is obtained from a table and i use the=
Datasource member on the datagrid to bind it=2E A datagrid=
automatically shows horizontal and vertical scroll bars if the=
data cannot be simaltaneously displayed=2E This behavior is=
displayed until i hide the first panel for adding/modifying=
data=2EAfter i add/modify the record and then make the first panel=
visible again, the scroll bars(both horizontal and vertical) are=
disabled,even though there are portions of data that i cannot=
see=2EThey are enabled only if i sort the=
datagrid=2ESelecting/unselecting a data row does not make them=
enabled=2E
I tried Invalidate(),Refresh(),Update() methods on the datagrid=
to make sure that its drawing again=2EBut,to of no use=2E
If you need any additional information, please let me know=2E
Thanks,
Subash Gutala
--------------------------------
From: subash gutala
-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)
<Id>bvP8OJ4MDUmBsAqUtcwBYg=3D=3D</Id> Tag: Locking Textbox Tag: 71608
Windows Form Tab Ordering Problem
(Type your message here)
--------------------------------
From: Irwansyah Irwansyah
Hi all,
I have a problem with tab ordering in windows form=2E I put a panel=
in my form, and then some text boxes and several group boxes in=
it=2E In each group box I also add text boxes and comboes=2E How do=
I set tab index for each text boxes and combo so each of them=
get a right order??? I have set the tab index in the correct=
order using View | Tab Order menu, but it's seem when the text=
boxe or combo is in the other container/group boxe than it=
doesn't work=2E Can any one give me advice on how to do it??
Tx all
-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)
<Id>Kv85J98BVkynXnOb9FnXwA=3D=3D</Id> Tag: Locking Textbox Tag: 71606
Help access text value of bound control
I'm trying to access the value of a text box that has been bound=
to a data table=2E The binding is working and the value is=
displayed in the text box=2E=2E=2E however, when I try to access the=
value (because I need to make a calculation based upon it), all=
I get is an empty string=2E
HERE's THE BINDING
txtBalanceDue=2EDataBindings=2EClear()
fldBind =3D New Binding("text", dt, "Balance")
AddHandler fldBind=2EFormat, New ConvertEventHandler(AddressOf=
DecimalToCurrencyString)
AddHandler fldBind=2EParse, New ConvertEventHandler(AddressOf=
CurrencyStringToDecimal)
txtBalanceDue=2EDataBindings=2EAdd(fldBind)
HERE'S THE CODE TRYING TO ACCESS THE TEXT BOX TEXT VALUE
dim val as string
val =3D txtBalanceDue=2Etext
val is an empty string ("")
I'm obviously missing something simple here and Would appreciate=
any help=2E
TIA,
SA Watters
--------------------------------
From: Susan Watters
-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)
<Id>CxQfhZPmX0qivgeNawZbdg=3D=3D</Id> Tag: Locking Textbox Tag: 71605
Databinding problem
I thought I had this figured out, but apparently I did not.
I have a list of objects, lets just use Person as an example. The list implements IBindingList. One of the properties of the object is Address, which is an Address object.
Binding the list of Person objects to a datagrid produces the anticipated results, each of them shows as a row in the grid. You can even click the 'plus' and navigate to the Address object. Great. What I want to do though is to show JUST the addresses in the list. I don't want to see the individual information at all, just the addresses corresponding to the individuals.
What I tried was:
binding = new Binding("Datasource", personList, "Address")
Grid.Databindings.Add(binding)
Unfortunately, what this does is show the ONE address of the current Person. Which is great if there is only one Person in the list, but if there are more than one it only shows a single address. So how do I do what I want? Tag: Locking Textbox Tag: 71604
TextBox.Focus() doesn't focus
I have a textobx that appears on a tab page. I'm trying to set the focus on
that textbox but it doesn't seem to work. The focus always defaults to a
button that is on the form (but not on the tab page).
Any ideas? I tried focusing on the tab page and then on the text box to no
avail.
Thanks,
- Kevin Tag: Locking Textbox Tag: 71602
winformreports
To All that used winformreports for printing:
I need to use the basic PrintForm() like in VB 6.0; I'm thinking of
downloading PrintForm.NET from www.winformreports.co.uk
Is that the correct software??
Which one did y'all use??
Thanx
Radith
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: Locking Textbox Tag: 71601
switching between 2 DataGridTableStyle objects mapped to the same table
Hi
I have a DataGrid which contains a DataGridTableStyle object in it, mappe
to my Customers table. Is there a way to add another another
TableStyle object to the DataGrid and set its MappingName propert
to the Csutomers table at runtime, switching between the tw
when necessary
Thanks guys ;) Tag: Locking Textbox Tag: 71599
Form.Dispose vs. Form.Close
What is the difference between: Form.Dispose and Form.close. They both seem
to destroy the object. Or should both be called when closing a form? if so,
in what order?
Thanks Tag: Locking Textbox Tag: 71597
ListView SubItems
In VB 6 I could assign a .Tag value not only to the ListItem, but also to
each of its subitems. I can't seem to find a way to do this in VB.NET
ListView Control/ListViewItem.
Is this possible? Any Examples?
Thanks Tag: Locking Textbox Tag: 71588
Recommend a c# forms book please
I see three choices for C# Windows.Forms.
1. Petzold - Programming Microsoft Windows with C#
2. Sells - Windows Forms Programming in C#
3. Brown - Windows Forms Programming with C#
Can anyone recommend a best book for a VB guy moving to C#?
Patrick Tag: Locking Textbox Tag: 71585
smart client, problem with a space in filename
hi,
i have a windows forms smart client, the executable name is "my app.exe".
running win server 2003 enterprise.
when i set a shortcut on the desktop to "http://localhost/exec/my app.exe",
the shortcut is reset to http://localhost/exec/my
and when i put quotes around it, windows adds a http in front of the quotes,
which is an invalid url.
i tried %20 instead of the space, but i get a fileNotFoundException for
my%20app.exe.
i can obviously choose a one-word file name, but it seems strange that IExec
wouldn't be able to handle it.
many thanks for any help
tim mackey.
---------------------------
67d0ebfec70e8db3 Tag: Locking Textbox Tag: 71580
what's the best way to detect click in child controls?
If I have ControlX that contains ControlY, and the user clicks on ControlY,
I want to catch that in ControlX. I know I could use the OnControlAdded
override to add a click event handler to every control added to ControlX,
but that only works one level deep unless I recurse through all the children
and also handle every child's ControlAdded event, which is kind of ugly. Is
there a better way?
TIA,
Bob Tag: Locking Textbox Tag: 71577
Win form pops up with no reason
Hi,
I am using C#.
I have a form (form1) with multiple controls on it. There is a button and
when it is clicked it opens a different form (form2). When form2 is closed a
method of form1 is run and form1 becomes active. On form1 there are multiple
text fields. The problem is that when the form1 becomes active (after form2
was closed) and the focus is in a textbox and I hit the enter key, the
second form (form2) pops up without any reason.
For the text box I handle the keypress event but when this happens the event
is not captured.
I do not understand why form2 shows up without any reason.
This happens only after form2 was opened and closed.
If the form2 was not opened and I hit enter in the textboxes everything is
working fine.
Thank you. Tag: Locking Textbox Tag: 71575
Tabpage Dynamically adding controls
I am completely frustrated trying to control the order that dynamically
created controls appear in a TabPage.
I have tried
tp.Controls.Add(myControl) in a loop which does not work.
I then added my controls to a Control array
Control[] oConts and tried tp.Controls.AddRange(oConts); which does not work
Then I tried, in addition to the above, looping through and explicitly
seting the childindex
with
tp.Controls.SetChildIndex(myCont,iIndex); which still does not work
Is this a known bug or am I overlooking something very simple??? Tag: Locking Textbox Tag: 71574
Suppressing paint event on forms
Hello
I need a way to disable form re-painting until I am done enabling and disabling all controls on the form. The problem I am having is that we have multiple objects (a security component and the specific business UI object) that will indepently enable and disable controls based on a user's role and the business rules of an object (for example, the user may have the rights to enter interview results, but if the applicant hasn't yet been invited, the Interview Results control will be disabled). We are using an Edit button on all our forms, so when that button is pressed, all the controls flicker on and off as the different objects run through their routines. What we want to do then is suspend form painting at the start of the various evaluations, let all the objects enable and disable the various controls, and at the end allow the form to paint the final state of all the controls. We looked into SuspendLayout, but it doesn't seem to cover our problem, plus it is too granular, applying only to the control it is called on. We would like to tell the form to suspend all re-drawing until we give the signal
Any help would be appreciated
Thanks
-Tod Tag: Locking Textbox Tag: 71573
combobox items, no tags?
how come combobox items have no tags? they do in win32 api, Am I missing
something or do combobox items really have no tags? how is one supposed to
identify items other than by strings? Tag: Locking Textbox Tag: 71572
Resize columns in a datagrid.
Anyone know how to resize the columns in a datagrid, I ve tried setting the
PreferredColumnSize, Invalidating and Updateing but to no avail.
Im sure it is pretty easy?
--
--
Br,
Mark Broadbent
mcdba , mcse+i
============= Tag: Locking Textbox Tag: 71571
Network Detection
When a user disconnects their wire to the network or those who use RAS disconnects - I need for my Winforms app to be informed the moment it happens. What is the best way to code this in C# ? Any examples or code snippets? Tag: Locking Textbox Tag: 71566
Setting focus in OnLoad not working
Hello
I have a few forms where I want to set the focus to a specific control thats
not the first one in the taborder.
Ive tried to do that in OnLoad but that doesnt work, the focus reverts to
the first control.
In one form where I just want the focus to change from a tabcontrols tabs to
the first real control I managed to get it to work by setting the focus in
the VisibleChanged event.
But in another one that I reuse for questions to the user (so the control
will be shown and hidden many times) that doesnt work either.
In what event should I be doing this? I cant change the taborder, it just
wont work with the controls (you cant set a tabcontrol to be selected after
its pages).
Thanks in advance,
Dan Tag: Locking Textbox Tag: 71559
slow transparent panel
Hi,
I have a form with a background picture on it. In this form there are
several panels with a transparent background.
The paint of the panels is very slow.
Is there a way to speed things up?
Thank's
Perry Tag: Locking Textbox Tag: 71557
Language attribute for exe and dll files
I have build my application (it's consist of 2 assemblies) and gets 2
files app.exe and app2.dll
So when I open Windows Explorer and click (right button :)) on any of
those files then select "Properties" from popup menu and than select Version
tab
the Language attribute value is always "Language Neutral".
It need to put there "English (United States)" but can't! (it's company
rules)
Using of
[assembly: AssemblyCulture("")]
[assembly: NeutralResourcesLanguageAttribute("")]
at AssemblyInfo.cs file gives no result. Always - Language Neutral
The application has no Multilanguage support. Only English.
Can someone help me?
We make several builds per day and I need automatic way to set this
attribute.
(I know that I can open exe or dll files at VS and change Language
attribute manually but I need automatic way)
P.S. All assemblies distributed from Microsoft have setted Language
attribute to "English (United States)". Hey, guys, how are you do this?
Thanks,
Alex Tag: Locking Textbox Tag: 71555
Save & Restore Object
Hello
I wrote a little dialog-form and now I want to do something like this
When the user opens the form the actual state of the complete form and all its controls is saved into a variable of the form itself. The user probably manipulates some controls but then the user clicks on the "Cancel"-button. Now the old state should be restored
How can I achieve this type of serialization. (I don't want to save the state to a file) Tag: Locking Textbox Tag: 71551
background logo image in MDI application
i've designed windows application in VB.NET using MDI forms. I actually like to have a logo image in the background of MDI parent. how can I achieve it?. Tag: Locking Textbox Tag: 71550
Windows Performance
hi,
I have a windows application that will be having abt 25 - 30 forms open.
I needed some performance stats regarding:
1. if i close the form, do i close it or just hide it. is there any gain in
hiding the form ?
2. Is it better to keep the form in memory or cache the data and re-populate
the form when it is again called for.
Any help is appreciated.
TIA :) Tag: Locking Textbox Tag: 71542
resizing
Hi All,
I have in my windows form, a set of controls which is Label, Edit, Label and
another edit. These are lined up horizontally. When I resize the form
horizontally, I want both the edit controls to grow by an equal amount.
which means
label 1 stays where it is
edit1 stays where it is but increases in width
label 2 moves horizontally but retains the size
edit 2 moves horizontally and increases in width.
Can this be easily achieved in the designer or do I have to write code for
it ?
TIA,
--Saurabh Tag: Locking Textbox Tag: 71540
Printing in .NET redundant?
Every article or piece of information about printing a Windows Form in .NET suggests that I have to
draw each control myself
But when a Windows Form is refreshed the Form::OnPaint(e) method is called, where e is of type PaintEventArgs
The OnPaint() base method ***DRAWS*** the controls and their contents into the graphics context (e.Graphics
So it seems to be very silly and a downright waste of time that I have to basically reverse engineer th
OnPaint() method to draw a form into the print handler's graphic context
Is there no way to just print what is already drawn by the OnPaint() method
Or is the necessary API purposely withheld by Microsoft
Thanks for any help here Tag: Locking Textbox Tag: 71530
Dynamic UserControls not rendering
After creating a custom web user control in a ascx file I can dynamically add an instance of this control to the web forms Controls collection at runtime, but it won't render. Anybody know why? Tag: Locking Textbox Tag: 71528
Using PropertyGrid to display a struct type attribute
I am using PropertyGrid to display some attributes, one of them is a
key/value pair struct.
When you click on the attribute, a standard dialog box will popup that I can
edit the values.
My question is how can I access this dialog box? For example, there is a
help button on this dialog box and I'd like to link some help information
to.
Appreciate any advice.
Thanks,
-Jinlin Tag: Locking Textbox Tag: 71525
TextWidth
In VB6 there was a function for the WindowsForm called TextWidth. This function when called passing a string you would return the width of the string as it will be displayed on your screen. With this I was able to appropriately set the controls width property with the contents of its text property. Making the text to be displayed in its entirety without being cutoff.
Is there a VB.NET equivalent? I looked around for this function and it no longer exists. Is there a system class that would do the same for me
Thanks... Tag: Locking Textbox Tag: 71523
forcing form to resize upon load
Hi! I am experiencing a peculiar problem with some old Active X control I am using in my C# winform. Once the form
loads, the control layout position withing the form is incorrect. As soon as I manually resize the form, the control's layout becomes as intended. I need to either fix the control (I am not sure if possible) or force the form to resize just a bit upon load. Is it possible
If yes, what can I do to do that?
Any ideas are greatly appreciated
Thank you in advance
--Sam D.. Tag: Locking Textbox Tag: 71521
DataGrid Sorting returns wrong values from dataTable
Hello,
I have a datagrid in my C# application. The Grid has 4 columns, one is a
Boolcoluumn, other 3 are string columns. Out of which bool column is
editable & the last column is editable too. Using DataGridColumnStyle i've
allowed Sorting to true for the whole Datatable. At a time the user is
allowed to Enable only one bool column for the whole Grid. I've handled this
using CurrentCellChanged event for that column by disabling all the row's
bool value & enabling the selected one.Whenever the user clicks the column
header to enable sorting either Ascending or Descending, it sorts
accordingly based upon the clicked column header.
The real problem is after sorting, when the user selects a particular bool
column, in the CurrentCellChanged Event it gives the correct Row Number
according to the selection, but using the Rownumber if i enable that
selected row, it selects a different one rather than the currently selected
row. The selected row happens to be the one which i've constructed in the
begining. After sorting it hasn't updated the DataTable. I tried calling
AcceptChanges() to the DataTable before selecting doesn't seem to work. I'm
not sure is this a bug or a limitation with respect to DataGrid using
DataTable & Dataset. Here's my sample code.
private void CreateDataGrid()
{
myDataSet = new DataSet("myDataSet");
myDataTable = new DataTable("myDataTable");
DataColumn
Parameter_cEnable,Parameter_cDefaultName,Parameter_cParameterInst,Parameter_
cParameterAssign;
Parameter_cEnable = new DataColumn("Select", typeof(bool));
Parameter_cDefaultName = new DataColumn("DefaultName",typeof(string));
Parameter_cParameterInst = new DataColumn("Parameter",typeof(string));
Parameter_cParameterAssign = new
DataColumn("AssignedName",typeof(string));
myDataTable.Columns.Add(Parameter_cEnable);
myDataTable.Columns.Add(Parameter_cDefaultName);
myDataTable.Columns.Add(Parameter_cParameterInst);
myDataTable.Columns.Add(Parameter_cParameterAssign);
myDataSet.Tables.Add(myDataTable);
DataGridTableStyle myDataGridTableStyle = new DataGridTableStyle();
myDataGridTableStyle.MappingName = "myDataTable";
myDataGridTableStyle.RowHeadersVisible = false;
myDataGridTableStyle.ColumnHeadersVisible = false;
myDataGridTableStyle.AllowSorting = true;
myDataGrid.SetDataBinding(myDataSet,"myDataTable");
}
PPLCols.DG_Selection is the bool column
private void __ParmVar_DT_CurrentCellChanged(object sender, System.EventArgs
e)
{
DataGrid dgLocal = (DataGrid)sender;
if (dgLocal.CurrentCell.ColumnNumber == (int)PPLCols.DG_Selection)
{
foreach(DataRow myRow in this.__ParmVar_DataTable.Rows)
{
myRow[(int)PPLCols.DG_Selection] = false;
}
myDataTable.Rows[dgLocal.CurrentRowIndex][(int)PPLCols.DG_Selection]
= true;
__CurrentRowIndex = dgLocal.CurrentRowIndex;
}
}
Any help will be appreciated.
Thanks,
Vijai Tag: Locking Textbox Tag: 71520
DataGrid - Tab skips my custom column
If you take the combobox column style from somewhere like the datagrid
faq at syncfusion.com and replace the combobox with a button or
another textbox and then fix up the code to compile and run, there
will be a problem. When tabbing into the column in question, the focus
will enter the column on the tab key press, and move on to the
following column on the tab key up. This is obviously not what is
desired.
The reason I ask is that I wrote my own databound combobox control
(because the Winforms one stinks - can't turn off the border,...), but
when I use it in the grid like is done with the combobox example in
the syncfusion datagrid faq, I get the behavior described above.
Further investigation shows that I get that behavior with just about
any control (button, textbox) except the raw combobox.
Any ideas? Tag: Locking Textbox Tag: 71519
How can we lock textbox control in C# as we used to lock
it in vb6.
"Vicky" <anonymous@discussions.microsoft.com> ha scritto nel messaggio
news:d0bd01c43971$66c523e0$a301280a@phx.gbl...
> How can we lock textbox control in C# as we used to lock
> it in vb6.