Jump to content
Software FX Community

mgamage

Members
  • Posts

    6
  • Joined

  • Last visited

mgamage's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hey Stephen, Its working like a charm now! Thanks for the quick solution and the detailed rationale on why this had to be implemented this way. So it seems like we dont have to implement the OnDataBinding event at all, but can simply put all our data source handling logic inside this OnDataSourceSelecting event. Simple experimentation leads me to believe that the grid works fine this way, but is this recommended practice? Also, will the DataBind method become obsolete in a future release of GridFX and become unsupported? I hope this will not be the case as we would have to refactor a lot of our code that we are already using in production. Thanks again for all your help. Madusha
  2. Great, that did the trick! I just removed the <style> tag and reset it in Designer which set it correctly in the markup. I've run into another issue when trying to print all pages in the grid. I get a "There was an error in the callback error message", and the following is the exception that I receive when debugging : Exception type: System.InvalidOperationException Message: GridNotes's DataSource was null although settings indicate it should be used. Handle Grid GridNotes's DataSourceSelecting event and set the e.DataSource property in the event handler. Stack Trace: at GridFX.WebForms.Grid.a(DataSourceSelectingEventArgs A_0) at GridFX.WebForms.Grid.c(DataSourceSelectingEventArgs A_0) at GridFX.WebForms.Grid.bl() at GridFX.WebForms.GridCommands.g(ParameterlessCommandArgs A_0) at GridFX.WebForms.Command`1.b(TArgs A_0) at GridFX.WebForms.Command`1.a(CommandArgs A_0) at GridFX.WebForms.Grid.a(String A_0, o9 A_1) at GridFX.WebForms.Grid.k(String A_0) FYI : In case it is helpful, the way we are sourcing the data to the grid is by setting its DataSource property to a DataView object returned by the business layer at runtime. Any help on troubleshooting this issue is much appreciated. If you need more information please let me know. Thanks Madusha
  3. This is great news! We will be saving quite a bit of dev time not having to implement a custom print function for the grid. I installed the new service pack and have it working beautifully in my dev environment. However, I'm having some issues on certain screens, where VS is throwing me XHTML vaidation errors preventing me from switching to Design mode. This only came up after I install the new service pack. This a sample error message. There are quite a few of these showing up for any given screen with the grid on it. : Error 1 Cannot switch views: Content is not allowed between the opening and closing tags for element 'Selection'. D:\XMAPS\Source\XMAPS_ASP_Web\RMFS\Dialogs\rmf_dlg_notes_main.aspx 89 14 D:\...\XMAPS_ASP_Web\ Error 2 Validation (XHTML 1.0 Transitional): This name contains uppercase characters, which is not allowed. D:\XMAPS\Source\XMAPS_ASP_Web\RMFS\Dialogs\rmf_dlg_notes_main.aspx 90 24 D:\...\XMAPS_ASP_Web\ In this particualr case it doesnt seem to like the <Style> tag inside the <Selection> tags (or inside any other markup tags): < Selection ChangeAction="ClientOnly"> <Style CssClass="gridFx-selection" /> </Selection>As soon as I remove the <Style> tag, it lets me swtich to Design mode. Why does this happen? Again, this only happens AFTER I installed the service pack. Is there a workaround/fix for this, as we already have several screens in production that are using the <Style> tag under other markup tags. Thanks again for a great product and for your help on this. Madusha.
  4. We are currently using GridFX in our production environment and are pretty happy with it. I'm wondering if there is an estimated release date for the PRINT functionality? This is something we would definitely like to see on GridFX and would be using for our future development projects. Thanks MG
  5. Thank you for the quick response! I'm still having the same issue after making the suggested changes. Any suggestions? The code for the grid's DataBinding event is as follows: protected void GridNotesAttachments_DataBinding(object sender, EventArgs e) { if (!IsPostBack) { try { EntNote note = (EntNote)Session["note"]; DataSet dsAttachments = new DataSet(); NotesBC bcNotes = new NotesBC(); dsAttachments = bcNotes.GetAttachmentsByNote(UserIdentity, (int)note.NoteId); DataView dvAttachments = dsAttachments.Tables[0].DefaultView; GridNotesAttachments.DataSource = dvAttachments; Session["attachments_collection"] = GridNotesAttachments.DataSource; } catch (Exception ex) { _vldSummary.AddException(ex); } } } To briefly fill you in on why I'm doing things the way I am: I'm using an unbound grid and is populating the grid using business object methods. In this part of the application when a user adds a row to the grid I do not wish to write that change immediately to the database, but want to save it in some temporary location (in this case I thought I would use the underlying grids dataview) and reflect the change visually on the grid. Only when the user explicitly clicks on a 'Save' button should the data changes be made to the database. I guess I'm doing this as I was unable to do any client side scripting on the grid, otherwise I could have just added the new row to the grid using JS (which leads me to another question, Is there going to be any client side API documentation for this grid?) Also, the reason why I'm saving a copy of the grid's datasource DataView in Session is because I found that the grid doesnt retain its DataSource property on postbacks (is it supposed to?) Thanks for your assistance. Madusha
  6. Hello, My company has purchased GridFX and is using it in several locations in our web application. I'm currently developing a new module that requires in place editing of rows in the grid. I have followed the instructions in the Programmers Guide and implemented the 'onitemupdating' event as follows : protected void GridNotesAttachments_ItemUpdating(object sender, GridItemUpdatedEventArgs e) { if (GridNotesAttachments.Items.Count > 0) { if (!e.OldValues["attachment_desc"].ToString().Equals(e.NewValues["attachment_desc"].ToString())) { EntNoteAttachment attachment = new EntNoteAttachment(); attachment.NoteId = (int)e.OldValues["note_id"]; attachment.AttachmentId = (int?)e.Keys["attachment_id"]; attachment.Description = e.NewValues["attachment_desc"].ToString(); attachment.FileName = e.OldValues["attachment_name"].ToString(); attachment.FilePath = e.OldValues["attachment_loc"].ToString(); DataView dvAttachments = new DataView(); dvAttachments = (DataView)Session["attachments_collection"]; dvAttachments.Sort = "attachment_id"; int rowIndex = 0; rowIndex = dvAttachments.Find(attachment.AttachmentId); dvAttachments.Delete(rowIndex); DataRowView newRow = dvAttachments.AddNew(); newRow["note_id"] = NoteId; newRow["attachment_id"] = attachment.AttachmentId; newRow["attachment_desc"] = attachment.Description; newRow["attachment_name"] = attachment.FileName; newRow["attachment_loc"] = attachment.FilePath; newRow.EndEdit(); GridNotesAttachments.DataSource = dvAttachments; Session["attachments_collection"] = GridNotesAttachments.DataSource; e.KeepInEditMode = false; } else { e.ErrorMessage = "No changes made."; } } } When I try to edit a row in place, and click on the ok symbol on the edit widget , I get the following error message : " There was a problem while processing your request. The specific error message was: There was an error in the callback." Can you please provide some guidance as to why its doing this and what I might be doing wrong. ThanksMadusha
×
×
  • Create New...