Hi All,
I am new to the Infragistics software and am currently experimenting with the UltraWebGrids and WebCombos. I currently have a working WebCombo existing alone, and a working UltraWebGrid. I wanted to add the WebCombo into a cell(s) of the data grid. I thought that it would be as easy as taking the working product, creating a new column (for example) and copying the working WebCombo into the new column. This did seem to work, except that I cannot click on the droplist in the columns cells and have it activate. Nothing happens. I'm not sure if the data is no longer getting read into the WebCombo (everything is linked to an SQL database), or if there's some issue with how I put the WebCombo in the UltraWebGrid.
Here is how I have it currently structured if it is the ladder:
<igtbl:UltraWebGrid ...> <bands> <igtbl:UltraGridBand ...> <Columns> <igtbl:TemplateColumn ...> <CellTemplate> <igcmbo:WebCombo ...>
Any insight would be extremely helpful for me learning these Infragistic tools!
Hi Daryl007,
Here is an updated link for setting a WebCombo as an Editor in UltraWebGrid:
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2010.3/CLR4.0/html/WebGrid_Display_WebCombo_in_a_Cell.html
Please let me know if you have any questions.
Best Regards, Petar Ivanov Developer Support Engineer Infragistics, Inc. http://ko.infragistics.com/support
Hey, your link is dead..
The initializeDatasource event is only fired after a datasource is bound to the grid. So, as long as the event is firing, the structure should be present. Is it possible that you have AutoGenerateColumns=false set on the grid? that would prevent the grid from automatically creating the columns requred to bind the data. Try this..
Add a WebGrid to your form
Add a WebCombo to your form
Add A SqlDataSource to your form (this could be accessdatasource, objectdatasource, etc.)
Bind the SqlDataSource to a sql table (try to bind it to the Northwind database, Orders table)
Through the WebGrid's designer, set the DataSourceID = SqlDataSource1 (it should be in the dropdown list)
Now go into the WebGrid's smart tag (click on the arrow on the top right side of the control). Click on "Edit Structure"
Go into the "Bands And Columns" editor and find a column where you want to use an editor.
Set the "EditorControlID" property on the specified column, to the id of your editor ("WebCombo1")
At this point, you should have an editor hooked up for the column. now you just need to bind up the webcombo to some data. You can set the WebCombo's DataSourceID property to bind it to a foreign key field, or populate it manually.
There's a help topic which does a much more thorough job of explainint this as well. You can look at that here - https://help.infragistics.com/Help/Doc/ASPNET/2010.3/CLR4.0/html/WebGrid_Display_WebCombo_in_a_Cell.html?_ga=2.154711672.197774204.1563810735-1320467891.1559052143&_ga=2.154711672.197774204.1563810735-1320467891.1559052143
Hope this helps,
-Tony
Each cell in the column has the dropdown button already visible even when the cell is not in focus, and clicking on the button does nothing. Clicking on the cell (i.e. the data section of the droplist) works similarly to a textbox.
Edit:
On a debugging note, I realized that my UltraWebGrid1_InitializeLayout function with the statements I added with your suggestion was not getting fired off. I then added an OnInitializeLayout attribute to the <igtbl:UltraWebGrid ..> tag to correct this, and for my troubles, got a runtime error before the page loaded saying "Object reference not set to an instance of an object"
I believe that this means I was trying to access the table rows with the statements before the table was actually populated by the SqlDataSource. Since then I've tried moving the code to various places to try and work around the error, even tried putting <% [statements] %> in the .aspx file after the code for the grid...no luck. I'll keep working on it as I go, let me know if you have any ideas what I could be doing wrong.
Yes, that should be all you need to do. What's happening when you click on a cell in the specified column? Does a dropdown appear, or does it just act like a static html table?