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
In our Grid we insert DateValues from a DropDownlist. The User gets a List of the next 12 Month to Choose. The values are stored in a table and the key is the PeriodID
In the Grid we have values that are not listet anymore in the DropdownList.
I would like to to Change the shown PeriodID to an Value of my own. Like an localized Date selected by the PeriodID.
I'm not able to do an FullPostback, So i need something that works on the Clientside.
Thanxs for your help.
Hello,
Thank you for the question and please forgive me for lack of understanding about the reported problem.
If you like to change the value like PeriodID to another value (for example: PeriodName), you could use WebValueList feature in WebGrid.With WebValueList, you can easily translate ID to Text Lookup by using the DataSource populated in the WebValueList object. For instance, the Supplier Name in the WebGrid above is actually an ID column which is translated to Company Name field of Suppliers table through WebValueList.
Here’s I attached a simple WebGrid sample that using WebValueList feature.In the sample, I bind WebGrid to access data source control (Northwind.mdb database, Order Details table & Products table).
Please kindly have review on my sample and let me know your response.
For further information about WebValueList, you could see on WebGrid's documentation.
Thank you.
Regards,Hans.
Thank you for sample.
I have reviewed your sample and try to modify the sample so that perhaps similar with your current scenario.Due to your WebGrid are using server side bind, therefore I add the validation code on InitializeRow server side event.The validation code is to change the text of the Key cell to "None", if the text and the value if Key cell is the same.
Here’s the snippet code on InitializeRow event:
protected void tblDealClass_TargetByPeriodWebgrid_InitializeRow(object sender, RowEventArgs e) { string keyText = e.Row.Cells.GetNamedItem("Key").Text; string keyValue = e.Row.Cells.GetNamedItem("Key").Value.ToString(); // If the text and the value if Key cells is the same. Change the text to "None" if (keyText == keyValue) e.Row.Cells.GetNamedItem("Key").Text = "None"; }
Hope this helps.
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