HOW to add userdata XML tag via connector

hi

I’m really struggling with this. Any help appreciated

Im using the dhtmlxconnector for .NET to generate my XML for the dhtmlxTREE
I need some help / information on how to implement the userdata attribute in the generated XML.
Currenty with the code below I’ve managed to output it but it appears above the item tag in the xml and also im not sure how to manipulate the opening closing tags of the xml.

snapshot of my connector code…

dhtmlxTreeConnector connector;
connector = new dhtmlxTreeConnector(
sql,
“id”,
parentIdColumnName,
dhtmlxDatabaseAdapterType.SqlServer2005,
ConfigurationManager.ConnectionStrings[“xxxx”].ConnectionString, “name”);
connector.RootItemRelationIDValue = “0”; //Set ParentID value for root items
connector.EnableDynamicLoading = true;

connector.BeforeOutput += new EventHandler(connector_BeforeOutput);
return connector;
}

void connector_BeforeOutput(object sender, RenderEventArgs e)
{
e.Writer.WriteString(“txt”);

}

Trying to achieve this:
<item …>
true

but instead I’m currnetly getting this with above code

<tree …>
txt
<item …/>

Hi,
currently you can’t add userdata to each item by connector, this functionality will be added in the nearest update.
beforeOutput handler allows you to write ‘global’ user data, you can write data for all nodes there(e.g. in json object) and then process it on the client

beforeOutput handler will look like the following
void connector_BeforeOutput(object sender, RenderEventArgs e)
{
e.Writer.WriteStartElement(“userdata”);
e.Writer.WriteAttribute(“name”, “ct”);
e.Writer.WriteString(“txt”);
e.Writer.WriteEndElement();
}

on the client you can get userdata by
tree.getUserData(0, “ct”) - where first parameter is equal to connector.RootItemRelationIDValue

Thanks for clarifying this.