Replies
At this time you can add an image of the chart to the excel sheet if you have one in the same approach that Zdravko has provided here. If you actually want to add an excel chart, that is a new product idea which you can post on our ideas site.
Nic,
Your question was answered in the Window title disappear with UltraToolbarsManager thread.
I recommend downloading 18.1 and testing with the same excel file to see if this has already been addressed. If it hasn't, we need an excel file that we can use to reproduce the issue so that we can look into what is happening.
Note that you should post in the Ultimate UI for Windows Forms forum rather than the Ignite UI for JavaScript forum for questions on the Windows Forms toolset.
Here is the relevant SortComparer from Mike's sample:
internal class MySortComparer : IComparer
{
int IComparer.Compare(object x, object y)
{
// x and y will be UltraGridCell. So cast them to the correct type.
var xCell = (UltraGridCell)x;
var yCell = (UltraGridCell)y;
// Get the rows
var xRow = xCell.Row;
var yRow = yCell.Row;
// Get the value of the "Int32 1" cell in each row.
// If there is a chance that the value will be null or
// DBNull, you will need to check for that here.
int xInt = (int)xRow.Cells["Int32 1"].Value;
int yInt = (int)yRow.Cells["Int32 1"].Value;
// Return the comparison of the two integer values.
return xInt.CompareTo(yInt);
}
}
And the logic from the InitializeLayout method where the class is instantiated:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
{
var layout = e.Layout;
var band = layout.Bands[0];
var ov = layout.Override;
ov.HeaderClickAction = HeaderClickAction.SortMulti;
band.Columns["String 1"].SortComparer = new MySortComparer();
}
Priya,
The quoted code from the sample is getting the text of the value in the cell and putting that text into an html input above the grid as the selection changes. There is a running example in this fiddle.
Are you attempting to take the value from the grid and select the appropriate radio button based on the value? If so, what is is the value of the cell? Is it text like "male" or "female" if so you can use the same line to get the text:
var name = $($(ui.row.element).find("td")[0]).text()
Once you have the text you can check if the value matches male or female and set the value of the radio buttons accordingly. As far as setting a radio button to be checked, simply get a reference to it and set checked to true:
if(name==="male")
{
document.getElementById("male").checked = true;
}
If there is something specific that isn't working for you, I recommend creating a new fiddle on jsFiddle that demonstrates the exact challenge that you are currently facing as that will help us understand your questions and allow us to provide better guidance.
The code that Zdravko provided a few years ago gets the values of the cells from the selected and and puts them into a string and displays them in an alert. You could use the same approach an just assign the value of the text input to the string that was built.
If that doesn't work for you or you have further questions, I recommend starting a new thread and including the code that you are using and what specifically isn't working so that we can better assist you.
Nicholas,
If it was just the appearance of the grid, I would think that you might be looking at the activation of the row which would still happen when selecting only a single cell. As the values for the entire row are being pasted, I would assume that somehow the entire row is being selected in your grid though with the code provided I wouldn't expect that to happen. Are you able to reproduce the behavior with the same code in an isolated sample that you could provide for me to debug to see what is happening. I did test the individual settings when I first responded though I didn't get the behavior you are describing.