DataGrid - Custom Filter Template (Numeric)

Hi folks,

Firstly, really enjoying these controls. Fabulous work and have easily achieved just about everything I would like to do!

I have a DataGrid where I want to make the Numeric Filter remove the up/down buttons and TextAlign.Center.

It seems I cannot add a RadzenNumric into FilterTemplate and set these properties. It would be hugely helpful if someone knows how I can make the filter work with these requirements.

Please advise if I also need to add any custom methods to handle the filter as in your examples, it doesn't appear to be required.

Thank you again so much for a great set of controls

Not sure why you cannot do this. Can you clarify?

Hi.

Thanks for the speed reply.

What I mean, is that if I add the following to my DataColumn:

<RadzenDataGridColumn Property="Id" TextAlign=TextAlign.Center TItem=Request Title="Request No." Width="175px"> <FilterTemplate Context="row"> <RadzenNumeric ShowUpDown=false TextAlign=TextAlign.Center /> </FilterTemplate> </RadzenDataGridColumn>

It shows me an error:

I am new to the controls.

Basically, I just want to have a numeric control in the filter row that doesn't have the buttons. Here is what it looks like at the moment:

Thanks for your help.

You need to set either @bind-Value or TValue.

Thank you.

I now have:

<RadzenDataGridColumn Property="Id" TextAlign=TextAlign.Center TItem=Request Title="Request No." Width="175px">
                        <FilterTemplate Context="row">
                            <RadzenNumeric ShowUpDown=false TextAlign=TextAlign.Center TValue=int? />
                        </FilterTemplate>
                    </RadzenDataGridColumn>

Shows correctly on the screen but you enter a value and nothing happens (no filtering is applied)

Is there anything else I should look for?

Yes, you need to check our filtering demos and how exactly the value of the input component is assigned to column FilterValue.

Thank you

I have reviewed the examples over and over but cannot find exactly what you are wanting me to do.

I apologise if I have wasted your time. I will just advise my customer it cannot be done and look to see if I can find another control that is easier to implement.

Thanks again. Have an awesome day.

Well, that’s definitely not true. Again, as I already mentioned twice you need to bind the component Value and the column FilterValue to same variable. Check the demos.