User Profile & Activity

James Member
Page
of 14
Posted: August 28, 2009 11:47 AM

Matt, it seems you tried to deploy your project to deployment server. Have you assign the runtime license key to your web.config, which required by Intersoft products for deployment?

Okay, in this case, try to hook the drag query handler to WebDragDropExtender's OnDragQuery instead. I think it'll be fired, although I'm not sure if you can get the "node" in WDDE's event level. However, if you don't need the details in the function handler and simply want to change the Effect, I think that can be done.

Posted: August 28, 2009 5:13 AM

Michael,

Yes, you can easily bind two WebGrids into a dataset. Make sure the Grid's DataMember and the RootTable's DataMember is assigned to the target datatable's name in the Grid definition (aspx). Then, your InitializeDataSource should be pointed to a dataset, not to a datatable.

Example:

<ISWebGrid:WebGrid ID="grdPC" runat="server" DataMember="DataSetA" ...>
     <RootTable DataMember="DataSetA" ...>
      ...
     </RootTable>
</ISWebGrid:WebGrid>

Then for InitializeDataSource:

protected void grdPC_InitializeDataSource(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e)
{
    e.DataSource = ds;
}

This way, WebGrid will be able to dispatch the target data table from the dataset, based on the given data member that bound to the WebGrid's table.

Let me know how it goes in your end.

James.

Posted: August 28, 2009 12:29 AM

George, when a Post is replied by support, you can see the flag "Staff Response" in the post status. The role of a user - such as member, support, moderator - can also be seen next to the user name in the post.

Let me know if you have other questions, thanks!

It's not enough to change effect, because I can also add Clildnodes only!


 I'm not sure if I got you on this one. WebTreeView should let you drop on just any nodes (parent and child). Let me know if you have other scenarios.

Hi Michael,

Have you attached the function to the OnDragQuery client side event in TreeView? Eg, <ClientSideEvents OnDragQuery="Tree_OnDragQuery" />.

The events are fired properly. You can also check a basic sample that demonstrate all drag drop events in installed live sample. Open WebTreeView (C# Samples), then look for DragDropEvents.aspx sample.

Let me know how it goes in your end.

Hi Michael,

Thanks for posting about such interesting scenario. Intersoft's drag and drop framework has a very solid architecture which enables better customizability and greater control over the drag and drop process.

In your case, you can continue using OnDragDrop event of WebTreeView since it gives you processed data such as ItemObject. If your struggle is only about the Effect, then here's the good news. You can customize the Effect to your liking by handling OnDragQuery event of WebTreeView.

Here's a snippet code:

function Tree_OnDragQuery(id, dragContext, subObjectContext)
{
     var node = subObjectContext.ItemObject;
     // change effect to "copy"
     if (node.Text == "WebUI Studio")
          dragContext.Effect = ISDragDropEffects.Copy;
}

In addition to "Effect", I think you can also customize the effect tooltip that is shown during drag, eg, dragContext.EffectText = "Copy item to WebUI Studio";

Hope this helps,
James.

Posted: August 27, 2009 6:14 AM

Hi Matt,

I see. In this case, I suggest you to better pass the information you need in a separate hidden input, rather than relying on EVENTARGUMENT variable.

For instance, if you need to know the selected node in TreeView and obtain the information in Page_Init, you can assign the information to a hidden input field in client side prior to the postback. That way, you can access the data you need through Page.Request["AdditionalInfo"].

Hope this helps.

Posted: August 27, 2009 4:52 AM

Hello Matt,

It is not a good practice to use EVENTARGUMENT variable for page processing, because the variable is intended only for control developers to manage the control's life cycle during postback.

If you would like to get information about a node during certain event, try to check the event parameter provided in the event parameter.

For example, you can get the current node during DragDrop event by accessing e.Node. See following snippe

protected void WebTreeView1_DragDrop(object sender, ISNet.WebUI.WebTreeView.WebTreeViewDragDropEventArgs e)
    {
        string text = e.Node.Text;
    }

Hope this helps,
James.

Posted: August 26, 2009 6:11 AM

Aiyer, does the "6" symbol turn into arrow properly after the alert? (eg, after you clicked OK on the alert box).

All times are GMT -5. The time now is 5:39 PM.
Previous Next