asp.net - GridButtonColumn custom handler -


i have 4 tables i've created using radgrid. each of them contains list of items have title of , id of. want have column "remove" link fire event handler in write code remove id db.

each of tables has separate table in db need know table did fire handler , id correspond.

another small question is, should include visual studio recognize gridcommandeventargs type?

you question little bit confusing. can use deletecommand id of row , delete it.

<telerik:radgrid id="radgrid1" runat="server"    ondeletecommand="radgrid1_deletecommand"     onneeddatasource="radgrid1_needdatasource">    <mastertableview datakeynames="id" commanditemdisplay="top">       <columns>          <telerik:gridbuttoncolumn buttontype="imagebutton"              confirmtext="are sure want delete?"             commandname="delete" imageurl="~/images/delete.png"              text="click delete" uniquename="delete">          </telerik:gridbuttoncolumn>                      </columns>    </mastertableview>             </telerik:radgrid>  protected void radgrid1_deletecommand(object source, gridcommandeventargs e) {    int id = convert.toint32(e.item.ownertableview.datakeyvalues[e.item.itemindex]["id"]);     // delete based on given id } 

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

javascript - Preserving URL fragment through CAS sign-on -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -