- Home
- Forum
- ASP.NET Web Forms (Classic)
- MultiColumnDropDown how-to get special cell-value
MultiColumnDropDown how-to get special cell-value
Hi there
I have a MultiColumnDropDown control with a Datatable as datasource. The table shows in col1 the key and in col2 the text of this item. As dropdown-text the col2-value is shown. When a user selects an item, i need to know the key in col1 of the selected item. How can I get this key in clientside (javascript) by the OnSelectedIndexChanged-Event? Item.rowIndex only gives me the selectedIndex, .Text only the col2-Text!
thanks in advance
Sascha
I have a MultiColumnDropDown control with a Datatable as datasource. The table shows in col1 the key and in col2 the text of this item. As dropdown-text the col2-value is shown. When a user selects an item, i need to know the key in col1 of the selected item. How can I get this key in clientside (javascript) by the OnSelectedIndexChanged-Event? Item.rowIndex only gives me the selectedIndex, .Text only the col2-Text!
thanks in advance
Sascha
SIGN IN To post a reply.
2 Replies
RP
Rekha P
Syncfusion Team
November 20, 2008 12:19 PM UTC
Hi Sascha,
Thank you for your interest in Syncfusion Products.
As per your scenario, we can get the column1 value only when it is bounded to MultiColumnDropDown and please refer the below code snippet to achieve this using ClientSideOnSelectedIndexChange event,
function onselectedindex(odata)
{
var index=odata.Item.rowIndex - 1;
var table=document.getElementById('MultiColumnDropDownCombo1_grid_I'+index); // used to get the selected row.
var row=table.getElementsByTagName('td');
document.getElementById('TextBox1').value=row[0].innerText;// column1
}
Also this can be achieved by bounding column2 to the control and column1 as DataTextFormatField and also using CallbackMultiplexer with dynamically bounded columns, so please refer the below link for sample files to achieve this.
http://websamples.syncfusion.com/samples/Tools.Web/F77870-MulticolumnDropDown.zip
Please let me know if this sample helps you.
Thanks,
Rekha
Thank you for your interest in Syncfusion Products.
As per your scenario, we can get the column1 value only when it is bounded to MultiColumnDropDown and please refer the below code snippet to achieve this using ClientSideOnSelectedIndexChange event,
function onselectedindex(odata)
{
var index=odata.Item.rowIndex - 1;
var table=document.getElementById('MultiColumnDropDownCombo1_grid_I'+index); // used to get the selected row.
var row=table.getElementsByTagName('td');
document.getElementById('TextBox1').value=row[0].innerText;// column1
}
Also this can be achieved by bounding column2 to the control and column1 as DataTextFormatField and also using CallbackMultiplexer with dynamically bounded columns, so please refer the below link for sample files to achieve this.
http://websamples.syncfusion.com/samples/Tools.Web/F77870-MulticolumnDropDown.zip
Please let me know if this sample helps you.
Thanks,
Rekha
AD
Administrator
Syncfusion Team
November 20, 2008 12:37 PM UTC
Hi Subhasheela
I jus want to know are you from kumbakonam and is ther any product you guys providing for conversion?
Can anyone of you help me out please?
Rajesh
>Hi Sascha,
Thank you for your interest in Syncfusion Products.
As per your scenario, we can get the column1 value only when it is bounded to MultiColumnDropDown and please refer the below code snippet to achieve this using ClientSideOnSelectedIndexChange event,
function onselectedindex(odata)
{
var index=odata.Item.rowIndex - 1;
var table=document.getElementById('MultiColumnDropDownCombo1_grid_I'+index); // used to get the selected row.
var row=table.getElementsByTagName('td');
document.getElementById('TextBox1').value=row[0].innerText;// column1
}
Also this can be achieved by bounding column2 to the control and column1 as DataTextFormatField and also using CallbackMultiplexer with dynamically bounded columns, so please refer the below link for sample files to achieve this.
http://websamples.syncfusion.com/samples/Tools.Web/F77870-MulticolumnDropDown.zip
Please let me know if this sample helps you.
Thanks,
Rekha
I jus want to know are you from kumbakonam and is ther any product you guys providing for conversion?
Can anyone of you help me out please?
Rajesh
>Hi Sascha,
Thank you for your interest in Syncfusion Products.
As per your scenario, we can get the column1 value only when it is bounded to MultiColumnDropDown and please refer the below code snippet to achieve this using ClientSideOnSelectedIndexChange event,
function onselectedindex(odata)
{
var index=odata.Item.rowIndex - 1;
var table=document.getElementById('MultiColumnDropDownCombo1_grid_I'+index); // used to get the selected row.
var row=table.getElementsByTagName('td');
document.getElementById('TextBox1').value=row[0].innerText;// column1
}
Also this can be achieved by bounding column2 to the control and column1 as DataTextFormatField and also using CallbackMultiplexer with dynamically bounded columns, so please refer the below link for sample files to achieve this.
http://websamples.syncfusion.com/samples/Tools.Web/F77870-MulticolumnDropDown.zip
Please let me know if this sample helps you.
Thanks,
Rekha
SIGN IN To post a reply.
- 2 Replies
- 3 Participants
-
MS Mr. Sascha Wald
- Nov 19, 2008 03:34 PM UTC
- Nov 20, 2008 12:37 PM UTC