Jump to content
Software FX Community

StephenP

Members
  • Posts

    96
  • Joined

  • Last visited

Everything posted by StephenP

  1. Hi, Just set Grid.Layout.Columnar.ItemHeader.Visible = true. That will turn on the "item header" column that shows each item's index.
  2. Just change the line to grdMedication.DataSource = dtMPNS.DefaultView Should be fine. Thanks!
  3. Hey, Now I got it. I found a way for you to prevent the item from deselecting when the button is clicked. What you need to do to fix it now is set a property (OnClientClick) to your button. <asp:Button runat="server" OnClientClick="(new Sys.UI.DomEvent(event)).stopPropagation();" ID="btn1" onclick="btn1_Click" /> That willl prevent the Click event from bubbling up to the cell, at which point will cause the deselection of the item. The upcoming service pack includes a new property, Grid.Selection.DeselectSingleItemOnClick, which will prevent an item from being deselected on click when its already selected. That will do exactly what you want without having to modify the button. Have you used our CommandButton control? It does what the regular button does but uses a callback instead of a postback. Highlight.zip
  4. Hi, Is the print button you are using Grid's print button the toolbar? Or is it a custom button you place in every item? Steve
  5. Wow Chris, good find! I'm gonna play with that over here. We gzip our script files so I wonder if some kind of "double compression" is occuring that is causing the real problem. If that's the case, I will include a way to disable our script compression so you can keep IIS's settings. Thanks again!
  6. Hi, Thanks for the message. You included all the information I needed, which is really helpful. I am trying to replicate the problem here. With the latest version of Grid FX, I cannot reproduce this problem. We have been doing some work actually to get Grid better integrated with SharePoint. We will be releasing a service pack soon, but if you want to try it immediately, I could get a hotfix for you. Would you like to try that?
  7. Hi, sorry about that. As you can see, things in AJAX are complicated. Try using the DataBound event of the grid. That might do the trick.
  8. This is mainly a timing issue. During the Rendering, the grid's client-side initialization script has already been committed to the page. If you select an item after that, the client-side control will not know the first item is selected (the item is selected because the css classes are applied). So when you click on another item the client-side control doesn't unselect the first because it has no idea the first one was selected. The easiest fix is to most your code to the Page's OnPreRenderComplete, such as: public partial class WebForm12 : System.Web.UI.Page{ protected override void OnPreRenderComplete(EventArgs e) { Grid1.Items[0].Selected = true;base.OnPreRenderComplete(e); } Let me know if this helps. Thanks again!
  9. StephenP

    Hide the Header

    Yup! Grid.Layout.ColumnHeader.Visible = false. I recommend using the property grid to set it. Thanks!
  10. Do you have any Columns defined, or are you using Card layout? Any DataFields?
  11. Hi, I'm glad to hear you've been using Grid FX! Could you please send me the markup for your Grid? This would help me reproduce the behavior. Thanks
  12. Ken, the style property for the toolbar/pager container is missing from the current release. However, it will be included in the upcoming service pack. Can you wait a few weeks for that? If not, I can help you with some kind of temporary css hack.
  13. Okay, so you are trying to update 2 "sibling" grids. That's another story. Unfortunately at this time, a grid that initiates a callback can only update within itself. ASP.NET provides basically no support for more advanced updating within callbacks (UpdatePanels actually use postbacks, not callbacks, and are very heavy things). We are in the process of improving this, and in upcoming releases of our products you will be able to update many separate controls during a callback. Until then, you are best off just using a regular <asp:Button and handling its click event. This will use a postback and although the flickering will occur, your problem should be solved. You may need to call DataBind on the second grid, because it has no official way to know that its data depends on another. Hope this helps!
  14. The client-side javascript is different for grids depending on their ID. So, we include a server-side method that generates the javascript for you. In VB, just enter: Grid1.Commands.RefreshData.GetExecuteScript() Grid1 in that case is the grid in question. It will spit out javascript like: GridFX.Grid.get_grids().Grid1.refreshData();That will do the trick.
  15. Would you like client-side JavaScript or the server-side C#/VB?
  16. Hi, that happens occasionally. The VS toolbox is quirky. You can add the grid by right clicking on the toolbox and hit "Choose Items". Navigate to grid's dll (Program Files/Grid FX/bin/GridFX.WebForms.dll). It should appear, and hopefully not disappear later. Bubbles62.zip
  17. Just fill the DataFields collection, then add a FieldColumn to the Columns for each of those data fields. Do it right after you create the new grid, before you add it to the control tree.
  18. If the data schema doesn't change throughout the page lifecycle, you should add the Columns and DataFields in markup. Then you will have DataFields filled in DataBinding. Can you do that?
  19. Nuts. Right now grouping is done during data binding, between the DataBinding/ed events. And so is the part where it generates the DataFields and Columns from the data schema. I have submitted a task to provide an event that takes place after the DataFields/Columns generation. This will be the event you can handle and adjust grouping to your heart's content. This will be included in the next service pack, however if you can't wait I can issue a hotfix sometime next week. It could introduce new instabilities, though. Would that work for you or would you rather wait a month for the service pack?
  20. Yes, you can. This is supported through the CommandButton control. You can do it through our "Edit Layout" wizard by choosing "Add New" -> Command Button. You can also do it in the property grid/markup. <GridFX:TemplateColumn> <HeaderTemplate><GridFX:CommandButton runat="server" ID="commandButton1" Command="AddSortField" Parameters=""transaction_id",0" /> </HeaderTemplate>In this case, I set the command to sort by the "transaction_id" field. If you edit the column's template (click on the column and choose Edit Template), the property grid for the CommandButton will give you a better way to set the properties. The Parameters is a string that's a JSON object, but the property grid presents it in a much nicer way.
  21. Tomasz, The auto-generated fields and columns will be fixed in our upcoming service pack, which is about 4 weeks away. If you can't wait that long, I could get you a hotfix that solves the issue. However, the best thing for you to do is to create the DataFields and Columns in the markup. If you can do that, you should. Otherwise, let me know exactly what you are desiring and we can work it out.
  22. Chris, could you try the DataBinding event instead? That should do the trick.
  23. StephenP

    Sorting

    I'm a little unclear. In the database the column is text, but in Grid FX it's a FieldColumn that points to a DateTimeField? Could you send me the grid markup? That would help a lot.
  24. In order for the Grid2 to exist, the item needs to be expanded. However, the expansion happens after OnLoad. There is an event on grid called ItemDetailsExpansionChanged. Handle that event. Check to see if the item is expanded via e.Expanded. If that is true, the FindControlInTemplate should return the grid. You can also do e.DetailsCell.FindControl in the event handler. Try that. Let me know how it works out.
  25. Hi, It will be included in the next service pack, which will drop sometime in June. Can you wait for that? Thanks!
×
×
  • Create New...