This is a migrated thread and some comments may be shown as answers.

manually add items to radgrid with sqldatasource

1 Answer 86 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Phillip
Top achievements
Rank 1
Phillip asked on 07 Mar 2011, 08:20 PM
Can you add a row of data programatically and aggregate it within the radgrid.  If so, how?

Example:

I have a grid with 2 columns.  One of these columns is a template that runs a function and delivers an output.  Within that function I need to manually add data that is not present in the sqldatasource to the grid and use it when performing aggregate functions. 

ColumnA - ColumnB
1 - MyFunction(1) - adds new row (1, B)and returns A to column B.  
2 - MyFunction(2) - May return just A

Grid should look like
1 - A
1 - B
2 - A
Count 3

Even though SQLDataSource only returns
1 - AB
2 - A

Of course the function is more complex than the example above and I only need details on adding the row of data to the grid so that it can be aggregated.  Thanks

1 Answer, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 11 Mar 2011, 06:51 AM
Hi Phillip,

I am afraid this scenario is not possible - RadGrid is a data-bound control and in order for its operations to work correctly the UI should be kept in synchrony with the underlying data-source. 

Best wishes,
Tsvetoslav
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Grid
Asked by
Phillip
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Share this question
or