Hello
I have a radgridview with two columns (for simplicity)
The first is defined like this:
The second like this:
where parametro.Id and l are variables correctly defined and not null.
The grid works good, but in the second columns filtering and sorting are not active, while in the first they do.
Is there a reason for this behavior?
Thank you
Luigi
I have a radgridview with two columns (for simplicity)
The first is defined like this:
RiassuntoSorgentiGrid.Columns.Add(new GridViewDataColumn()
{
Header = Utility.LoadString(ResourcesKeys.RipetizioniSorgente),
ColumnGroupName = GENERALGROUPNAME,
DataFormatString = "D",
DataMemberBinding = new Binding("Sorgente.Ripetizioni")
{
Mode = BindingMode.OneWay
}
});
The second like this:
RiassuntoSorgentiGrid.Columns.Add(new GridViewDataColumn()
{
Header = Utility.LoadString(ResourcesKeys.RipetizioniSorgente),
ColumnGroupName = GENERALGROUPNAME,
DataFormatString = "D",
DataMemberBinding = new Binding($"Sorgente.LivelliSingoli[{parametro.Id}][{l}]")
{
Mode = BindingMode.OneWay
}
});
where parametro.Id and l are variables correctly defined and not null.
The grid works good, but in the second columns filtering and sorting are not active, while in the first they do.
Is there a reason for this behavior?
Thank you
Luigi
Hi Luigi,
What is the type of property used in this case? Can you create a small sample project that reproduces this case and send it to us? This will allow us to properly investigate this and provide a solution.
Thank you in advance for your patience and cooperation.
Thank you for your quick answer.
It is not easy to extract the code and put it in a small project.
The LivelliSingoli property is defined as
public Dictionary<string, Dictionary<LivelliSorgente, object>> LivelliSingoli { get; set; } = new();
LivelliSorgenti is an enumeration.
Hi Luigi,
This should work with an enumeration. Perhaps instead of object, you should use the actual enumeration type or at least set the DataType of the column.
Let me know if I can be of further assistance.
I set DataType for column and now it works.
Thank you
Luigi