Jump to content
Software FX Community

StephenP

Members
  • Posts

    96
  • Joined

  • Last visited

Everything posted by StephenP

  1. 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!
  2. 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
  3. 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?
  4. 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!
  5. Hi, could you do me a big favor and paste the page markup? This will help me better diagnose the problem.
  6. 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?
  7. 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?
  8. 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?
  9. 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.
  10. 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.
×
×
  • Create New...