GridDesktop Çalışma Sayfasının Özel Satır ve Özel Sütun Başlığı

Olası Kullanım Senaryoları

GridDesktop çalışma sayfasının satır ve sütun başlığını özelleştirebilirsiniz. Normalde satır 1’den, sütun A’dan başlar. Bu davranışı değiştirebilir ve GridDesktop çalışma sayfasının satır ve sütunları için kendi başlıklarınızı kullanabilirsiniz. Satır ve sütunların başlıklarını değiştirmek için lütfen ICustomRowCaption ve ICustomColumnCaption arayüzlerini uygulayın.

GridDesktop Çalışma Sayfasının Özel Satır ve Özel Sütun Başlığı

Aşağıdaki örnek kod, ICustomRowCaption ve ICustomColumnCaption arabirimlerini uygular ve satırların ve sütunların resim yazılarını değiştirir. Ekran görüntüsü, referans için bu örnek kodun yürütülmesinin sonucunu gösterir.

yapılacaklar:resim_alternatif_metin

Basit kod

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
public class MyICustomColumnCaption : ICustomColumnCaption
{
//Returns the Custom Column Caption
public string GetCaption(int column)
{
return "Mine " + (column + 10);
}
}
public class MyICustomRowCaption : ICustomRowCaption
{
//Returns the Custom Row Caption
public string GetCaption(int row)
{
return "R" + (row + 10).ToString();
}
}
//-------------------------------------------
//-------------------------------------------
//Access the First GridDesktop Worksheet
Worksheet ws = this.gridDesktop1.Worksheets[0];
//Assign the Worksheet Custom Column and Row Caption Instance
ws.CustomColumnCaption = new MyICustomColumnCaption();
ws.CustomRowCaption = new MyICustomRowCaption();