We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Double click evevnt in Grid grouping control

Thread ID:

Created:

Updated:

Platform:

Replies:

75121 Jul 14,2008 10:50 AM UTC Jan 5,2012 09:11 AM UTC ASP.NET Web Forms (Classic) 5
loading
Tags: Grouping
Kallyani Lanje
Asked On July 14, 2008 10:50 AM UTC

Hi,

I want to use the values of current record on which user double clicks. Please let me know what code i should write for the same . we are using syncfusion 6.3.0.6.

Thanks,
Kallyani


Rajarajeswari S [Syncfusion]
Replied On July 17, 2008 05:17 AM UTC

Hi Kallyani,

Thanks for using Syncfusion products.

Double clicking on the records will leads to Edit mode in GridGroupingControl.But your requirement can be achieved with Single click through client side event called "ClientSideOnRecordClick".

Please refer the below code snippet which illustartes this:

function select(gridObj)
{
document.getElementById('TextBox1').innerText = gridObj.Row.GetValue('id');
}


Please refer the sample from the below link which illustartes this:

http://www.syncfusion.com/support/user/uploads/RecordValue_e503661f.zip

Please let me know if you have any other concerns.

Regards,
Raji


Kallyani Lanje
Replied On August 1, 2008 08:08 AM UTC

i want to use doubleclick functionality on ggc cell to bind data from clicked ggc cell to textbox. lemme know the server side code for the same.


Rajarajeswari S [Syncfusion]
Replied On August 6, 2008 05:17 PM UTC

Hi Kallyani,

Thanks for using Syncfusion products.

On server side we are having “SelectedRecordsChanged” event, which will get raised for a record click. Please refer the below code snippet which is used to get the selected record through the “SelectedRecordsChanged” event:


protected void GridGroupingControl1_RecordsChanged(object sender, Syncfusion.Grouping.SelectedRecordsChangedEventArgs e)
{

Record r = this.GridGroupingControl1.Table.CurrentRecord;
if(r != null)
this.TextBox1.Text = r.GetValue("id").ToString();

if (ViewState["currentrecord"] == null)
{
ViewState["currentrecord"] = r.GetValue("id").ToString();
}
else if (r != null && r.IsCurrent)
{

if (ViewState["currentrecord"].ToString() != r.GetValue("id").ToString())
{
Record currentrec = r;
this.TextBox1.Text = currentrec.GetValue("id").ToString();
}
}

}

As I mentioned in my previous post, doubleclick of a record or cell leads to Editmode. The above code works for a single click.

Please refer the sample from the below link, which illustrates the above:

http://www.syncfusion.com/support/user/uploads/Sample_6821c861.zip

Please try the above and let us know if this helps you out.

Regards,
Raji



Deepika Jain
Replied On December 29, 2011 04:25 PM UTC

Please post the sample code once again as the link that you posted doesn't seem to be working. I want to show an alert on double click og any of th erow in grid data control and this alert should show the values of the different columns in the clicked row. for example: my row contains employee name, id and their marks so on double click of this row, I want to get the individual values of this in some variables.


Yogeshwaran [Syncfusion]
Replied On January 5, 2012 09:11 AM UTC

Hi Deepika,

Thanks for using Syncfusion products.

Your requirement to get record value of currently double clicked row can be achieved by using client side event “ClientSideOnRowDoubleClick” .please refer the following code snippet.
[Jquery]

function Select(Gridobj) {

Temp = {};
$.each(Gridobj.Row.gridTable.visibleColumns, function (index, value) {
//index 0 is indent row . to avoid this we have to check condition
if(index !=0)
Temp[index] = Gridobj.Row.GetValue(value.name);
});

}



For your convenience, we have created the sample and the same can be downloaded from the below link.

ColumnWidth-GridWeb-136404553.zip

Please let us know if you have any concerns.

Regards,
Yogesh R


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;