Set webcombo value from webgrid initializepostback

5 replies. Last post: December 3, 2009 8:25 PM by Handy Surya
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Mark SilkaMember

I have a webgrid with customers' ids and names

When I select a row on the grid I set the values in multiple webinput and webcombo boxes for editing customer data.

I can set the value of the webcombo's but the text for the selected value does not display in the webcombo's text area.

Here is my js to set the value of the webcombo.

 

function setComboValue(ctrlId, text)

{

var wc = ISGetObject(ctrlId);

wc.SetValue(text);

wc.LoadValue();

}

 

Here is my server side code for running that script.

 

Protected Sub wbgCustomers_InitializeDataSource(ByVal sender As Object, ByVal e As ISNet.WebUI.WebGrid.DataSourceEventArgs) Handles wbgCustomers.InitializeDataSource

Sub wbgCustomers_InitializeDataSource(ByVal sender As Object, ByVal e As ISNet.WebUI.WebGrid.DataSourceEventArgs) Handles wbgCustomers.InitializeDataSource

if e.Action="Custom" then

  wbgCustomers.GetClientAction.InvokeScript("setComboValue('wbcTerms', '9')")

end if

End Sub

All times are GMT -5. The time now is 9:01 AM.
Previous Next