Hello All
I am using infragsitics tree view control.I have one stored procedure that returns 2 tables
1.Parent Table
2.Child Table
Currently i m Binding the treeview on the basis of these 2 tables by using loops wherein i take one row of the master table, create one node , find the associated records in child table and add it under the Parent node.
This method works fine when there are few records.
But it really takes a hell lot of time when there are high number of records.
Is there any way to directly assign datasource to treeview ? without traversing through any loops manually? such that we just need to provide 2 tables containing master and child records as the datasource and the treeview manages it automatically and binds the data
Please help..
Thanks in advance
Take a look at this sample http://help.infragistics.com/Help/NetAdvantage/WinForms/2010.2/CLR2.0/html/WinTree_Displaying_WinTree_with_Columns_in_Grid_Style.html
You can bind the data to the grid, and as long as you define the parent\child relationship the grid will be able to display master and child records.
Related
Context:
I am creating a dashboard in Excel based on the data model I am building in Power Pivot. The source data in the data model is based on various other excel tables I am regularly receiving and copy-pasting into my workbook (their incoming structure is out of my control). My goal is to perform all data processing within Power Pivot/DAX rather than manipulating the data in the worksheets before loading into the model.
Problem:
In my model, I have a table (tabCases) which includes status updates on all cases from a management system. This table has a column named case-ID (not unique). I need to create a lookup-table with unique case-id's where I can create new columns with various KPIs for each case.
How can I do this in Power Pivot?
I found two suggestions in this article but none of them work for me (opt. 1 because it requires a manual creation of the unique ID list and opt. 2 because I don't have a database access).
In my mind there should be something really simple I could do, such as i.e.:
Add new table to data model
Set first column to be equal to DISTINCT(tabCases[caseID])
Is there such a way?
A Linkback Table might help you. Please see the link below:
https://www.sqlbi.com/articles/linkback-tables-in-powerpivot-for-excel-2013/
Thanks
I have two table in my database.
first has a id and description and second table has a id, description and first table key, i create a relation between this. after that i create a readonly property in models of second table and get the description of first table by query. i save 100 row of data in second table and 10000 in first table, and each 100 row of first table for one of the row of second table. now when i sort or filter my kendo grid on this column , this take a long time to load! i test this by a more data and see this is not work! i know this in controller whit out read only property but i want to say me a way to use readonly property!! please guide me.
Your question is a little vague but if I understand correctly, it seems you are having problems dealing with large datasets, you may want to look into using serverFiltering and serverSorting.
Not sure if you have implemented your grid through Razor (.cshtml) or client (.js) however these links should get you on the right track.
A few more tutorial links:
Razor
Javascript
I need to create the methods (or another that you recommended I) so as to filter the data in two dropdownlist. The scenario I have is as follows:
1) Business Class for database access (CRUD)
2) Two DropDownList (inside a GridView)
The first presents the Groups Article while the second items, according to the choice made in the first the second is populated.
The database tables consist of the following:
1) Table Groups
2) Table of Related Items
The reports of the tables are one-to-many, or one group can have many articles, both have their own primary key.
What suggestions do you give me?
Thank you all,
Ricardo.
i think you just need two methods:
- GetAllGroups(): That call Entity framework to get all groups from db
- GetArticlesByGroupID(<<groupID>>): that get articles from db based on what groups was chosen
the main flow of your program will be:
- after form is initialized, you can method GetAllGroups() and populate into first dropdownlist
- in event selected changed of first dropdownlist and call method GetArticleByGroupID(...) and populate into second dropdownlist
that all.
from Entity Framework view: you need to create any needed Object or DTO, such as groupDTO, ArticleDTO, GroupRespository... or something like that
hope can help you
I currently have a 2 level tree view that displays departments and then assets within those departments. To do this I am using a sql stored procedure to prepare the data. See the attatched file to see the output of this stored procedure.
I am wondering how to go about adding in another level. IE I want to have a tree view that started with SITE's that have Departments which have Assets. IE I want to add a grand parent to the tree view.
What would the sql look like for this.
I think you will have to modify the parentId values for the current root records and leave the SITE record solely with NULL parentId while the present six roots should have parent id which points to the SITE grand parent.
(VS2008) I'm trying to configure a TableAdapter in a Typed DataSet to return only a certain subset of columns from the main schema of the table on which it is based, but it always returns the entire schema (all columns) with blank values in the columns I have omitted.
The TableAdpater has the default Fill and GetData() methods that come from the wizard, which contain every column in the table, which is fine. I then added a new parameterized query method called GetActiveJobsByCustNo(CustNo), and I only included a few columns in the SQL query that I actually want to be in this table view.
But, again, it returns all the columns in the master table schema, with empty values for the columns I omitted.
The reason I am wanting this, is so I can just get a few columns back to use that table view with AutoGenerateColumns in an ASP.NET GridView. With it giving me back EVERY column i nthe schema, my presentation GridView contains way more columns that I want to show th user. And, I want to avoid have to declare the columns in the GridView.
When you add a new query to a given TableAdapter, it is going to assume the schema in which it is attached to, which is why you are getting blank values for the columns you don't want.
Since you mentioned having already created the procedure, what you need to do is use the Server Explorer to connect to the database and simply drag that stored procedure over into your XSD work area. What this will do is create a separate QueryAdapter that will have just the columns you specified (still strongly typed) and you can bind/interact with your GridView using that QueryAdapter instead.
Is the strongly typed dataset used in another query that returns all the rows from the table?
What you could do is create a dataview using the strongly typed dataset and expose a data table for your DataGridView.
I'm not sure what your requirements are totally, but this example should help you:
DataView dv = new DataView(ds.<Your_Table>);
// This will create a new data table with the same name,
// But with only two columns from the original table.
// This could then be bound to your data grid.
DataTable dt = dv.ToTable(false,
ds.<Your_Table>.<Your_Column1Column>.ColumnName,
ds.<Your_Table>.<Your_Column1Column>.ColumnName);
Just delete the columns you don't want at run-time before you bind to your Gridview. The underlying class is still just a DataTable after all.