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
440
Editor control in Webhierarchichal grid
posted

Hi

I'm new to Web hierarchichal grid. I want to bind the editor controls in web hierarchichal grid.

I achieved this functionality in wingrid. Below is the sample code.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

private

 

void gridQuestions_InitializeRow(object sender, InitializeRowEventArgs e)

{

 

 

string fieldType = "";

 

 

ValueList editorsValueList = this.GetEditorsValueList();

 

 

int index = 0;

 

 

EmbeddableEditorBase editor = null;

 

 

if (e.Row.Band.Index == 0)

{

e.Row.Appearance.FontData.Bold =

DefaultableBoolean.True;

}

 

 

if (e.Row.Band.Index >= 1)

{

fieldType =

"Text Editor";

 

 

switch (e.Row.Cells["TYPE"].Value.ToString())

{

 

 

case "Text":

fieldType =

"Text Editor";

 

 

 

break;

 

 

case "YNA":

 

 

fieldType =

"Option Set Yes No";

 

 

break;

 

 

case "LAHD":

fieldType =

"Drop-down using ValueList";

 

 

break;

}

index = editorsValueList.FindStringExact(fieldType);

 

 

if (index >= 0)

editor = (

EmbeddableEditorBase)editorsValueList.ValueListItems[index].Tag;

e.Row.Cells[

"ANSWER"].Editor = editor;

e.Row.Cells[

"ANSWER"].Column.CellMultiLine = DefaultableBoolean.True;

Screenshot is attached.

I want to achieve this in Webhierarchicalgrid. Any help would be appreciated.

Thanks

Sam

Parents
No Data
Reply
  • 230
    posted

    We are also trying to achieve a similar thing in UltraWebGrid and we are not able to. We need to bind different controls in different rows, in different bands, but they are all in the same column.  

    Can any one help pls.

      

Children
No Data