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

RadGrid count is zero even though values are available in Grid

2 Answers 279 Views
Grid
This is a migrated thread and some comments may be shown as answers.
A2H
Top achievements
Rank 1
A2H asked on 08 Apr 2011, 07:59 AM
Hi All,

I have a requirement:
Description : In a webpage there will be two telerik grids with name availableinputs and updatedinputs.
On page load the availableinputs grid will be loaded with records available in grid.and from this User will select some records by checking a check box respective to each row.Then user clicks on add Records button.the selected records will go and add to Updated Inputs grid.
Once the selected record is added to updated records grid ,same has to be removed from availableinputs grid.


After this if I need to remove the record from updatedinputs grid.user will click on remove button.and records will be removed

Problem :
First I will bind records to both the grids in Add buttton.its working fine.
after that when I try to check the count of items in updatedinputsgrid on remove button click event, its giving me zero even after I bind the value updatedinputs on Addbutton click.

I tried to rebind the grid with same datasource in Remove button click.
At that time count is showing 1,but the checkbox checked status is always false :(


why this is happening?how to solve the issue.

Thanks,
A2H

2 Answers, 1 is accepted

Sort by
0
A2H
Top achievements
Rank 1
answered on 11 Apr 2011, 08:33 AM
Hi All,
Can anyone please help me.
Its really urgent for me now.

Thanks,
A2H
0
Iana Tsolova
Telerik team
answered on 11 Apr 2011, 08:50 AM
Hello A2H,

Can you specify what is the column with the CheckBoxes, is it a GridTemplateColumn and are the CheckBoxes bound to some field? If you are bot binding the CheckBoxes, I would suggest that you use GridClientSelectColumn which will enable to to select items in the grid. Then on the server you would be able to traverse the SelectedItems/SelectedIndexes collection of the grid. You can check out the below demos for a reference:
http://demos.telerik.com/aspnet-ajax/grid/examples/client/selecting/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/commanditem/defaultcs.aspx

Best wishes,
Iana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
A2H
Top achievements
Rank 1
Answers by
A2H
Top achievements
Rank 1
Iana Tsolova
Telerik team
Share this question
or