or
Hi,
I have a grid with check box column. On click of button AJAX call is made and data is fetched accordingly. But the checkbox column is not getting refreshed. If I do postback than same thing is working fine.
I am using needdatasource event of grid for databinding and I debugged it and found that correct data is gettting bound but only the checkbox in the grid is not getting refreshed.
i have also observed that when I use AJAX then the grid doesnt refreshes any control like textbox,checkbox but it refreshes only the label control.
Please let me know what am I doing wrong?
Thanks,
Nishith

| <CommandItemTemplate> |
| <table cellpadding="2" cellspacing="1" style="font-family: Tahoma; font-size: 11px" |
| width="100%"> |
| <tr> |
| <td style="text-align: left"> |
| <asp:LinkButton ID="hlInsertBank" runat="server" CommandName="InitInsert" Text="Insert"></asp:LinkButton> |
| </td> |
| <td style="text-align: right"> |
| <asp:LinkButton ID="exportBankDetails" runat="server" Text="Export" CommandName="ExportToCSV" ></asp:LinkButton> |
| </td> |
| </tr> |
| </table> |
| protected void RadGrid_Bank_ItemCommand(object sender, GridCommandEventArgs e) |
| { |
| RadGrid grid = (RadGrid)sender; |
| int itemIndex = e.Item.ItemIndex; |
| if (e.CommandName == "ExportToCSV") |
| { |
| foreach (GridDataItem dataItem in grid.MasterTableView.Items) |
| { |
| dataItemdataItem.Display = dataItem.Selected; |
| } |
| grid.MasterTableView.ExportToCSV(); |
| } |
| } |