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

Multi Row Delete...

1 Answer 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Azees
Top achievements
Rank 1
Azees asked on 14 Oct 2008, 10:08 AM

 



I am using Aps.net web application..
In my rad grid i need to delete multiple rows...

i am using following code i get multi row deletion...

But when i am using  MutiPage View in Radtap strip..

I cant delete Multiple rows....

Is Anything i need to put on my code...when i am using tap strip control


 

protected void btnDelmails_Click(object sender, EventArgs e)

 

{

 

 

foreach (GridDataItem item in grdInbox.MasterTableView.Items)

 

 

{

 

 

CheckBox chkbx = (CheckBox)item.FindControl("chkSelect");

 

 

 

 

if (chkbx.Checked)

 

 

{

 

 

int Mails = Convert.ToInt32(item.GetDataKeyValue("QuestionId").ToString());

 BllAlerts.DeleteInbox(Mails);

}

}

BindInbox();

}

 

 

 

 

<telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0" MultiPageID="RadMultiPage1" Skin="Web20">

 

 

<Tabs>

 

 

<telerik:RadTab runat="server" Text="INBOX">

 

 

 

</telerik:RadTab>

 

 

 

<telerik:RadTab runat="server" Text="SENT MAILS" Selected="True">

 

 

 

</telerik:RadTab>

 

 

 

</Tabs>

 

 

 

</telerik:RadTabStrip>

 

Regards

Friend 

 

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 16 Oct 2008, 11:21 AM
Hi Azees,

One possible option in this case would be to get the RadGrid1.SeletectedItems collection, get the keys from the items, and delete the corresponding rows in the datasource. You can then rebind the grid to ensure the data is properly refreshed.
I hope this suggestion helps.

Best wishes,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Azees
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or