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

Checkbox in Ajaxed Grid

2 Answers 86 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 2
Nick asked on 14 Aug 2008, 11:36 PM
Ok, I have something that was working in the previous control verion (RadControls for ASP.NET):

I have a template column in a grid that has a checkbox on it.  The checkbox is autopostback.  In the previous version, this checkbox was on it's own ajaxpanel in the template column..  That doesn't work anymore so I removed it.   With the grid ajaxed via the ajaxscript manager, the checkbox still posts, but the entire grid is of course being updated.  This is ok, though I prefered the previous version (less traffic).

So first question: Is there anyway to ajax the paging on the grid and specifically ajax the checkboxes in the template column - i.e. duplicate functionality from the previous version.

Second question: As I have currently implemented, it's functional.  However an odd thing happens - if you click a checkbox, it fires and works.  If you then paginate or do anything that causes the grid to callback, the checkbox fires AGAIN.  It will fire everytime.  And in fact, sometimes seems to fire for other rows.   This was never a problem before.

Thanks!

Here's my template column - this basically calls a function that toggles a status.  In the previous version, the checkbox would have been wrapped in an ajaxpanel. 
<telerik:GridTemplateColumn UniqueName="ToggleMyFile" HeaderText="MyFile">                  
<ItemTemplate> 
  <asp:CheckBox ID="chbMyFile" runat="server" Checked='<%# DataBinder.Eval(Container.DataItem, "bMyFile") %>' AutoPostBack="True" OnCheckedChanged="chbMyFile_Changed" FileID='<%# DataBinder.Eval(Container.DataItem, "iMillFileID") %>'/>                                              
</ItemTemplate>                              
</telerik:GridTemplateColumn>         

2 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 19 Aug 2008, 07:57 AM
Hi Nicholas,

Basically, the correct approach would be to ajaxify the whole control, rather than just fragments of it. Also, I tested the checkbox issue that you mentioned, and the control behaved normally. Attached to this message, is the code which I used for testing.
Take a look at it and let me know if I am leaving something out.

All the best,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Nick
Top achievements
Rank 2
answered on 19 Aug 2008, 02:04 PM
Found issue - I have a view state compressor that apparently won't work with the new telerik.
Tags
Grid
Asked by
Nick
Top achievements
Rank 2
Answers by
Yavor
Telerik team
Nick
Top achievements
Rank 2
Share this question
or