HiI was checking the forums. I want to implement an additional custom column with some detailed buttons.
I found this post
and the results worked fine.
I added one specific class to modify the button and added an image.
<style>
.buttonDocumentDetails{
background: url(../../Images/grid_DocumentDetails/options/documentDetails_20px.png) no-repeat;
cursor:pointer;
margin:2px 2px 2px 2px;
min-width:22px;
min-height:22px;
/*border: none;*/
}
</style>
and added that class to the additional header
col.HeaderText("Options")
.Template("<input title='document details.' type='button' class='buttonDocumentDetails' value =' '></input><input title='linked documents.' type='button' class='buttonDocumentDetails' value =' '></input><input title='document history.' type='button' class='buttonDocumentDetails' value =' '></input><input title=document security details.' type='button' class='buttonDocumentDetails' value =' '></input>")
.TextAlign(TextAlign.Left).Width(120).Add();
The buttons work fine and load the image only if the
eventClientSideEvents(eve => { eve.TemplateRefresh("RefreshTemplate"); })
is not added to the grid. However, I cannot used in that way because I lost the grid details in the selection row.
How can I have both, at the same time the custom class and the eventclient->Refresh ?
I have attached an example solution, to see the issue comment and uncomment line 44 in GridFeatures.cshtml. Also, I added some images to explain my point.
Kind regards,
Juan Acosta
Attachment:
SyncfusionMvcApplication14_ab68856.zip