Results 1 to 2 of 2

Thread: Render any compontent on grid, when value = null?

  1. #1

    Default Render any compontent on grid, when value = null?

    I want to use a grid where my items have a background color

    For example if there is something on that column cell lets have a green background
    and in case that there is no value or lets say the value is string "0" i want to have a red background color

    something like this

    HTML Code:
    <Column text="Widget" dataIndex="teamVhclId" flex={1}   >
                        {dataIndex ?
                            <WidgetCell >
                                <Button style={{ "background-color": "#75db75", "display": "block", "padding": "4px" }} />
                            </WidgetCell> :
                            <WidgetCell >
                                <Button style={{ "background-color": "pink", "display": "block", "padding": "4px" }} />
    HTML Code:
    <Column text="Rerender" dataIndex="teamVhclId" flex={1}
                      renderer={(value, record) => (
                         <MyCustomCell value={value} record={record} /> //logic inside if(value){green}
                      )} />

    Problem with example A, is that i dont know some way to pass the value of dataIndex or something like that

    Problem with example B (and maybe A too), if there is no data coming from Column then there is no render, MyCustomCell will not be rendered on case of null

  2. #2
    Sencha - Forum Administrator
    Join Date
    Sep 2017


    Thank you so much for your post. I apologize for the delay. I have shared this with the support staff and someone will get back to provide assistance as soon as possible. Your patience is greatly appreciated!

    Kind Regards,


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts