Hi All,
I have an application that includes a WinGrid and reads data from a stored procedure. I hide a couple of fields from the users view as they are not relevant to them.
I have created a context menu on the Grid for right clicking on a row. I then have a 'Delete' option that will execute a Stored Procedure which will then delete the records based on one of the hidden fields (unique identifier for a group of records).
Having trouble trying to figure out how to code that it gets the hidden field value from the row that is selected and then pass that across to the stored procedure execution.
Any help would be greatly appreciated
Cheers,
Andrew
Hello,
I am just checking about the progress of this issue. Let me know If you need any further assistance on this issue?
Thank you for using Infragistics Components.
Hello,
Based on the description of your scenario I have created a small sample. Please run the sample and right click onto UltraGrid’s row, in order to display context menu, then click onto “Get UltraGridRow Data” button in order to display data from the clicked row. Please let me know if this is what you are looking for.
Please let me know if you have any further questions.
Further to this, I've done a reset settings in Visual Studio which has now enabled me to use the WinGrid again. 1 problem solved. I use the code example from above, however that gives me the value for the 1st row in the grid. I need to be able to return the value from the currently selected row. Code used as follows;
case "DeletePackageKey":
MessageBox.Show(this.ultraGrid1.Rows[0].Cells["ProfileID"].Value.ToString());
break;
Hristo,
Correct, I am hiding the Column by setting the Hidden Value to TRUE.
Code appears as follows for the the grid; Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn8 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("ProfileID");ultraGridColumn8.Hidden = true;
I am using the Infragistics Context Menu so that it's easier to link. So, when the user right clicks on the row, I need to get the value from 'ProfileID' of the selected row that the user rightclicked on and send it as a variable to another function that executes the stored procedure for SQL.
I have another post in the forum at the moment in regards to Visual Studio crashing everytime I click on a WinGrid. Need to get that resolved before I can go any further.
Thanks,