Posts

Showing posts with the label DevExpress

Hiding an ASPXGridView Delete button with HTMLRowCreated vs. CommandButtonInitialize

It's pretty typical in Administration forms to need to hide buttons on certain rows for various reasons. Particularly it is nice to hide the Delete button if in fact the row in question is being used in other places in the app. This is a nice feature to let the user know up front that the row in question is in use, rather than them trying to delete it and getting a foreign key related error after the fact. For years now in DevExpress ASPxGridView's I have been handling this in the HtmlRowCreated event. And I have been doing it wrong. Before: protected void gridGiftCodes_HtmlRowCreated ( object sender, DevExpress.Web.ASPxGridViewTableRowEventArgs e) { if (e.RowType == GridViewRowType.Data){ int commandColumnIndex = - 1 ; //Find the command column commandColumnIndex = e.Row.Cells.Count- 1 ; //assume it's the last visible colum //Get the command cell for this row GridViewTableCommandCell cell = e.Row.Cells[commandColumnIndex] as Gri...

Useful DevExpress Videos

This is a living list of DevExpress videos that I've personally found useful and so are probably good for other DevExpress beginners. Full Applications "Get Started" Mini Application http://www.devexpress.com/Support/Webinars/details.xml?id=GetStartedASPNET Key Takeaway: Introduction to several core DevEx ASP.Net controls: menus, other navigation, gridview, pivot reports and charts, an Outlook style scheduler, and an Access style banded  report wizard. ASPxGridView Grouping Introduction http://www.youtube.com/watch?v=G8AXvi3E_jE Key Takeaway: To automatically group by column X, set it's GroupIndex=0.