I've been having a lot of trouble displaying all the records I have in a Data Grid View Control. I'm using unbound data to populate my grid since there are not many records to display and I need that data to be read only. My issue is that when I populate my grid programatically, not all rows are displayed and they're only displayed when I try resizing the header column width. I tried different things like Refresh, Invalidate, etc to make the grid display all records but nothing worked! I would really appreciate any insight on why this happens and how to solve it!
Thanks
you can try to display your records with other controls
look at my answer for this question
Gridview with expandible rows for winforms
can you post some code to reproduce teh problem?
best regards
Related
I have an (outer-)dataview (with tpl, store etc) which works fine. I can reorder the items (drag & drop) and edit the data.
Now I need to extend the functionality. Some items in the outer-dataview needs to show additional data in an inner-dataview. Items within this inner-dataview also must be reordered and edited. It is even getting more complex: also these items could have additional data to be shown insite the items etc etc.
By nesting the dataviews insite other dataview-items the user has a good presentation of the grouped data and can easily reorder the data by drag & drop.
I’m struggling what the best way is to build the nested dataviews. The best thing I came up with was to loop all nodes in the outer-dataview and create new inner-dataviews and use the renderTo-functionality of the dataview directly into the outer-dataview-items.
This works fine but each time I change data in the one of the outer-dataview items the related inner-dataviews disappear, because the dataview updates the dataview item.
It would help if I could re-insert the inner-dataview(s) again.
Does any one have a good suggestion how to realise the nested dataviews?
Arno
Issue Solved and the solution was quite simple.
After the creation of each dataview I dynamically render the inner-dataview into the items. simple...
I am using Sencha touch grid and I am facing one issue in the development.
The issue is, if I reorder the columns of the grid using ViewOption plugin, the SummaryRow values get disappered. How do I retain the summary row values after Column reordering?
I am using Sencha touch 2.3.x
Thanks in advance!
I was reading the sources and I don't think Grid is finished.
What I found is the ViewOptions.onColumnReorder apparently only change the DOM elements order and not the store order. And reading the SummaryRow.updateGrid I didn't find any bind with both. SummaryRow only bind with store and add/remove/etc columns (not reorder).
I can be wrong, I didnt try grid yet. But I guess your best shot is try to force the SummaryRow.doUpdateSummary after the onColumnReorder.
I want to implement a multi select combox in side a column of datagrid.
I have searched on google but i didn't find proper solution. So could you please help me out to solve this problem.
And also multiselect combo box should be bind with database and select values should be saved in database from datagrid.
Please help me if you have any solution.
Thanks in advance.
Rajbir
Have a look at the multi select example http://www.codeproject.com/Articles/42133/Multiple-Selection-ComboBox-for-Silverlight this should give you a good idea. Also following url gives you step by step instruction on how to bind combo box in a data grid http://blog.digitaltools.com/post/2011/05/06/Binding-a-Datagride28099s-ComboBox.aspx I hope you know how to get data from server using either ecf/ria services and bind data to the view through view model.
it got a weird problem... i got some data from a database bound to a datagrid. When i perfrom some upgrades the datagrid does not get (but the database does) until i refresh the page.
So i wanted to use
temp = theGrid.SelectedItem
Me.NavigationService().Refresh()
theGrid.SelectedItem = temp
But it does not work....it seems like Navigationservice.Refresh forces the application to restart completely after the sub is done.
You guys got any idea?
Thanks a lot!
NavigationService.Refresh tells it to refresh the content (ie. redraw the content), it does not tell it to refresh the data. You need to refresh your data source instead. If you can show some code that relates to how you're loading your data, I may be able to offer some advice in that regard.
I was wondering what the best way was to create an empty datagrid.
For example after you have hit new in excel, You have a grid with empty rows and columns.
I am using c# with WPF and .net 4.0.
Thank you.
As the comments have suggested, a datagrid is not a spreadsheet, but a method to display / edit existing data. That said if you want something similar, feel free to populate a collection with default / 'empty' objects and bind that to your grid. It just means that after working with the data, you will have to define a method to capture only the edited rows. This still means that the column-bound properties of your class need to be known ahead of time.
A DataGrid is used to display a collection. If you want to create an individual row DataGrid is not really the right tool. You could but a single empty row in the DataGrid using a collection of only on row. There is a lot of guidance on Master Detail on MSDN. If you don't know how many columns at design time you could used a DataGrid to turn the row vertical with column 1 as name and column as value so now you have one record but with a collection of fields.