Jump to content
Software FX Community

StephenP

Members
  • Posts

    96
  • Joined

  • Last visited

Everything posted by StephenP

  1. Hi, Sorry about the lack of response. Referencing child grids is pretty easy. First, you need to reference the child grid's container. From there, finding the child grid is easy. If your child grid is in a side bar, it's super easy: grid1.SideBars[0].FindControl("grid2"); If your child grid is in the ItemDetails area, you first need to reference the item, then call its FindControlInTemplate method. grid1.Items[0].FindControlInTemplate("grid2") Does this answer your question?
  2. I'm glad you found a solution. I will see why the data source controls have to reside within the grid's template after 2 levels. It shouldn't be that way. Thanks again!
  3. StephenP

    Children Grids

    John, Is that a complier error? The "sender" parameter in the event handler should be a Grid instance. Maybe try doing "dim insertingGrid as Grid = sender". Then call "insertingGrid.ParentGridItem.DataValues.PrimaryKey.ToString()". That should work. Steve
  4. Hi, Unfortunately, there is no easy way to do that. I realize that is a pretty bad oversight, so I will be putting that into the next service pack. It will be out in less than a month. Here are some ideas for properties: ConfirmationText. This will throw up a confirmation dialog that will determine whether the command is executed. ConfirmationType. I was thinking this could give them the option to have OK/Cancel buttons, or just OK. OnClickingScript. Script run before command is run. Have you seen the Grid FX confirmation dialog, like for when you delete a row? These look a lot nicer than the traditional browser ones. Would you be interested in having that available?
  5. StephenP

    Children Grids

    Hi, So you need the item from Grid1 that contains the Grid2 object that is inserting data, correct? In that case, replace the "Grid1.SelectedItems(0)" with "((Grid)sender).ParentGridItem" This takes the "sender" parameter, which is the Grid2 that is inserting, and gets its parent item, which is simply Grid.ParentGridItem. That should fix it Thanks!
  6. Hi, could you do me a big favor and paste the page markup? This will help me better diagnose the problem.
  7. Damien, Thanks for your interest in Grid FX. Unfortunately, Grid FX requires at least the .NET 2.0 framework. Visual Studio 2000 only targets version 1. Also, we do not support Visual Studio 2000 at design time, only 2005 and 08. However, if you create the Grid's markup and code by hand, you wouldn't need Visual Studio. If you deploy to Windows Server 2008, it will have .NET 2.0 installed, so there won't be any problems for deployment. But you would lose the designer support without Visual Studio 2005 or 2008. Does that help?
  8. Steve, The likely problem is that either the Grid FX designer never registered its HTTP handler with the web.config, it was removed by someone, or the web config was overwritten. At design-time, Grid FX automatically adds a web.config entry for a custom http handler that delivers all the grid's content - images, css, etc. The static constructor for GridResourceHandler checks for the existence of that handler at runtime. It should have given a better exception message, but that's not the culprit. Are there any Grid FX-related entries in your web.config file?
  9. Template columns are easy to add through the wizard. You just go to "Edit Layout", then go "Add New"->"Blank Template". That will create the template column and let you edit it. For your specific example, you could just use this markup: <Columns><GridFX:TemplateColumn><ItemTemplate><asp:CheckBox runat="server" ID="ItemCheckBox" /></ItemTemplate></GridFX:TemplateColumn>Does that solve your problem?
  10. I tested locally and couldn't reproduce. Could you do me a favor and send me the following (just for one of the grids if you want...or both): 1) The grid's markup 2) The grid related code behing 3) The version of Grid FX you have. To find this, open the smart tag in Visual Studio and go to About Grid FX After this, I can better assist you. Thanks for using Grid FX. This will be resolved and you'll be up and running soon.
  11. Hi, thanks for using Grid FX. We are working to enhance the documentation, and eventually it'll solve most questions. In the meantime we're happy to help personally. Regarding your issues: 1) Design-time "Error creating control." Does this happen with every grid that you drop into the designer, or just the grid in question? 2) Cannot create instance of abstract class "DataField". DataField is an abstract class and has sub classes that are specific to the type of data they represent in the UI. There are all kinds. The primitive ones are TextField, BooleanField, DateTimeField, ImageField, and NumberField. In addition, since you are binding to a data source, you'll want to set a DataPath, so it knows what data column it points to. If your fields are static, meaning they never change, you are better off creating them in the page markup. This will avoid any timing issues, which is appears you have. But to add the fields, you just need to put the code in the page load like so: protected void Page_Load(object sender, EventArgs e){ if ( !IsPostback ){ TextField newField = new TextField(); newField.DataPath = "first_name"; newField.Title = "First Name"; Grid1.DataFields.Add(newField); }} But again, I recommend using the markup to declare your fields. It's much easier. If you are having problems with the visual designer, you can always switch to markup view. The markup would be something like:<GridFX:Grid ID="Grid1" runat="server"><DataFields><GridFX:NumberField DataPath="agent_id"></GridFX:NumberField><GridFX:TextField DataPath="first_name"></GridFX:TextField> 3) Setting data source. While you can set the DataSource property yourself, that is not the best practice is to set the DataSourceInCode property to true and then handle the DataSourceSelecting event. This way, the grid can "pull" the data source when necessary, rather than pushing it in the page load, which will result in unnecessary data binding when things happen in the UI. Your markup would be like: <GridFX:Grid ID="Grid1" runat="server" DataSourceInCode="True" ondatasourceselecting="Grid1_DataSourceSelecting">And the event handler would look like: protected void Grid1_DataSourceSelecting(object sender, GridFX.WebForms.DataSourceSelectingEventArgs e){e.DataSource = mydata;} That will solve your data binding problems. If you do these things, your grid should work fine. Thanks, and please let me know if this helps and whether the design-time error is just for that grid.
  12. Yeah I hear ya. We hadn't thought of this scenario. I have put it in as a suggestion, and it'll find its way into the product eventually. Thanks for using Grid FX!
  13. Go under the Grid.Editing element in the markup. There you have access to the Updating template markup. I urge you to use the Configure Input Settings wizard, as it generates a template for you, so you already have most of what you want there. Otherwise you'll have to add all the FieldContainer controls, asp controls, etc. So the markup would resemble: .....<Editing> <Updating Enabled="True" UIMode="Dialog"> <Dialog> <ContentTemplate><asp:DropDownList runat="server" id="companyDropdown" OnPreRender="companyDropdown_prerender"></asp:DropDownList> </ContentTemplate> In this case, your dropdown is the "companyDropdown" control. You see I added an event handler to the markup. Then, in the code behind you need something like: protected void companyDropdown_prerender(object sender, EventArgs args) { DropDownList dropdown = ((DropDownList)sender); GridItem gridItem = GridItem.FindContainingItem(dropdown); //using gridItem.DataValues, you can filter the dropdown Items here } Try that and let me know if there's anythin else you need.
  14. Hi, Sorry about the delayed response. While a constant Text string is not available in the Column, what you are asking for is relatively easy. First, you need to create a FieldColumn in Grid.Columns. Then, you need to set the necessary properties in its Hyperlink property. The markup will resemble something like: <GridFX:FieldColumn Field="transaction_id"> <HyperLink Url="report.aspx?propertyid={property_id}" /></GridFX:FieldColumn> That will render the link in the grid, with the field data being shown. Once the link is correct, the next step will be to set the Text of the output cells to your constant. To do that, handle the Rendering event on the Grid using the Properties window in Visual Studio. In the event handler you need to do the following: protected void Grid1_Rendering(object sender, EventArgs e) { foreach (GridItem currItem in ((Grid)sender).Items) { currItem.Cells[0].Text = "Click here"; } } Note: the index in the Cells collection depends on the index of the column. In this example, it's the first one. Just adjust that and it will work fine. Hope this helps. Thanks for using Grid FX.
  15. Good to hear! Converting between languages is never fun. If you don't know, there are web-based C#-to-VB utilities that are very good. Thanks for using Grid FX. Happy coding!
  16. As you found out, ASP.NET doesn't allow response.redirects in callbacks. At this time, the custom command always uses callbacks, although a postback option will be added in the future. Instead of using CommandButton, I would recommend using a regular Button control in a TemplateColumn, then handle its Click event. Add a template column, edit its template, drag a button, and handle the button's click event in the property grid. The markup will look something like <GridFX:TemplateColumn> <HeaderTemplate>Header Template </HeaderTemplate> <ItemTemplate><asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="View Report" /> </ItemTemplate> </GridFX:TemplateColumn>An event handler will be created. In that handler, you need to get the GridItem that contains the button via the static GridItem.FindContainingItem method. Then you can do the rest of what you need and Response.Redirect will work great. Here's a quick C# handler: protected void Button1_Click(object sender, EventArgs e) { GridItem item = GridItem.FindContainingItem((Control)sender);string link = "http://header" + item.DataValues.PrimaryKey.ToString() + "footer"; Response.Redirect(link); } Hope this helps. Let me know how it goes.
  17. StephenP

    GridFX buttons

    Okay, we will test with that version of IE. It may take a little while. We are off today, so early/mid next week I should have it resolved. Thanks for your patience and for working with us.
  18. StephenP

    GridFX buttons

    Do you have FireFox installed? Testing with another browser would be very helpful for us.
  19. Hi, While at this time there is no Grid event to provide that level of customization, there is a very easy way to hook into the controls of the dialog. Choose "Configure Input Settings" smart tag at design time. Then, choose Use Custom Template, and click Edit Template. This will put you into template editing mode for the form's contents. Then, just select one of the controls (preferrably the one you are speaking of), and handle its PreRender event. There, you can filter out the unwanted dropdown list items. Let me know how it goes. If you have trouble, I can go deeper.
  20. Could you send the markup and relevant code-behind? That will help me come up with a good answer.
  21. Hi, this issue is fixed in the latest hotfix. It can be downloaded at: http://support.softwarefx.com/gridfx10/update/hotfix/hotfix.htm Thanks for using Grid FX. We pledge to work hard to provide you with the best grid tool there is.
  22. I agree hardcoding is bad. However, exposing properties publicly is quite a bit of work - server-side API, client-side API, change notification (sync server/client state when value changes), documentation, etc. Due to constraints, we didn't expose certain things, such as the property in question. I have a ton of stuff on my list that I'd like to expose. For now, these things will generally be customer driven, so you'll have a shiny new property waiting for you. Alongside it might be a property to disable that box altogether, as well visual customizations. Regarding your request to maintain the expansion of groups between databinds: There is currently no simple way to maintain the expanded groups before and after data binding. The main reason is that the underlying data source can change, making it necessary to recreate groups. That's why they get closed, because technically they are totally separate groups. However, if the underlying data source is guaranteed not to change in a way that would affect grouping - no records added or deleted and no fields that are related to sorting or grouping change - then the groups should remain. For normal grid operations, like sorting, paging, updating, etc...this situation doesn't occur. So it never got into the product. You are not the first person to request this ability. So we need to give serious consideration to building it into the product. As far as an API, would you expect something like: bool Grid1.Grouping.KeepExpansion { get; set; } or something similar? You can do it now by making a List<int> that stores the index of each expanded group during the DataBinding event. Then in the DataBound event, you can just cruise through that list and set the Expanded property in the new groups to true. Would you like the code for that?
  23. It's out, so feel free to update. Just go to Check for Updates in the smart tag wizard in Visual Studio or visit http://support.softwarefx.com/ProductBase.aspx?Product=GridFX10
  24. Sorry about the lack of response. It's vacation time around here. What you are asking for is, unfortunately, not possible without some serious hacking. The # of seconds of hard coded in the grid's JavaScript library. We can provide a property on the grid to customize it; however, it will not be available immediately. I'll happily provide you with an update when a build is ready with that functionality. Does that work for you?
  25. Hi, Aside from the e-mails, that error is harmless. It will be eliminated soon. Should I alert you when it's ready? Steve
×
×
  • Create New...