User Profile & Activity

Douglas Badin Member
Page
of 11

Hi,

We are getting closer.

Most the time the user knows what the Part Number is and does not need to look in the Drop Down.  Also, the Part Number may not be in the Drop Down but we do not want to limit the User to the Drop Down as the Part Number they need is not in the database yet.

This works fine if the User Waits before pressing the Tab Key.

However as explained before, "If the User types in the WebCombo rather than selecting from the Drop Down, the User can Tab off the WebCombo before it is finished loading."

  • In this case, IsInProgess is false.  It probably has not started,

To Reproduce Timing issue:

  • Double Click in the Product Number Column to get into Edit Mode
  • Type "8" then quickly press the Tab Key

    The idea here is to type something other than what might already be loaded.

Results:

- Product Name is not loaded

 

The symptoms are the same in IE, Mozilla, Chrome and Safari

 

Any other ideas?

 

Doug

Hi,

Did you try running the sample after removing OrderID_TextBox attribute Text="10643"?

The OrderID_TextBox attributes start on Line 79.  The actual attribute, Text="10643", is Line 82.

Remove Line 82 and then run the sample and observe the following:

  • The WebGrid is not loaded.

    It must be loaded manually by clicking the WebGrid's "Refresh Grid Data", 2 Green Curved Arrows pointing in opposite directions Up and Down, in the Lower Right Hand Corner of the WebGrid, to the Left of Blue Question Mark.
  • When activating Edit Mode for the WebCombo, in other words clicking the Part Number Column Values, the following Pop-Up occurs:

    Can't find WebCombo.NET instance with ID ''

Maybe you don't realize it, everything is in the same file, Server-Side Code included.  The Sample is not using a Code Behind File.

In the sample I provided, Lines 16 - 37 is Server Code.

Line 30 is 'OrderID_TextBox.Text = "10643", inside the _GridView_RowDataBound Server Event, Lines 26 - 34.

After removing Line 82, Line 30 will be too late in providing the Value for the WebGrid's SqlDataSouurce SelectParameter to be used in the Initial Page Load.  A Subsequent "Refresh Grid Data" now has the Value however there is a problem with the WebCombo.NET instance.  Hence, a Life Cycle issue, what comes first in what order.

Since I am not going to know the OrderID value until the _GridView_RowDataBound Server Event, what must I do to have the WebGrid Load on the Initial Page Load and have a valid WebCombo.NET instance?

 

Doug

 

 

Type="Phrase" would not allow me to type in the WebInput.

After removing it allowed me to type.

I appears not to be needed as part of the temporary workaround.

Doug

Please use the attached sample as a basis.

I want to populate ProductName_WebGridColumn with the [ProductName] when ProductID_WebGridColumn's WebCombo's value changes, selected.

Hi,

It appears to be a Life Cycle issue.

WebGrid needs something before the _GridView_RowDataBound Server Event which sets OrderID_TextBox.Text = "10643"

OrderID_TextBox is a SqlDataSource SelectParameter which is used by the WebGrid

I have provided a simplified example.  You will need to change the ConnectionString.

Everything works fine until the OrderID_TextBox attribute Text="10643", Line 79 is removed.

-- The WebGrid must be loaded manually

-- Activating the WebCombo produces "Can't find WebCombo.NET instance with ID ''

I tried putting a OrderDetails_WebGrid.DataBind() in the _GridView_RowDataBound Server Event but that did not help.

Since I am not going to know the OrderID value until _GridView_RowDataBound Server Event, what must I do to provide that value to the WebGrid?

Doug

Posted: February 19, 2010 8:11 AM

The following setting helps a lot.

WebGrid - LayoutSettings - EditOnClick

Doug

Posted: February 18, 2010 5:20 PM

Hi,

At first I didn't think your sample was working because the only item in the DropDown was the Selected Item.

Adding WebCombo.LayoutSettings.AlwaysShowAllRowsOnDropdown true made it reveal the rest of the items.

To confirm, there is now way to get the WebCombo ValueList in the Server-Side IntializeRow Event or get the Row Data and Column Controls at the same time?

The keys to your sample where to:

- add a hidden column to WebCombo to Filter on.

- WebGrid.ClientSideEvents.OnEnterEditMode did a WebCombo.SetAdditionalFilters

In the WebGrid.ClientSideEvents.OnEnterEditMode, the lookup value exists in a WebGrid Column.  In my case I don't need to display that info to the User and if make it not visible, I can not get the Value using a GetCell() Method.

My current work around is make the WebGrid.Width 0, but I still see some of it.

Is there a cleaner way to get the Value so I don't have to show it in the Grid?

Thanks,

Doug

Posted: February 17, 2010 9:25 PM

No one is answering Live Chat.

One other note on what I am trying to do.

I am saving the Text, [Order Details].[ProductName], from the DropDownList/WebComboNet to the database.  [Order Details].[CatgoryID] is the Value and used to filter the List.  E.g. all Product Names in a Category would be displayed in the List.

Posted: February 17, 2010 7:30 AM

Thank you for confirming my observations.

As stated in my first posting:

"I have looked at the OnInitializeRow Server-Side Event and can get the Row Values but can not figure out how to get to the ValueList of the DropDownList or WebCombo in that Row."

So, how do I populate the DropDownList/WebComboNet based on a value in that row which may be different per row?

Are there any solutions?

The problem is the '--- PLEASE SELECT ---', the OPTGROUP, can not be selected.

All times are GMT -5. The time now is 10:36 AM.
Previous Next