Showing posts with label time. Show all posts
Showing posts with label time. Show all posts

Wednesday, March 21, 2012

Urgent Please Help

Thanks for taking time in reading this thread.

I have Gridview contorl inside Update panel

Gridview in dynamic and I have added EditTemplateField to this grid.

When I click on Edit button , page flickers and it does not go into edit event.

I am not using sqldatasource or objectdatasource, I have custom classes.

What do you think is the problem ?

Again Thanks.

For reference here is the code

**************************************Code to create Edit button**************************************

TemplateField templateFieldEdit =newTemplateField();

templateFieldEdit.ItemTemplate =newReportViewHelper(ListItemType.Item, ReaderColumn[ReportViewHelper.ColumnDBName].ToString().Trim(),"Command");

**************************************Design Edit Button**************************************

elseif (_columnControlType =="Command")

{

ImageButton edit_button =newImageButton();

edit_button.ID ="edit_button";

edit_button.ImageUrl ="~/Images/edit.gif";

edit_button.CommandName ="Edit";

edit_button.Click +=newImageClickEventHandler(edit_button_Click);edit_button.ToolTip ="Edit";

container.Controls.Add(edit_button);

}

************************************** this is the method that is not triggering *************************************

void edit_button_Click(object sender,ImageClickEventArgs e)

{

}

Take a look at this articlehttp://aspalliance.com/1125_Dynamically_Templated_GridView_with_Edit_Delete_and_Insert_Options. It's real helpful for creating dynamic templates...

-Damien

Use a DragPanelExtender and an AlwaysVisibleControlExtender component at the same time pro

<asp:Panel ID="Panel3" runat="server" Height="3333px" Width="3333px">
<asp:Panel ID="Panel1" runat="server" Height="150px" Width="125px" BackColor="black">
<asp:Panel ID="Panel2" runat="server" Height="25px" Width="125px" BackColor="Blue">
</asp:Panel>
</asp:Panel>
</asp:Panel>
<cc1:DragPanelExtender ID="DragPanelExtender1" runat="server" TargetControlID="Panel1" DragHandleID="Panel2">
</cc1:DragPanelExtender>
<cc1:AlwaysVisibleControlExtender ID="AlwaysVisibleControlExtender1" runat="server" TargetControlID="Panel1">
</cc1:AlwaysVisibleControlExtender>

I use a DragPanelExtender and an AlwaysVisibleControlExtendercomponent at the same time.
It works perfectly if I don't scroll the web page.
After I scroll the web page, the drag and drop behavior notworks properly. When I drag the Panel2, the Panel1 will disappear until I dropthe Panel2, the Panel1 will appear again.
Does anyone know how to solve this problem?

Does anyone know how to solve the problem?


Hi Vincent901529,

I have tested your sample and I think this issue is cuased by the scroll offset. I suggest that you should post it to CodePlex. If you insist on resolve it by yourself. We suggest that you should move the Panel to its right place on its mousedown event. You can modify on the mouseDownHandler (Line : 140 V11119) in the FloatingBehavior.js under the DragPanel directory.

 function mouseDownHandler(ev) { window._event = ev; var el = this.get_element(); if (this.checkCanDrag(ev.target)) { //new added logic.
 .... ; // calculate the new location.
$common.setLocation(el, newLocation); // reset the showing position.
 _dragStartLocation = $common.getLocation(el); ev.preventDefault(); this.startDragDrop(el); } }
  Best regards,
Jonathan

Many thanks for your replying.

It is very helpful.