This is a migrated thread and some comments may be shown as answers.

Tooltip edit help

3 Answers 73 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Ashish Jain
Top achievements
Rank 1
Ashish Jain asked on 15 Sep 2009, 07:03 PM
HI,
I am working on tooptip edit in RadGrid. I am facing a problem whenever i am editing something on tooltip and call button event it close the tooptip and client side and later it binds only single row in Radgrid on which i edit the tooltip other data loose.

see the code..

Tooltip code:

 

protected void Swap_Click(object sender, EventArgs e)

 

{

 

 

 

DataSet ds1 = (DataSet)Cache[dKey];

 

 

DataView dv = ds1.Tables[0].DefaultView;

 

 

string preLink2 = "<A href='MainAction.aspx?mode=ComponentInfo&suppliedComponentID=" +suppliedComponentID.ToString() + "'>";

 

 

string postLink2 = "</A>";

 

 

dv.RowFilter =

string.Format("BlockID={0}", ProductID);

 

dv[0][

"SuppliedComponentID"] = suppliedComponentID;

 

dv[0][

"ReservationStatusID"] = reservationStatusID;

 

dv[0][

"ConfirmationSize"] = confirmedAllocation;

 

dv[0][

"SupplierPlain"] = AssociatesList.SelectedItem.Text;

 

dv[0][

"SupplierID"] = suppliedComponentID;

 

dv[0][

"SupplierName"] = preLink2 + AssociatesList.SelectedItem.Text + postLink2;

 

Cache[dKey] = ds1;

 

 

 

//Close the active ToolTip.

 

 

ScriptManager.RegisterClientScriptBlock(

 

 

this.Page,

 

 

this.GetType(),

 

 

"WebUserControlSript",

 

 

"CloseActiveToolTip('" + this.ProductID + "')",

 

 

true);

 

}


On Control Page :

 

/

 

SCRIPT>

 

 

 

 

 

 

<script type="text/javascript">

 

 

 

 

 

 

function CloseActiveToolTip(supplierID) {

 

 

var tooltip = Telerik.Web.UI.RadToolTip.getCurrent();

 

 

if (tooltip) tooltip.hide();

 

 

var grid = $find("<%=RadGrid1.ClientID %>").get_masterTableView();

 

grid.rebind();

}

 

</script>

 



IN Code behind file

I am binding

 

protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)

 

{

 

if (!e.IsFromDetailTable)

 

{

 

DataSet ds = new DataSet();

 

ds = (Cache[dKey] !=

null) ? (DataSet)Cache[dKey] : ds;

 

RadGrid1.DataSource = ds.Tables[0];

 

//DataTable ds = new DataTable();

 

 

//ds = (Cache[dKey] != null) ? (DataTable)Cache[dKey] : ds;

 

 

//RadGrid1.DataSource = ds;

 

}

}



but it only display the row which i edit in tooptip

and same thing happen in paging also.

plz help me

3 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 18 Sep 2009, 01:03 PM
Hello Ashish,

I am afraid that the provided information is not enough to find teh problem. However, we have an onlinde demo which is very similar to what you want to achieve - you can find it below:

http://demos.telerik.com/aspnet-ajax/controls/examples/integration/tooltipgrid/defaultcs.aspx?product=grid

You can examine its full source to get a nbetter understanding on the exact mechanism it works.

In case you need further assistance, pelase prepare a simple setup which reproduces the problem and upload it somewhere and provide a link from where we can download and examine it. Please, do not upload the Telerik.Web.UI.dll, we will add it by ourselves and also make sure the demo is fully runnable (use Northwind or a fake programmatic datasource for the grid) and provide reproducetion steps and we will do our best to help.

Regards,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Ashish Jain
Top achievements
Rank 1
answered on 18 Sep 2009, 01:35 PM
HI Savieta ,
Thanks for your reply and sorry for not providing your enough information. I will try again as i dont have so much time to prepare for some sort of demo.

1. You have a nested grid i only have one grid which am binding with dataset and at tooltip i have read all the require information from the cache dataset which is the same dataset for the main grid. once i manipulate the dataset i again go back to usercontrol and rebind the grid with the same dataset using

JavaScript to rebind

<

 

script type="text/javascript">

 

 

function CloseActiveToolTip(supplierID) {

 

 

var tooltip = Telerik.Web.UI.RadToolTip.getCurrent();

 

 

if (tooltip) tooltip.hide();

 

 

var grid = $find("<%=RadGrid1.ClientID %>").get_masterTableView();

 

grid.rebind();

}

 

</script>

 


Which Call this need Datasource

protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)

{

DataSet ds = new DataSet();

ds = (Cache[dKey] != null) ? (DataSet)Cache[dKey] : ds;

RadGrid1.DataSource = ds.Tables[0];

}

when ever i bind like this i only get the single row on gird on which i did edit on tooptip

also same problem with paging.

 

 

protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)

 

{

 

if (e.CommandName == "Sort" || e.CommandName == "Page")

 

{

 

      RadToolTipManager1.TargetControls.Clear();

 

 

 

      RadGrid1.Rebind();

 

 

 

}

 

}

see i clear the the Tooptip above Code but still it show only the editable row in the RadGrid.

I hope this make you little clear if not than let me know i am stuck in my project.

In you demo you call RaisePostBackEvent .. but i am using usercontrol so i cant call this event.

let me now the alternate.

thanks,
AShi

0
Yavor
Telerik team
answered on 24 Sep 2009, 07:45 AM
Hello Ashish,

I reviewed the setup, and the logic seems correct. If the problem persists, it will be best if you open a formal support ticket, and send us a small working project, demonstrating your setup, and showing the unwanted behavior. We will review it locally, and get back to you with additional informaiton.

Regards,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
ToolTip
Asked by
Ashish Jain
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Ashish Jain
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or