Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
245
How to setting cells readonly properties and cells cssclass
posted

Hello All,

I want to Edit a particular Cell in Webdatagrid from Server side.

 

I want to do this in "OnInitializeRow" event of the Webdatagrid 

 Is there any event to Capture a particular cell and Set the property to Editable or non editable in InitialiseRow?

Please note that I am using webdatagrid not a ultrawebgrid hence unable to use the following syntax

 e.Row.Cells[i].AllowEditing = Infragistics.WebUI.UltraWebGrid.AllowEditing .Yes;

e.Row.Cells[i].Style.BackColor = Drawing.Color.FromName("#E1E1E1")

Atleast I want to make the Row Editable or non editable from server side.

Can you please help me in this?

I am using Version 13.1 of CLR 4.0

Thanks in Advance for your Help.

Parents
  • 10685
    Offline posted

    Please, If you have another questions or need clarifying regarding this matter, please do not hesitate to contact me!

     

Reply Children
  • 10685
    Offline posted in reply to Parag

    Hello Parag,

    I have noticed, that you have posted in the following forum thread too: http://ko.infragistics.com/community/forums/t/59560.aspx

    If I understand correctly, what you want to achieve is to make a cell Editable based on a condition (let’s say a bool values column). Enable/Disable editing based on a bool condition, could be done by handling EnteringEditMode. I believe you tried using the EnteredEditMode, as mentioned in the other post. In the event handler a check could be made for every record versus a particular cell/condition if editing should be made or not. Regarding the implementation, you could consider using CheckBoxes or even a hidden column with bool values to be used for the checks.

    “If you want an entire row/cell to not be editable, you will want to handle the client side EnteringEditMode (it cannot be done on a row/cell by row basis from the server).  Here, the event args have access to the cell, and then you can get the row.  You can determine if the row should not enter edit mode and then set_cancel(true) on the event args will stop entering of edit mode.”

    Please refer to: http://ko.infragistics.com/community/forums/t/43128.aspx , if needed.
    Thank you for choosing Infragistics components!