sham
going with the flow Posts:40
|
11-03-2009 02:24 AM |
|
Instead of using a listbox as I am currently, I would like to use a data grid, which would be more flexible in terms of height. The listbox contains a lot of options, which will quickly before overwhelming and frustrating from an end user perspective when selecting multiple options.
I would like to take the sql statement from the listbox, to populate the data grid however; when I apply the sql statement the data grid do not display any data. What am I doing wrong?
example sql script:
Select [DataSet] As QuestionOption, DataSetTypeID As QuestionOptionValue
From tbl_DataSetType, tbl_DataSet
WHERE [tbl_DataSetType].[DatasetID] = [tbl_DataSet].[DatasetID]
Order BY QuestionOption
The example query works perfectly fine in the listbox, but do not work at all in the data grid. To recap, my goal is to have the ability to select multiple options from an sql driven data grid. |
|
|
|
|
David To
river guide Posts:2719
|
11-03-2009 06:37 AM |
|
HI, the datagrid is a new type field and for the moment, it doesn't support SQL statements. Hopefully, this is an enhancement feature for future releases. -- David |
|
|
|
|
sham
going with the flow Posts:40
|
11-03-2009 03:06 PM |
|
What about Gridview field, can I use that? Also, if I can't use the gridview either and I am forced to use the listbox, how do I add additional values to the listbox and have the listbox refresh automatically? So let me explain and provide an example to go with this question. I am using these forms more as an application, so when the end user reviews the listbox and notices a specific value do not exist, I would like them to utilize a form I have created, which updates the database with the missing value. Next to the listbox, it should have a button or radio button to launch the form I have created. When the form to add this additional record is updated and the record is applied applied to the database, the listbox should be refreshed and updated with the new record. |
|
|
|
|
David To
river guide Posts:2719
|
11-04-2009 08:06 AM |
|
Hi, gridview won't work either. You would have to stick with "listbox" or "combobox". I suppose you could create an HTML button and place it next to the listbox for the user to click on which will launch the form you created. When the user goes back to the Listbox page, since it's dynamically SQL generated, it should update automatically with the new value show in the list as well since that new value has been saved to the database table. -- David |
|
|
|
|
sham
going with the flow Posts:40
|
11-04-2009 08:18 AM |
|
ok, I will give that a shut and see what happens. In addition, please let me know if there's any way to customize the presentation of the form that will be launched, for example when the form launches I want it to launch a new browser window however, the window, should be a fixed size and should not have the address bar or any other of the bells and whistles that's on the top of the browser window or at the bottom of the page. The only option the user will have is to click on an OK html button, which will submit and close the window or click on a Cancel HTML button, which will reset the form and close the window. How can I accomplish this goal? |
|
|
|
|
David To
river guide Posts:2719
|
11-04-2009 08:46 AM |
|
HI, try something like this in your HTML button link: In HTML, I can open a new window without the menu bar, address bar, scrollers etc, using: ('/THEDOCUMENT.html','THENAME','width=500,height=500, directories=no,location=no,menubar=no,scrollbars=n o,status=no,toolbar=no,resizable=no')">Click here) Note you will need to change the link '/THEDOCUMENt.html' to some other link on your website. -- David |
|
|
|
|
sham
going with the flow Posts:40
|
11-04-2009 09:27 AM |
|
do I put this in the client event under advanced for the HTML button question? |
|
|
|
|
David To
river guide Posts:2719
|
11-04-2009 09:32 AM |
|
NO, it's not javascript code. How are you configuring your HTML LINK BUTTON? What's the actual HTML URL code? Place it there. -- David |
|
|
|
|
sham
going with the flow Posts:40
|
11-04-2009 09:33 AM |
|
Just to be little more specific:
I added the "NEW HTML INPUT BUTTON FIELD" into my form and that's all I did thus far. I modify your statement to point to my url however, I don't know where to place this statement on the button.
'/Action/Company/tabid/60/Default.aspx','THENAME','width=500,height=500, directories=no,location=no,menubar=no,scrollbars=n o,status=no,toolbar=no,resizable=no')">Click here |
|
|
|
|
David To
river guide Posts:2719
|
11-04-2009 10:31 AM |
|
HI, you could check out this link:
http://www.datasprings.com/Products...fault.aspx
and note the 3rd party integration link on the left. This might be better for what you want to achieve.
If you want to go with the HTML button link instead, under Advanced Field Options, type in something for the DEFAULT such as "Click Me"
Then in your client side event, type this in:
javascript:window.open(http://'www.google.com','GOOGLE','width=525, height=727,status=no,resizeable=no,menubar=no,toolbar=no, directories=no,location=no,scrollbars=no');
-- David |
|
|
|
|
sham
going with the flow Posts:40
|
11-04-2009 10:46 AM |
|
I applied the below script to the client side event and when I click on the button, I get no reaction. javascript:window.open(http://'www.google.com','GOOGLE','width=525, height=727,status=no,resizeable=no,menubar=no,toolbar=no, directories=no,location=no,scrollbars=no'); |
|
|
|
|
sham
going with the flow Posts:40
|
11-04-2009 10:57 AM |
|
one other note, I tried this in google chrome, which is my default browser and Internet Explorer, both did not work. |
|
|
|
|
David To
river guide Posts:2719
|
11-04-2009 11:02 AM |
|
window.open(' http://www.google.com','GOOGLE','width=525, height=727,status=no,resizeable=no,menubar=no,toolbar=no, directories=no,location=no,scrollbars=no'); TYPO on the single quote. Single quote should surround the entire 'http://www.google.com' URL. Also, you don't need to specify javascript. -- David |
|
|
|
|
sham
going with the flow Posts:40
|
11-04-2009 11:10 AM |
|
that worked, but it did not exclude the address bar. |
|
|
|
|
David To
river guide Posts:2719
|
11-04-2009 11:14 AM |
|
Add at the end after the last no, addressbar=no -- David |
|
|
|
|
sham
going with the flow Posts:40
|
11-04-2009 05:09 PM |
|
The address bar is still present, please see the below script for details however; that's not my biggest problem. My biggest problem at the moment is after I add the record to the database from the pop up window and I close the popup window, the new record do not appear in the listbox. I would need to refresh the webpage in order for the listbox to preload the records from the database. window.open('/Action/Company/tabid/60/Default.aspx','Add Company','width=925, height=627,status=no,resizeable=no,menubar=no,toolbar=no, directories=no,location=no,scrollbars=no,addressbar=no'); |
|
|
|
|
David To
river guide Posts:2719
|
11-05-2009 06:32 AM |
|
Yes, well the problem with SQL drivein listbox, etc. is that it requires a postback (page refresh) to connect to the ASP.NET Server and retrieve the latest information (to include the new record that you created). I suppose what you can do is force the user back to the page, passing a querystring variable. Create a hidden field with this same variable shortname and have it retrieve from querystring variable. Then create a question event on the hidden field to cause the page to refresh automatically. Or perhaps there's a way to redirect the user back to the page and force an automatic refresh somehow which I don't know at the moment. -- David |
|
|
|
|
sham
going with the flow Posts:40
|
11-05-2009 07:44 AM |
|
can you provide an example? |
|
|
|
|