iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hello team,I am evaluating the sample according to our requirement.We need to show drop down list box in Webgrid column.Such a that Web grid columns generate at runtime. In generated columns one or more columns of type drop down. Whose all value list items should add in code behind at once.I have tried to do it in “WebGrid1_InitializeLayout” method. But unsucessful.I have tried to attach prefill webcombo to webgrid column, it was also failed.Please provide me help on the adding drop down list box in web grid column.Thank you in advanced.
Hi Chetan,
If I check on your code sample, you made an incorrect way to bind the WebGrid. You should use OnInitializeDataSource event in order to bind data to WebGrid. And also I'm not sure where you assign WebValueList for Column #2 and set the WebCombo EditType but you should assign it onPrepareDataBinding event.
I have created a simple sample for you [using northwind.mdb] and I hope this can helps you to figure out the issue. Please find attached sample named WGIntegratedWC.zip.
Best Regards,
Dicky
Hello Chetan,
Thank you for your interest with our product. You can try to set it onPrepareDataBinding event instead of OnInitializeLayout, and here the code snippet:
if(!IsPostBack)
{
v1Items.DataSource = daCustomer.GetData();
colCustomer .EditType = EditType.WebComboNET; colCustomer .WebComboID =
}
Hope this helps.
Hello Dicky,
Thanks for quick reply,
I have tried the same grid gets loaded when i click any cell of column having dropd down box it prompt me alert "Can't find webcombo.net instance with ID".
My code is follows, please suggest me solution.
DataTable objDT = GetData(int.Parse(hiddenProjectID.Value), 0, 0, 50); // UltraWebGridData.InitializeLayout += new LayoutEventHandler(UltraWebGridData_InitializeLayout); UltraWebGridData.DataSource = objDT; UltraWebGridData.DataBind(); DataTable locationshash = GetLocations();//webcomobo data locationshash.TableName = "tbllocation"; WebValueList v1Items = UltraWebGridData.RootTable.Columns[2].ValueList; v1Items.DataSource = locationshash; v1Items.DataMember = "tbllocation"; v1Items.DataTextField = "Description"; v1Items.DataValueField = "LocationId"; WebGridColumn colLocation = UltraWebGridData.RootTable.Columns[2]; colLocation.EditType = EditType.WebComboNET; colLocation.WebComboID = "WebCombo1";
"WebCombo1" is design time webcomobo in form.
Also for more than one column of drop down type in a grid. would required same number of webcombo on page.
Thank you for example i have followed steps and it works.
I have 2 more question with same topic.
1. If the grid would require more than one columns with drop down type, do i need that many number of web combo in page?
2. Currently web grid column with web comb shows "DataValueField", please give me the method to show "DataTextField".
Thanks again.
I have 2 more question with same topic.1. If the grid would require more than one columns with drop down type, do i need that many number of web combo in page?2. Currently web grid column with web comb shows "DataValueField", please give me the method to show "DataTextField".Thanks again.
1. If drop down type that you mean is using WebCombo then the answer is yes, but if you are using integrated dropdropdown menu built-in WebGrid then you don't need to add any control for it, because it is already built-in on WebGrid.
2. You need to use WebValueList to fulfil your scenario. If you check on my sample you will find if I also add WebValueList after I set WebGridColumn EditType with WebCombo.
Feel free if you have another question.
Hi Dicky,
Thank you for the replies. Understood the answers.
In my required scenario, I would need to create webgrid columns runtime as requested by user. Many columns are drop down type. I understood, I have to use “integrated dropdropdown menu” built-in webgrid for this purpose.
I have checked samples provided with the trial package to implement same, but unsuccessful. Can you please give me small sample to use “integrated dropdropdown menu” in grid using detch at runtime.
I think the same question with this thread that you created. Please see the response from that thread. Thank you.
Regards,Handy
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname