Is it possible to change the row index start value in Grid Desktop control

the grid desktop control row index started with 1 (just like excel) but I wish to start with 0. Apparently i can hide the column header and set the first column as the index row. This works but it adds more code to user and also the mouse row selection does not work as expected.
If there is an option to set the start value of row index, that will be perfect.

@LEWA01434,

Thanks for your query.

No, there is no such option available to change the row index start from 0 instead of 1. We don’t think it would be appropriate to do that as Aspose.Cells.GridDesktop follows MS Excel standards and specifications and many users are already using the controls as a desktop Grid control similar to MS Excel.

By the way, in code, the row index starts from 0 but visually we follows MS Excel interface.

Thank you.

I know internally it starts from 0, but the display starts as 1. Is it possible to have option to start as 0?

I really believe it will be super easy to corporate this change since it is only for displaying.

thanks,

@LEWA01434,

I need to discuss with our product team if this change is really feasible or not. Please spare us a little time and if this is really feasible, we may log a ticket for it.

We will get back to you soon.

Thank you.

If you can do it, that will be super awesome.

the reason i want it starts as 0 is, I am using the grid desktop control as a display interface for my PLC parameters. the PLC index starts with 0 and it is so hard to shift index down even both programs (PLC & Grid Desktop Control) use 0 as start index.
Obviously the real issue for me to fake the index is, I have to deal with mouse selection issue and row selection issue, not mention that the performance issue if i have a lot of code behind “cell selection” procedure.

thanks a lot.

@LEWA01434,

As you are in a hurry, so I have logged an investigation ticket first (before discussing with product team) with an id “CELLSNET-45483” for your feature request. Our concerned developer from product team will investigate and look into it soon. Please spare us sometime to analyze the feature.

Once we have any new information, we will share the update with you immediately.

Thank you.

@LEWA01434,

We can provide a feature to customize captions/labels of row ids but it will be only for display purpose. Will it be ok for you? If you need something else, kindly do provide complete details with screenshots (if you can provide).

Thank you.

Yes, it is ok for display purpose. i am not looking for any fancy text or anything else. All i need is row index starts with 0 which aligns with my PLC parameter index.

As you said earlier, the index internally is 0 but what the heck shows as 1.

( I believe anything should start with 0 in the computer world. there is no -1 obviously)

@LEWA01434,

Thanks for your confirmation.
We will work on it and provide you the fix for your needs soon.

Well, in most cases and generally, the spreadsheet visual grids/applications (e.g MS Excel) start the row ids from 1 and Aspose.Cells follows this standard.

Thank you.

@LEWA01434

Thanks for using Aspose APIs.

Please download and try the following fix (also see its sample code given below) and let us know your feedback

This fix adds

adds new interface ICustomRowCaption and ICustomColumnCaption 
/// <summary> 
/// Interface for custom row caption. 
/// </summary> 
public interface ICustomRowCaption 

/// <summary> 
/// Interface for custom row caption. 
/// </summary> 
public interface ICustomColumnCaption

Here is the sample code for a reference.

this.gridDesktop1.GetActiveWorksheet().CustomColumnCaption =new myICustomColumnCaption(); 
this.gridDesktop1.GetActiveWorksheet().CustomRowCaption = new myICustomRowCaption(); 
public class myICustomColumnCaption : ICustomColumnCaption 
{ 
	/// <summary> 
	/// get the custom column caption. 
	/// </summary> 
	/// <param name="column">column index.</param> 
	/// <returns>return the column caption.</returns> 
	public string GetCaption(int column) 
	{ 
		return "my column " + column; 
	} 
} 
public class myICustomRowCaption : ICustomRowCaption 
{ 
	/// <summary> 
	/// get the custom row caption. 
	/// </summary> 
	/// <param name="row">row index.</param> 
	/// <returns>return the row caption.</returns> 
	public string GetCaption(int row) 
	{ 
		 return (row+1).ToString(); 
	} 
}

Yes, the fix worked. Thanks a Lot.

@LEWA01434

Thanks for your feedback and using Aspose.Cells.

It is good to know that your issue is resolved with the latest fix. Let us know if you encounter any other issue, we will be glad to look into it and help you further.

one thing i noticed that the new version (17.x or up) is slower than the old version 8.4.2.

do you think this is something i did wrong?

thanks.

@LEWA01434,

Could you create a sample WinForm application (runnable), zip the project and provide us here to reproduce the issue on our end. We will run your project with v17.6.x and older version v8.4.2 to evaluate your issue if could find newer version is slower than older version.

Thank you.

this could be very hard. how much costs me for the paid support? because i have the old version works in my big system and i have a very difficult time to use the any version higher than 8.4.2. (i have mentioned in other post that the code use in old version can not be convert to new version)

if i export the project file to you, you have to have sql database and few other things in the computer to make it work. I only evaluate the new version in my trial application.

anyway, thanks a lot.

@LEWA01434,

Well, we would love to enhance our latest Aspose.Cells.GridDesktop version if we find any performance issue with it. Yes, some APIs are renamed, changed or deprecated in the newer versions for good, you might need to update your code in your project accordingly. As you are still using your older version in your system, how could you find that the newer version is a bit slower than older version?

Regarding paid support cost, you may see the document for Priority, Enterprise support services:

Thank you.

@LEWA01434,

We did test the issue regarding performance using our latest version/fix of Aspose.Cells.GridDesktop and found it works fine and efficiently. We tried with some big template files, the new version has much better performance for loading/saving files:
e.g
Sample code:

  Stopwatch timer = new Stopwatch();
            timer.Start();
            this.gridDesktop1.ImportExcelFile(f);
            timer.Stop();
            this.label2.Text = "t:" + timer.Elapsed;

If you find any performance issue with latest version/fix, please share us a sample project (runnable) with template file here, we will check it soon.

Thank you.

The issues you have found earlier (filed as CELLSNET-45483) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi

The issues you have found earlier (filed as CELLSNET-45483) have been fixed in this update.