[Grid] - Manage the command button status for each row

Hello,
I have a classic grid written like this:
<asp:GridView ID="CommOpnd" runat="server" AutoGenerateColumns="false" AllowPaging="true" PageSize="10" OnPageIndexChanging="GV_PageIndexChanging" OnSelectedIndexChanged="GridView_SelectedIndexChanged" DataKeyNames="LastFase, MissingStaff, AC_Codice, ShowClose, Bollettazione" OnRowDataBound="FixCOpLayout">
<Columns>
...
                                                ...
                                                ...
</Columns>
<PagerStyle CssClass="pager" />
</asp:GridView>

protected void FixCOpLayout(object sender, GridViewRowEventArgs e) {
   ...
   ...
   ...
}

How do i call the function the same way in syncfusion grids?

I also need to access the grid buttons, what can I do?

Aspx
<asp:Button ID="RipristinaQDaBoll" runat="server" Text="text" OnClientClick="client function" Visible="false" OnClick="server side function" />
Aspx.cs
Panel pa3 = (Panel)b.Parent.FindControl("AVPanel");
((Button)pa3.FindControl("RipristinaQDaBoll")).CommandArgument = b.CommandArgument;
((Button)pa3.FindControl("RipristinaQDaBoll")).Visible = true;

Regards,
Alessio.

1 Reply 1 reply marked as answer

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team November 12, 2020 01:48 PM UTC

Hi Alessio, 

Thanks for contacting Syncfusion Support. 

Query#:- How do i call the function the same way in syncfusion grids? 
 
We have checked your query and we suspect that you need to trigger server events on performing some actions. Here is the list of server events which triggers on performing our specific actions. 

Refer to the documentation below:- 
 
Also we can have ClientSide RowDataBound event which triggered every time a request is made to access row information, element and data. In the below example using RowDataBound event we have changed the background color of row. 
 
So share us the detailed Explanation of the requirement you need to achieve. Based on that we will proceed you further. 
 
Query#:- I also need to access the grid buttons, what can I do? 
 
In Syncfusion Grid, we can have Custom Command feature. From this we can place custom buttons with Commands property.  

Refer to the documentation and Demo Link:- 
 
Also we have serverside OnServerCommandButtonClick Event to access the row Information at server end on clicking the Command buttons. 
 
Refer to the documentation below:- 

Please get back to us if you need any further assistance on it. 

Regards, 
Farveen sulthana T 


Marked as answer
Loader.
Up arrow icon