User Profile & Activity

Andrey Belik Member
Posted: February 9, 2010 9:10 AM

I am afraid that you misunderstood my point and besides, you still have not answered my questions.

It is true that we need a multiline text in this particular scenario but we need to be able to use some kind of client side validation in general, with any edit types. To do so, I need to access the editor and customize it somehow (e.g. attach onkeydown hanlders, etc.)

You wrote:
"Please try to validate it at OnIntializeRow event. You can set any validation of your cells within a row."
and my question was
"1) How to set up the associated editor (in this case the MultilineText) for one particular cell (not column) during InitializeRow as you suggested in your first reply?"

Could please answer my question and elaborate more on how to access the WebGrid cell editor during the OnInitializeRow event, and how to set up any kind of validation?

 

Furthermore, even if we use the ResizeableTextBox as you recommended, we still need to enforce the max length. Could you please recommend, how to achieve that?

I know that there is no maxlength property of the multiline text box but it would be enough to include some kind of onkeydown='someHandler()'. Unfortunately, I do not know how to add the onkeydown to the ResizableTextBox.
Would you know how to do that?

Rgds.

Posted: February 8, 2010 2:49 AM

Hi Handy,

If you read my previous question again, I know that I need to use the MultilineText (=text area).
Could you please answer the questions that I asked there?

1) How to set up the associated editor (in this case the MultilineText) for one particular cell (not column) during InitializeRow as you suggested in your first reply?

2) If I want to write my own custom editor, can I base it on (=derive from) your already existing editor called MultiLine? If so, how do I do that?

Thanks.

Posted: February 4, 2010 4:29 PM

Hi Handy,

Thanks for your answer.

Regarding the validation, I still do not see a way, how to set it up. In the InitializeRow handler (you did mean the server handler, right?), I can access the e.Row.Cells collection - but that only gives me access to objects of WebGridCell. I need to set up the max length on the textbox, which is not part of the WebGridCell. Am I missing something here?

I guess I will have to write my own custom editor. What we need here is a multiline text (=textarea), which has an onkeydown script (or similar) that checks the length.

Is there a way, how I can reuse an already existing editor - in our case MultilineText? I mean to create a custom editor, which will derive the already existing behavior of the multiline text.

The client code is all obfuscated, which makes it useless as sample code, and your documentation does not contain any samples on that. I checked the referenced sample but there is no sample how to create a pure DHTMLClientControl - would you have any to share here?

Thanks!

All times are GMT -5. The time now is 7:11 AM.
Previous Next