 |
|
 |
Excellent article. Thank you.
I would like to add this to my Visual Studio 2005 Toolbox.
On the Toolbox->Data tab, I did right mouse click, .Net Framework Components, Browsed to the GenericDataGridView.dll and added that and I see it in the list and it is checked.
I clicked OK but I don't see it available anywere in the UI.
Googling around suggests I need to have it installed via a VSI (Visual Studio Content Installer) .vsi file.
Can anyone guide me so I can have this control available in my Toolbox?
Thanks for your help, -Tom
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
How do I add columns from three tables with a inner join ? genericDataGridView1.DataColumnsTable = "Table1", "Table2", "Table3";
|
| Sign In·View Thread·PermaLink | 5.00/5 (2 votes) |
|
|
|
 |
|
 |
Im using Visual studio 2008. I downloaded the app & it does not open in visual studio. What am I doing wrong ?
|
| Sign In·View Thread·PermaLink | 3.50/5 (2 votes) |
|
|
|
 |
|
 |
Hi...
I want to stop the tab key navigation in datagridview. if i press the tab key in a certain cell it must stay in the same cell.
how can i do this?
Ven Kates
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
Nice grid but when I set it to editable and change a value it can not find the next columnname. So when it goes into the for loop it says column name "columnname" not found? It happens with this if (this[kValues[i], rowNumber].Value is System.DBNull) I looked into it but cannot find what is wrong. The rows are shown in the grid and I can change it in the grid row but as soon I select the next row and it goes into the Row_Save it failes. Can you advice. Thanks in advance.
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
 |
Ok here is what i did: genericDataGridView2.DataColumns = "ContractID, ContractNR%, ContractPrijsNR, Stuksprijs, Aantal"; genericDataGridView2.DataWhere = " where (ContractNR = " + "'" + txtContract.Text + "')"; genericDataGridView2.DataColumnsTable = "tblContractDetail"; genericDataGridView2.DataConnection = "server=server; uid=user; pwd=PW; database = DB"; genericDataGridView2.FillAll(); genericDataGridView2.AddCombo("ContractPrijsNR", "Omschrijving", "tblContractPrijs", "Omschrijving", "ContractPrijsNR", " order by Omschrijving"); genericDataGridView2.AddValidation("Aantal", true, GenericDataGridView.GenericDataGridView.ValidationStyle.NumericInt, "must be an integer");
As you can see I added a DataWhere in de Class this was usefull for me and this is working. I tried it whitout but that doens't change anything. The ContractID is a Identity field. It is failing in de the second row, so it is telling me that ContractNR doesn't exists. I will do some more debugging to find out what the problem is. I hope you have some ideas as wel.
Thanks in advance.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Found the problem. Had to trim the kValues so there are spaces somewhere and thats why it cannot find the columnname.
modified on Thursday, May 29, 2008 6:05 AM
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Yildirim bey,
I was looking for a MaskedTextBox in a DataGridView and found this solution. At first sight, it could be very useful. You include the editing controls in the same way, like MS's example does with CalendarColumn.
But it's not useful to combine this with DbConnection und saving changes directly: In real applications, one should set apart the GUI like DataGridView from the data editing via DataTable and data storage via DbDataAdapter. Additionally, you are using SqlClient only - in the same cs file. If anyone uses Firebird or Oracle or MySql or anything else, one must change all the source code. It's a pity...
Good work: Preparing CalendarColumn, MaskedTextColumn, MultipleComboboxColumn. See also my post in "Bug in Mask".
Best regards, Juergen
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
 |
Hi Juergen, You are right about the mask and also the connection string. The control can be extended, that is why i also put the source code to the article.
Thanks for your nice contribution.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
genericDataGridView nesnesine ekledigim combobox çalisma zamaninda hata firlatiyor.Yazilan herseyi düzgün bir sekilde yapmama ragmen genericDataGridViewComboBoxCell value is not valid diye bir hata aliyorum yardimci olursaniz sevinirim..
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hangi adimda bu hatayi aliyorsunuz e tarz bir icerikteki datasource'u yuklemeye calisiyorsunuz. ykocdag@yahoo.com adresime elinizdeki kod'u ve probleminizin hangi asamalarda kaynaklandigini gosteren detayli bir mail atarsaniz yardimci olabilirim.
Tesekkurler, H.Mehmet Yildirim Kocdag
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi,
I have set validations for each column of the grid.But when i doesnt enter any value in a particular column i cannot go to anyother column..because Validation will work and corresponding error message is getting displayed..I would like to avoid valiadtion when i doesnt enter any data in a particular column..Hw to do that?Also i would like to know what bool blank control is ..
Thank u...
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi Mathew,
if you set the blank control as false, it is not neccassary to enter any value for the column.
Thanks, Yildirim
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
Hi,
I would like to know how we can set validations as column property during design time... Like we set Calender Column as Column type in the grid during design time itself.
thank u....
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi Mathew,
You can add validations to the control via using AddValidation function. The parameters of the function are ColumnName,BlankControl,ValidationType and ValidationMessage. You can also find the usage of the function in the article. You can also add new validation rules to the control by adding new validation functions and styles to the control.
Please feel free to ask any question. Thanks, Yildirim Kocdag
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi,
Thanks for ur reply. Actually i wanted to set the validation as properties in the grid at design time itself.Rather than adding it using Grid.AddValidation()...in the code.
I thought of adding a ComboBox in the properties column of each column of grid and also a text box for entering the Error message. So, when we add columns during design time, we will be able to set its validation also along with it.
But i dont have an idea how to start on it.....Any help on this...
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
For design time, this control will not work.
You can make search in msdn about customizing the control with designtime works. I hope you will find some samples.
Thanks, Yildirim
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi,
this is a great article!!!!
I have a doubt regarding calendar column .I need to add rows during runtime with Calendar column in a particular cell.
Say,for example. I have added columns OrderID,OrderDate,Frieght to the grid during the design time .And Set OrderDate column as CalenderColumn.While running the application ,all the data are getting displayed.
Now I have a button named "addrow".When i click it, i need to add a new row .And while clicking the save button everything shud get saved.But Im unable to add a new row with Calendar Control as Column type..
Plzzz helppp...Thanks a lot...
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
 |
Hi Mathew,
I dont think that it is possible during runtime via this control. However you can change the control as it can add new column during the runtime.
Thanks, Yildirim Kocdag
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi,
Thanks a lot for the reply..
I got it...this is how i did.
CustomDataGridView.CustomDatagrid.CalendarCell cel = new CustomDataGridView.CustomDatagrid.CalendarCell(); cel = CustomDatagrid.Rows[i - 1].Cells[2] as CustomDatagrid.CalendarCell; cel.Value = DateTime.Now.Date;
So each time when we add a new row,that particular cell will generate calendar column with that days datetime...
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Thanks for your greate code, but there is a problem if we need to add two (or more) MaskedTextColumn with different masks strings? in this case the control keeps one mask only. How we can overcome this problem ?
|
| Sign In·View Thread·PermaLink | 3.40/5 (2 votes) |
|
|
|
 |
|
|
 |
|
|
 |